From ff849e7990e10bbddab0b7e206c56e9b4f1ec3da Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 2 Jun 2026 00:43:23 -0400 Subject: [PATCH] chore(conductor): Add new track 'approve_modal_ux_20260601' --- conductor/tracks.md | 7 ++++- .../tracks/approve_modal_ux_20260601/index.md | 5 ++++ .../approve_modal_ux_20260601/metadata.json | 8 +++++ .../tracks/approve_modal_ux_20260601/plan.md | 17 +++++++++++ .../tracks/approve_modal_ux_20260601/spec.md | 16 ++++++++++ .../context_composition_ux_20260601/plan.md | 30 +++++++++---------- src/gui_2.py | 2 +- 7 files changed, 68 insertions(+), 17 deletions(-) create mode 100644 conductor/tracks/approve_modal_ux_20260601/index.md create mode 100644 conductor/tracks/approve_modal_ux_20260601/metadata.json create mode 100644 conductor/tracks/approve_modal_ux_20260601/plan.md create mode 100644 conductor/tracks/approve_modal_ux_20260601/spec.md diff --git a/conductor/tracks.md b/conductor/tracks.md index 5a7d7bae..1967a8d6 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -298,7 +298,7 @@ This file tracks all major tracks for the project. Each track has its own detail --- -- [~] **Track: UX Refinements for Context Composition and Discussion Entries** +- [x] **Track: UX Refinements for Context Composition and Discussion Entries** *Link: [./tracks/context_composition_ux_20260601/](./tracks/context_composition_ux_20260601/)* --- @@ -310,3 +310,8 @@ This file tracks all major tracks for the project. Each track has its own detail - [ ] **Track: Add per-response token metrics and AI-assisted history compression** *Link: [./tracks/discussion_metrics_and_compression_20260601/](./tracks/discussion_metrics_and_compression_20260601/)* + +--- + +- [ ] **Track: Fix Approve Modal sizing and inline full preview** +*Link: [./tracks/approve_modal_ux_20260601/](./tracks/approve_modal_ux_20260601/)* diff --git a/conductor/tracks/approve_modal_ux_20260601/index.md b/conductor/tracks/approve_modal_ux_20260601/index.md new file mode 100644 index 00000000..3976ce1b --- /dev/null +++ b/conductor/tracks/approve_modal_ux_20260601/index.md @@ -0,0 +1,5 @@ +# Track approve_modal_ux_20260601 Context + +- [Specification](./spec.md) +- [Implementation Plan](./plan.md) +- [Metadata](./metadata.json) \ No newline at end of file diff --git a/conductor/tracks/approve_modal_ux_20260601/metadata.json b/conductor/tracks/approve_modal_ux_20260601/metadata.json new file mode 100644 index 00000000..47d8904b --- /dev/null +++ b/conductor/tracks/approve_modal_ux_20260601/metadata.json @@ -0,0 +1,8 @@ +{ + "track_id": "approve_modal_ux_20260601", + "type": "bug", + "status": "new", + "created_at": "2026-06-01T00:00:00Z", + "updated_at": "2026-06-01T00:00:00Z", + "description": "Fix Approve Modal sizing and inline full preview" +} \ No newline at end of file diff --git a/conductor/tracks/approve_modal_ux_20260601/plan.md b/conductor/tracks/approve_modal_ux_20260601/plan.md new file mode 100644 index 00000000..dc551c0b --- /dev/null +++ b/conductor/tracks/approve_modal_ux_20260601/plan.md @@ -0,0 +1,17 @@ +# Implementation Plan: Approve Modal UX Fixes + +## Phase 1: Modal Layout Updates +- [ ] Task: Make Modal Resizable + - [ ] In `src/gui_2.py` (`render_approve_script_modal`), set `imgui.set_next_window_size(imgui.ImVec2(800, 600), imgui.Cond_.first_use_ever)`. + - [ ] Change `imgui.WindowFlags_.always_auto_resize` to `0` in `imgui.begin_popup_modal`. +- [ ] Task: Fix Full Preview and Input Height + - [ ] Add `ui_approve_modal_preview = False` to `App.__init__`. + - [ ] Replace `app.show_windows["Text Viewer"]` checkbox logic in `render_approve_script_modal` with `app.ui_approve_modal_preview`. + - [ ] When `app.ui_approve_modal_preview` is True, render the script in a read-only child or using `markdown_helper`. + - [ ] When False, set the `imgui.input_text_multiline` height to dynamically fill the remaining space (`imgui.ImVec2(-1, -40)` or similar). + +## Phase 2: Verification +- [ ] Task: Verification + - [ ] Trigger a script approval and resize the modal. + - [ ] Toggle "Show Full Preview" and ensure it renders within the modal safely. +- [ ] Task: Conductor - User Manual Verification 'Phase 2: Verification' (Protocol in workflow.md) \ No newline at end of file diff --git a/conductor/tracks/approve_modal_ux_20260601/spec.md b/conductor/tracks/approve_modal_ux_20260601/spec.md new file mode 100644 index 00000000..ad6a4391 --- /dev/null +++ b/conductor/tracks/approve_modal_ux_20260601/spec.md @@ -0,0 +1,16 @@ +# Specification: Approve Modal UX Fixes + +## 1. Overview +The "Approve PowerShell Command" modal is currently too small and cannot be resized. Additionally, the "Show Full Preview" option triggers the external "Text Viewer" window, which cannot be interacted with because the modal blocks all background UI inputs. + +## 2. Functional Requirements +* **Resizable Modal:** The modal must allow user resizing and should have a larger default minimum size. +* **Inline Preview:** The "Show Full Preview" option must render the full script *inside* the modal itself (e.g., as a read-only scrollable child or markdown block), rather than triggering an external window. +* **Responsive Input:** The script input text area should expand to fill the available vertical space of the modal, rather than being fixed to 200px. + +## 3. Non-Functional Requirements +* The modal must continue to reliably block the execution thread until the user approves or rejects the script. + +## 4. Acceptance Criteria +* The modal can be resized by dragging the corners. +* Clicking "Show Full Preview" toggles an inline preview without locking the UI. \ No newline at end of file diff --git a/conductor/tracks/context_composition_ux_20260601/plan.md b/conductor/tracks/context_composition_ux_20260601/plan.md index 02c61a5c..ca48b4a4 100644 --- a/conductor/tracks/context_composition_ux_20260601/plan.md +++ b/conductor/tracks/context_composition_ux_20260601/plan.md @@ -1,22 +1,22 @@ # Implementation Plan: Context Composition & UX Refinements ## Phase 1: Panel Cleanup and Addition -- [ ] Task: Clean up Files & Media Panel - - [ ] In `src/gui_2.py`, locate `_render_files_panel`. Remove the `imgui.checkbox` and `imgui.combo` (view mode) logic for each file row. - - [ ] Replace them with a simple `imgui.text` for the path, and optionally a `[+]` button to quickly add the file to the active context composition if it isn't already present. -- [ ] Task: Implement Add File Modal - - [ ] Add state `app.show_add_context_file_modal = False` to `App.__init__`. - - [ ] In `render_context_composition_panel`, update the `[+ Add File]` button to set `app.show_add_context_file_modal = True`. - - [ ] Create `render_add_context_file_modal(app: App)` and add it to `render_context_modals`. It should iterate over `app.files`, filter out those already in `app.context_files`, and provide clickable rows to append them to `app.context_files`. +- [x] Task: Clean up Files & Media Panel + - [x] In `src/gui_2.py`, locate `_render_files_panel`. Remove the `imgui.checkbox` and `imgui.combo` (view mode) logic for each file row. + - [x] Replace them with a simple `imgui.text` for the path, and optionally a `[+]` button to quickly add the file to the active context composition if it isn't already present. +- [x] Task: Implement Add File Modal + - [x] Add state `app.show_add_context_file_modal = False` to `App.__init__`. + - [x] In `render_context_composition_panel`, update the `[+ Add File]` button to set `app.show_add_context_file_modal = True`. + - [x] Create `render_add_context_file_modal(app: App)` and add it to `render_context_modals`. It should iterate over `app.files`, filter out those already in `app.context_files`, and provide clickable rows to append them to `app.context_files`. ## Phase 2: Discussion Tinting -- [ ] Task: Tint Discussion Entries - - [ ] In `render_discussion_entry`, apply `imscope.style_color(imgui.Col_.child_bg, ...)` based on `entry["role"]`. - - [ ] Define standard tints (e.g., `vec4(30, 40, 50, 255)` for User, `vec4(40, 30, 50, 255)` for AI, `vec4(20, 20, 20, 255)` for System/Context). +- [x] Task: Tint Discussion Entries + - [x] In `render_discussion_entry`, apply `imscope.style_color(imgui.Col_.child_bg, ...)` based on `entry["role"]`. + - [x] Define standard tints (e.g., `vec4(30, 40, 50, 255)` for User, `vec4(40, 30, 50, 255)` for AI, `vec4(20, 20, 20, 255)` for System/Context). ## Phase 3: Verification -- [ ] Task: Verification - - [ ] Verify Files & Media is clean. - - [ ] Verify Add File modal works and successfully moves a file into the composition. - - [ ] Verify discussion entries are correctly tinted based on role. -- [ ] Task: Conductor - User Manual Verification 'Phase 3: Verification' (Protocol in workflow.md) \ No newline at end of file +- [x] Task: Verification + - [x] Verify Files & Media is clean. + - [x] Verify Add File modal works and successfully moves a file into the composition. + - [x] Verify discussion entries are correctly tinted based on role. +- [x] Task: Conductor - User Manual Verification 'Phase 3: Verification' (Protocol in workflow.md) \ No newline at end of file diff --git a/src/gui_2.py b/src/gui_2.py index 52fa2e20..386b0075 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -2827,7 +2827,7 @@ def render_context_batch_actions(app: App, total_lines: int, total_ast: int) -> imgui.same_line() if imgui.button("Unsel All##unselall"): app.ui_selected_context_files.clear() imgui.same_line() - if imgui.button("Add Files"): imgui.open_popup("Select Context Files") + if imgui.button("Add Files##add_btn"): imgui.open_popup("Select Context Files") imgui.same_line() if imgui.button("Add All##addall"): context_paths = {f.path if hasattr(f, "path") else str(f) for f in app.context_files}