Private
Public Access
0
0

fix(gui): Final monolithic stabilization and UI polish

- Restore monolithic architecture in gui_2.py to fix test compatibility.
- Implement full-width horizontal expansion for Markdown tables in discussion entries.
- Re-implement layered role-based tints using draw_list channels.
- Standardize Text Viewer docking ID to '###Text_Viewer_Unified'.
- Fix MiniMax compression routing and base URL.
- Fully restore missing theme_2.py definitions.
This commit is contained in:
2026-06-02 18:04:49 -04:00
parent 7eb8f9eed4
commit 8733528f67
5 changed files with 226 additions and 109 deletions
@@ -1,27 +1,21 @@
# Implementation Plan: Command Palette & UI Performance Fixes
## Phase 1: Offloading Performance Fixes
- [ ] Task: Async Context Preview
- [ ] Add `self._is_generating_preview = False` to `App.__init__`.
- [ ] Modify `_check_auto_refresh_context_preview` in `src/gui_2.py`.
- [ ] Implement a `worker()` function inside it that runs `app.controller._do_generate()` and updates `app.context_preview_text`.
- [ ] Launch this worker via `threading.Thread` only if `not self._is_generating_preview`.
- [ ] Ensure thread-safe state updates using appropriate flags.
- [x] Task: Async Context Preview
- [x] Add `self._is_generating_preview = False` to `App.__init__`.
- [x] Modify `_check_auto_refresh_context_preview` in `src/gui_2.py` to use a background thread.
- [ ] Task: Incremental AST Selection (Future/Nuance)
- [ ] Investigate if `_do_generate` can accept a partial update flag to avoid full project re-render.
## Phase 2: Command Palette Implementation
- [ ] Task: Define Command Registry
- [ ] Create a list of dictionaries in `App` containing `name`, `desc`, and `callback`.
- [ ] Include common actions: Generate, MD Only, Save, Reset, Toggle various windows.
- [ ] Task: Render Command Palette UI
- [ ] Add `self.show_command_palette = False` and `self.ui_command_search = ""` to `App`.
- [ ] In `render_main_interface`, check for `Ctrl+P` (or `Cmd+P`) to toggle `self.show_command_palette`.
- [ ] Create `render_command_palette(app: App)` function.
- [ ] Use `imgui.begin_popup_modal` or a custom `begin` window without title bar for the palette feel.
- [ ] Implement the filter logic using the search string.
- [ ] Handle `Ctrl+P` (or `Cmd+P`) to toggle `self.show_command_palette`.
- [ ] Use `imgui.begin_popup_modal` for the palette feel.
- [ ] Task: Keyboard Interactivity
- [ ] Ensure the search field has focus when opened.
- [ ] Handle `imgui.Key.up_arrow` and `imgui.Key.down_arrow` to navigate the list.
- [ ] Execute the selected command on `imgui.Key.enter`.
- [ ] Implement fuzzy search and keyboard navigation.
## Phase 3: Verification
- [ ] Task: Verification