refactor(editor): enhance UI management and debugging tools

- Updated EditorManager to streamline UI component rendering, ensuring that UI elements like the Command Palette and Global Search are properly displayed.
- Refactored MenuOrchestrator to introduce a new Debug menu, consolidating debugging tools and enhancing accessibility for users.
- Improved PopupManager to include new popups for feature flags and data integrity checks, providing better feedback and control over debugging processes.

Benefits:
- Enhances user experience by organizing UI elements and debugging tools more effectively.
- Improves maintainability by centralizing UI management and debugging functionalities within dedicated components.
This commit is contained in:
scawful
2025-10-15 15:37:11 -04:00
parent b8ccc2a6cd
commit 22e5fafc37
7 changed files with 340 additions and 113 deletions

View File

@@ -915,6 +915,12 @@ absl::Status EditorManager::Update() {
session_coordinator_->DrawSessionRenameDialog();
}
// Draw UICoordinator UI components (Command Palette, Global Search, etc.)
// CRITICAL: This must be called for Command Palette and other UI windows to appear
if (ui_coordinator_) {
ui_coordinator_->DrawAllUI();
}
return absl::OkStatus();
}
@@ -1053,10 +1059,8 @@ void EditorManager::DrawMenuBar() {
// Agent chat history popup (left side)
agent_chat_history_popup_.Draw();
// Welcome screen (managed by UICoordinator)
if (ui_coordinator_) {
ui_coordinator_->DrawWelcomeScreen();
}
// Welcome screen is now drawn by UICoordinator::DrawAllUI()
// Removed duplicate call to avoid showing welcome screen twice
// TODO: Fix emulator not appearing
if (show_emulator_) {
@@ -1319,12 +1323,9 @@ void EditorManager::DrawMenuBar() {
ImGui::End();
}
// Draw new workspace UI elements
// Layout presets UI (session dialogs are drawn by SessionCoordinator at lines 907-915)
if (ui_coordinator_) {
ui_coordinator_->DrawSessionSwitcher();
ui_coordinator_->DrawSessionManager();
ui_coordinator_->DrawLayoutPresets();
ui_coordinator_->DrawSessionRenameDialog();
}
}