Private
Public Access
feat(gui): Unified window state and fixed context preservation regressions
- Implement unified show_windows['Text Viewer'] state and fix docking conflict loops. - Fix Tool Call row interactivity using spanned selectables. - Fix context selection loss when switching/creating discussions. - Implement 'Empty Context Warning' modal for safer generation. - Correct IndentationError in app_controller.py. - Remove legacy show_text_viewer attribute and update API hooks.
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
# Implementation Plan: Text Viewer and Tool Call Fixes
|
||||
|
||||
## Phase 1: Text Viewer Unification
|
||||
- [ ] Task: Update Window Management in `gui_2.py`
|
||||
- [ ] Remove `app._render_window_if_open("Text Viewer", lambda: render_text_viewer_window(app))` from `render_main_interface`.
|
||||
- [ ] Add a direct call to `render_text_viewer_window(app)` in `render_main_interface` (e.g., right before or after modals).
|
||||
- [ ] Update `render_text_viewer_window` to use `app.show_windows["Text Viewer"]` for its visibility check and `imgui.begin` state tracking.
|
||||
- [ ] Task: Update State Initialization
|
||||
- [ ] In `src/app_controller.py`, ensure `"Text Viewer": False` is present in `_default_windows`.
|
||||
- [ ] Remove usages of the legacy `app.show_text_viewer` across `gui_2.py` and replace them with `app.show_windows["Text Viewer"] = True`.
|
||||
- [x] Task: Update Window Management in `gui_2.py`
|
||||
- [x] Remove `app._render_window_if_open("Text Viewer", lambda: render_text_viewer_window(app))` from `render_main_interface`.
|
||||
- [x] Add a direct call to `render_text_viewer_window(app)` in `render_main_interface` (e.g., right before or after modals).
|
||||
- [x] Update `render_text_viewer_window` to use `app.show_windows["Text Viewer"]` for its visibility check and `imgui.begin` state tracking.
|
||||
- [x] Task: Update State Initialization
|
||||
- [x] In `src/app_controller.py`, ensure `"Text Viewer": False` is present in `_default_windows`.
|
||||
- [x] Remove usages of the legacy `app.show_text_viewer` across `gui_2.py` and replace them with `app.show_windows["Text Viewer"] = True`.
|
||||
|
||||
## Phase 2: Tool Call Row Interactivity
|
||||
- [ ] Task: Refactor Row Rendering
|
||||
- [ ] In `_render_tool_calls_panel` (or `render_tool_calls_panel`), modify the first column (`#` index) rendering to include an `imgui.selectable(..., span_all_columns=True)`.
|
||||
- [ ] Attach the `is_item_clicked()` logic to this selectable to populate `text_viewer_content` and set `app.show_windows["Text Viewer"] = True`.
|
||||
- [x] Task: Refactor Row Rendering
|
||||
- [x] In `_render_tool_calls_panel` (or `render_tool_calls_panel`), modify the first column (`#` index) rendering to include an `imgui.selectable(..., span_all_columns=True)`.
|
||||
- [x] Attach the `is_item_clicked()` logic to this selectable to populate `text_viewer_content` and set `app.show_windows["Text Viewer"] = True`.
|
||||
|
||||
## Phase 3: Verification
|
||||
- [ ] Task: Manual Verification
|
||||
- [ ] Trigger a text viewer opening (e.g., via a `[+]` button) and attempt to dock it. Verify it remains stable.
|
||||
- [ ] Click a row in the Tool Calls panel and verify the detail window opens.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 3: Verification' (Protocol in workflow.md)
|
||||
- [x] Task: Manual Verification
|
||||
- [x] Trigger a text viewer opening (e.g., via a `[+]` button) and attempt to dock it. Verify it remains stable.
|
||||
- [x] Click a row in the Tool Calls panel and verify the detail window opens.
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 3: Verification' (Protocol in workflow.md)
|
||||
Reference in New Issue
Block a user