diff --git a/src/gui_2.py b/src/gui_2.py index 6792aea7..68e22eae 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -4252,13 +4252,15 @@ def render_context_modals(app: App) -> None: Dispatches rendering calls to sub-modals relating to context management (empty context warning, file picker, missing files warning, and AST inspector). - State Mutations: - app.show_missing_files_modal (hides/closes missing files modal) - app.ui_new_context_preset_name (resets name on save) - app.controller (saves preset) - SSDL Shape: `[I] -> [I:modals_dispatch]` + + ASCII Layout Map: + Conditionally opens (in order): + [Empty Context Warning modal] + [Select Context Files modal] + [Missing Files Warning modal] + [Structural File Editor modal] """ render_empty_context_modal(app) render_add_context_files_modal(app) @@ -4351,13 +4353,20 @@ def render_context_preview_window(app: App) -> None: Renders the Context Preview window. Automatically refreshes aggregated context previews in the background and renders formatted markdown text. - State Mutations: - app.show_windows["Context Preview"], app.ui_separate_context_preview - app._last_context_preview_state (caches last previewed state to avoid redundant refresh) - app.context_preview_text (updates aggregation result text) - SSDL Shape: `[I:preview_text] -> [B:clipboard_button] => [I:preview_box]` + + ASCII Layout Map: + +---------------------------------------------------------+ + | Context Preview | + +---------------------------------------------------------+ + | [Close] [Copy to Clipboard] | + | +-----------------------------------------------------+ | + | | # Context Composition | | + | | ## src/gui_2.py | | + | | ...aggregated markdown... | | + | +-----------------------------------------------------+ | + +---------------------------------------------------------+ """ _check_auto_refresh_context_preview(app) with imscope.window("Context Preview", app.show_windows["Context Preview"]) as (exp, opened): @@ -5932,11 +5941,23 @@ def render_mma_dashboard(app: App) -> None: """ Main MMA dashboard interface. - State Mutations: - None directly. - SSDL Shape: `[I:focus_selector] -> [I:track_summary] -> [B:epic_planner] -> [I:track_browser] -> [B:global_controls] -> [I:usage_analytics] -> [I:ticket_queue] -> [I:task_dag] => [I:agent_streams]` + + ASCII Layout Map: + +---------------------------------------------------------+ + | [Focus: Tier 1 v] [Agent Streams v] | + | Track: my-track | Status: RUNNING | Cost: $0.0012 | + | Progress: ============================= 67.2% | + | [Plan Epic (Tier 1)] [Conductor Setup >] | + | Track Browser table... | + | [Step Mode] [Pause/Resume] | + | Usage section... | + | Ticket queue table... | + | [Task DAG panel] | + | [Ticket Editor if selected] | + | Agent Streams tabs... | + +---------------------------------------------------------+ """ if app.perf_profiling_enabled: app.perf_monitor.start_component("_render_mma_dashboard") render_mma_focus_selector(app) @@ -6074,11 +6095,17 @@ def render_mma_epic_planner(app: App) -> None: """ Renders the Epic Planning panel for Tier 1 strategy input and planning button. - State Mutations: - app.ui_epic_input (text input) - SSDL Shape: `[I:input_textbox] => [B:plan_button]` + + ASCII Layout Map: + +---------------------------------------------------------+ + | Epic Planning (Tier 1) | + | +-----------------------------------------------------+ | + | | Describe the epic goal... | | + | +-----------------------------------------------------+ | + | [Plan Epic (Tier 1) ] | + +---------------------------------------------------------+ """ imgui.text_colored(C_LBL(), 'Epic Planning (Tier 1)') _, app.ui_epic_input = imgui.input_text_multiline('##epic_input', app.ui_epic_input, imgui.ImVec2(-1, 80)) @@ -6190,12 +6217,19 @@ def render_mma_ticket_editor(app: App) -> None: Renders the ticket detail editor panel, letting the user modify priority, target, and persona override, mark a ticket complete, or delete it. - State Mutations: - app.active_tickets (modifies status/priority/override fields via app._push_mma_state_update) - app.ui_selected_ticket_id - SSDL Shape: `[I:ticket_details] -> [B:combo_selectors] => [B:action_buttons]` + + ASCII Layout Map: + +---------------------------------------------------------+ + | Editing: ticket-042 | + | Status: in_progress | + | Priority: [medium v] | + | Target: src/gui_2.py | + | Depends on: ticket-041, ticket-040 | + | Persona Override: [None v] | + | [Mark Complete] [Delete] | + +---------------------------------------------------------+ """ imgui.separator(); imgui.text_colored(C_VAL(), f"Editing: {app.ui_selected_ticket_id}") ticket = next((t for t in app.active_tickets if str(t.get('id', '')) == app.ui_selected_ticket_id), None) @@ -6220,11 +6254,17 @@ def render_mma_agent_streams(app: App) -> None: """ Renders the agent execution stream panels in a tabbed view for Tier 1, 2, 3, and 4. - State Mutations: - app.show_windows (toggles pop-out sub-windows) - SSDL Shape: `[I] -> [B:tab_bar] => [I:stream_panels]` + + ASCII Layout Map: + +---------------------------------------------------------+ + | [Tier 1] [Tier 2] [Tier 3] [Tier 4] ([Beads]) | + | [ ] Pop Out Tier 1 | + | +-----------------------------------------------------+ | + | | Tier 1: Strategy stream text... | | + | +-----------------------------------------------------+ | + +---------------------------------------------------------+ """ imgui.text("Agent Streams") if imgui.begin_tab_bar("mma_streams_tabs"): @@ -6451,12 +6491,19 @@ def render_task_dag_panel(app: App) -> None: # 4. Task DAG Visualizer Renders the interactive node editor DAG visualizer, mapping ticket relationships and allowing creation or deletion of links. - State Mutations: - app.ui_selected_ticket_id (node selection) - app.active_tickets (updates dependency lists on link creation or deletion) - SSDL Shape: `[I:task_nodes] -> [B:node_editor_canvas] => [I:link_connections]` + + ASCII Layout Map: + +---------------------------------------------------------+ + | Task DAG | + | +-----------------------------------------------------+ | + | | [ticket-041]--->[ticket-042]--->[ticket-043] | | + | | | | | + | | [ticket-040] | | + | +-----------------------------------------------------+ | + | [Add Ticket] | + +---------------------------------------------------------+ """ imgui.text("Task DAG") if (app.active_track or app.active_tickets) and app.node_editor_ctx: