2.1 KiB
2.1 KiB
Specification: Phase 7 Monolithic Stabilization
1. Current State Audit
- 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 causingImportErrorandaccess violationcrashes in unit tests due to mock patching limits. - Markdown Tables: Content is vertically squashed because the
begin_groupwidth is determined by small header buttons, not the full panel. - MiniMax Support:
run_discussion_compressionexists but may have routing nuances or base URL mismatches with the M3 model.
2. Functional Requirements
- Monolithic Restoration: Move
render_discussion_entry,render_discussion_entry_read_mode, andrender_thinking_traceback intosrc/gui_2.py. Removesrc/discussion_entry_renderer.py. - Definitive Docking Fix: Standardize the Text Viewer ID to
###Text_Viewer_Unifiedacross all GUI and state logic. Ensure it is never called via_render_window_if_open. - Full-Width Markdown: Implement a dummy horizontal expansion in the monolithic
render_discussion_entryto ensure tables and text blocks utilize the full panel width. - Theme Integration: Move all
vec4color literals from rendering functions intosrc/theme_2.py. Expose them viatheme.get_role_tint()andtheme.get_color(name). - Stable ID Stack: Ensure
src/imgui_scopes.pyuses explicit string conversion for all IDs to prevent memory corruption innanobind.
3. Non-Functional Requirements
- Incremental TDD: Every task MUST have a corresponding failing test in
tests/before implementation. - MMA Delegation: All code changes must be performed by Tier 3 Workers via
mma_exec.py.
4. Acceptance Criteria
- Application launches and renders without any
ImportError. - Text Viewer docks reliably without flickering or duplication.
- Markdown tables are full-width and readable.
- All existing GUI unit tests pass.