fix(gui): Resolve Text Viewer docking conflict with unified ID
- Update Text Viewer window ID to '###Text_Viewer_Unified'. - Ensures ImGui treats the window as a single stable entity across title changes. - Prevents docking loop glitches.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Specification: Phase 7 Monolithic Stabilization
|
||||
|
||||
## 1. Current State Audit
|
||||
* **Window Management:** `render_text_viewer_window` (gui_2.py:3843) uses ID `###Text_Viewer_Stable`. Call site at line 1226 is direct. Registry key is `"Text Viewer"`.
|
||||
* **Window Management:** `render_text_viewer_window` (gui_2.py:3843) uses ID `###Text_Viewer_Unified`. Call site at line 1226 is direct. Registry key is `"Text Viewer"`.
|
||||
* **Rendering Logic:** Discussion entries are currently delegated to `src/discussion_entry_renderer.py`, which is causing `ImportError` and `access violation` crashes in unit tests due to mock patching limits.
|
||||
* **Markdown Tables:** Content is vertically squashed because the `begin_group` width is determined by small header buttons, not the full panel.
|
||||
* **MiniMax Support:** `run_discussion_compression` exists but may have routing nuances or base URL mismatches with the M3 model.
|
||||
|
||||
+1
-1
@@ -4004,7 +4004,7 @@ def render_text_viewer_window(app: App) -> None:
|
||||
"""Renders the standalone text/code/markdown viewer window."""
|
||||
if not app.show_windows.get("Text Viewer", False): return
|
||||
imgui.set_next_window_size(imgui.ImVec2(900, 700), imgui.Cond_.first_use_ever)
|
||||
expanded, opened = imgui.begin(f"{app.text_viewer_title or 'Text Viewer'}###Text_Viewer_Stable", True, imgui.WindowFlags_.no_collapse)
|
||||
expanded, opened = imgui.begin(f"{app.text_viewer_title or 'Text Viewer'}###Text_Viewer_Unified", True, imgui.WindowFlags_.no_collapse)
|
||||
app.show_windows["Text Viewer"] = bool(opened)
|
||||
if not opened:
|
||||
app.ui_editing_slices_file = None
|
||||
|
||||
@@ -25,7 +25,7 @@ def test_text_viewer_window_id_stability():
|
||||
# Verify imgui.begin was called with the stable ID suffix
|
||||
args, _ = mock_imgui.begin.call_args
|
||||
window_title = args[0]
|
||||
assert "###Text_Viewer_Stable" in window_title
|
||||
assert "###Text_Viewer_Unified" in window_title
|
||||
assert window_title.startswith("Custom Title")
|
||||
|
||||
def test_text_viewer_window_default_title_id_stability():
|
||||
@@ -50,5 +50,5 @@ def test_text_viewer_window_default_title_id_stability():
|
||||
# Verify imgui.begin was called with the stable ID suffix
|
||||
args, _ = mock_imgui.begin.call_args
|
||||
window_title = args[0]
|
||||
assert "###Text_Viewer_Stable" in window_title
|
||||
assert "###Text_Viewer_Unified" in window_title
|
||||
assert window_title.startswith("Text Viewer")
|
||||
|
||||
Reference in New Issue
Block a user