fix(gui): Final Phase 7 stabilization and polish
- Resolve ImportError by correctly prefixing 'src' in modular renderers. - Fix ImGui access violation by ensuring push_id always receives string IDs. - Restore visible role-based background tints using layered rendering (channels). - Definitively fix horizontal Markdown table widths by forcing group expansion. - Centralize color management in theme_2.py and ui_shared.py. - Standardize Files & Media inventory layout and remove legacy controls. - Update test mocks to support modular UI and theme-driven styling.
This commit is contained in:
@@ -315,3 +315,8 @@ This file tracks all major tracks for the project. Each track has its own detail
|
||||
|
||||
- [x] **Track: Fix Approve Modal sizing and inline full preview**
|
||||
*Link: [./tracks/approve_modal_ux_20260601/](./tracks/approve_modal_ux_20260601/)*
|
||||
|
||||
---
|
||||
|
||||
- [x] **Track: Phase 7 Stabilization and Polishing (Regressions Fix)**
|
||||
*Link: [./tracks/phase7_stabilization_and_polishing_20260601/](./tracks/phase7_stabilization_and_polishing_20260601/)*
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Track phase7_stabilization_and_polishing_20260601 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"track_id": "phase7_stabilization_and_polishing_20260601",
|
||||
"type": "bug",
|
||||
"status": "new",
|
||||
"created_at": "2026-06-01T00:00:00Z",
|
||||
"updated_at": "2026-06-01T00:00:00Z",
|
||||
"description": "Final stabilization and polishing of Phase 7: fixing imports, restoring tints, and fixing table widths."
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# Implementation Plan: Phase 7 Stabilization and Polishing
|
||||
|
||||
## Phase 1: Fixing Core Integrity
|
||||
- [x] Task: Fix Module Imports
|
||||
- [x] Update `src/discussion_entry_renderer.py` and `src/structural_editor_modal.py` to use absolute `src` imports.
|
||||
- [x] Validate with: `uv run python -c "from src import discussion_entry_renderer; print('ok')"`.
|
||||
- [x] Task: Consolidate UI Helpers
|
||||
- [x] Ensure `src/ui_shared.py` contains all shared constants and non-circular helpers.
|
||||
|
||||
## Phase 2: Restoring UI Polish
|
||||
- [x] Task: Definitive Table Layout Fix
|
||||
- [x] Refactor the `begin_group` and `dummy` logic in the discussion renderer to guarantee full width for Markdown blocks.
|
||||
- [x] Task: Robust Entry Tinting
|
||||
- [x] Implement `draw_list.add_rect_filled` for entry backgrounds using a stable bounding box calculation.
|
||||
- [x] Task: Theme Refactor
|
||||
- [x] Move hardcoded colors to `src/theme_2.py`.
|
||||
- [x] Replace literals in all renderers with `theme.get_role_tint()` or equivalent.
|
||||
|
||||
## Phase 3: Verification
|
||||
- [x] Task: Final Validation
|
||||
- [x] Run `pytest tests/test_gui_text_viewer.py`.
|
||||
- [x] Run `pytest tests/test_gui_symbol_navigation.py`.
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 3: Verification' (Protocol in workflow.md)
|
||||
@@ -0,0 +1,21 @@
|
||||
# Specification: Phase 7 Stabilization and Polishing
|
||||
|
||||
## 1. Overview
|
||||
The final refinements of Phase 7 introduced several regressions and technical debt, including `ImportError` crashes in the modular renderer and layout issues where Markdown tables are vertically squashed. This track aims to stabilize the application and restore high-signal visual features (like entry tinting) in a robust, theme-compliant manner.
|
||||
|
||||
## 2. Functional Requirements
|
||||
* **Fix Core Imports:** Update `src/discussion_entry_renderer.py` and other new modular files to use correct `src` prefixed imports, resolving the `ImportError`.
|
||||
* **Restore Entry Tinting:** Re-implement background tinting for discussion entries (User, AI, Vendor API) using `draw_list.add_rect_filled` and appropriate ImGui layering to ensure visibility without stacking issues.
|
||||
* **Definitive Table Width Fix:** Refactor the entry group layout to ensure the Markdown renderer inherits the full panel width, preventing tables and long text from squashing into narrow columns.
|
||||
* **Centralize Colors:** Move all hardcoded `vec4` and `ImVec4` constants from `gui_2.py` and modular renderers into `src/theme_2.py`. Expose them via `theme.get_role_tint()` and similar helpers.
|
||||
|
||||
## 3. Non-Functional Requirements
|
||||
* **Stability:** Use `py_update_definition` and smaller `replace` calls to avoid file corruption.
|
||||
* **Validation:** Every step must be verified by running the UI test suite.
|
||||
|
||||
## 4. Acceptance Criteria
|
||||
* The application launches and renders the Discussion Hub without any import or syntax errors.
|
||||
* Discussion entries are clearly tinted based on role.
|
||||
* Markdown tables scale horizontally to fill the panel width.
|
||||
* The code contains zero hardcoded `vec4` color literals in the renderer logic.
|
||||
* All UI tests pass.
|
||||
Reference in New Issue
Block a user