Compare commits

...

14 Commits

Author SHA1 Message Date
Ed_
8ea636147e conductor(plan): Mark phase 'Phase 3 - Token Budget Layout Fix' as complete [0d081a2] 2026-03-02 15:55:53 -05:00
Ed_
0d081a28c5 conductor(checkpoint): Checkpoint end of Phase 3 — feature_bleed_cleanup_20260302
Phase 3: Token Budget Layout Fix
- Removed 4 redundant lines from _render_provider_panel (double labels + embedded call)
- Added collapsing_header('Token Budget') to AI Settings after 'System Prompts'
- 32 tests passed, import clean
- Token Budget header verified by user
2026-03-02 15:55:34 -05:00
Ed_
35abc265e9 conductor(plan): Mark task 3.4 complete — Token Budget collapsing header verified 2026-03-02 15:55:28 -05:00
Ed_
5180038090 conductor(plan): Mark task 3.3 complete — 32 passed 2026-03-02 15:51:10 -05:00
Ed_
bd3d0e77db conductor(plan): Mark tasks 3.1-3.2 complete, begin 3.3 — 6097368 2026-03-02 15:50:27 -05:00
Ed_
60973680a8 fix(bleed): fix token budget layout — own collapsing header in AI Settings
Phase 3 changes:
- _render_provider_panel: removed 4 redundant lines (2x 'Token Budget' labels,
  separator, embedded _render_token_budget_panel call)
- _gui_func AI Settings: added collapsing_header('Token Budget') section after
  'System Prompts', calling _render_token_budget_panel cleanly
AI Settings now has three independent collapsing sections.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 15:49:51 -05:00
Ed_
97792e7fff conductor(plan): Mark phase 'Phase 2 - Menu Bar Consolidation' as complete [15fd786] 2026-03-02 15:44:11 -05:00
Ed_
15fd7862b1 conductor(checkpoint): Checkpoint end of Phase 2 — feature_bleed_cleanup_20260302
Phase 2: Menu Bar Consolidation
- Deleted dead begin_main_menu_bar() block (24 lines, always-False in HelloImGui)
- Added 'manual slop' > Quit menu to live _show_menus using runner_params.app_shall_exit
- 32 tests passed, import clean
- Quit menu verified by user
2026-03-02 15:43:55 -05:00
Ed_
b96405aaa3 conductor(plan): Mark task 2.4 complete — Quit menu verified by user 2026-03-02 15:43:47 -05:00
Ed_
e6e8298025 conductor(plan): Mark task 2.3 complete — 32 passed 2026-03-02 15:42:13 -05:00
Ed_
acd7c05977 conductor(plan): Mark task 2.2 complete, begin 2.3 — 340f44e 2026-03-02 15:41:34 -05:00
Ed_
340f44e4bf feat(bleed): add working Quit to _show_menus via runner_params.app_shall_exit
Adds 'manual slop' menu before 'Windows' in the live HelloImGui menubar callback.
Quit sets self.runner_params.app_shall_exit = True — the correct HelloImGui API.
Previously the only quit path was the window close button.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 15:41:12 -05:00
Ed_
cb5f328da3 conductor(plan): Mark task 2.1 complete, begin 2.2 — b0f5a5c 2026-03-02 15:39:41 -05:00
Ed_
b0f5a5c8d3 fix(bleed): remove dead begin_main_menu_bar() block from _gui_func (lines 1674-1697)
HelloImGui commits the menubar before invoking _gui_func, so begin_main_menu_bar()
always returned False. The 24-line block (Quit, View, Project menus) never executed.
Also removes the misaligned '# ---- Menubar' comment and dead '# --- Hubs ---' comment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 15:39:19 -05:00
2 changed files with 16 additions and 38 deletions

View File

@@ -29,16 +29,16 @@ Focus: Delete the two confirmed dead code blocks — no behavior change, pure de
---
## Phase 2: Menu Bar Consolidation
## Phase 2: Menu Bar Consolidation [checkpoint: 15fd786]
Focus: Remove the dead inline menubar block and add a working Quit item to `_show_menus`.
- [ ] Task 2.1: Delete the dead `begin_main_menu_bar()` block from `_gui_func`.
- [x] Task 2.1: Delete the dead `begin_main_menu_bar()` block from `_gui_func`. b0f5a5c
- **Location**: `gui_2.py` lines 1679-1705 (the comment `# ---- Menubar` through `imgui.end_main_menu_bar()`). Use `get_file_slice(1676, 1712)` to confirm exact boundaries before editing.
- **What**: Delete the `# ---- Menubar` comment line and the entire `if imgui.begin_main_menu_bar(): ... imgui.end_main_menu_bar()` block (~27 lines total). The `# --- Hubs ---` comment and hub rendering that follows must be preserved.
- **How**: Use `set_file_slice` to replace lines 1679-1705 with a single blank line.
- **Verify**: `grep -n "begin_main_menu_bar" gui_2.py` returns 0 hits.
- [ ] Task 2.2: Add working "Quit" to `_show_menus`.
- [x] Task 2.2: Add working "Quit" to `_show_menus`. 340f44e
- **Location**: `gui_2.py` `_show_menus` method (lines 1620-1647 — confirm with `py_get_definition`).
- **What**: Before the existing `if imgui.begin_menu("Windows"):` line, insert:
```python
@@ -51,20 +51,20 @@ Focus: Remove the dead inline menubar block and add a working Quit item to `_sho
- **How**: Use `set_file_slice` or `Edit` to insert the block before the "Windows" menu.
- **Verify**: Launch app, confirm "manual slop" > "Quit" appears in menubar and clicking it closes the app cleanly.
- [ ] Task 2.3: Write/run tests.
- [x] Task 2.3: Write/run tests. acd7c05
- Run `uv run pytest tests/ -x -q`.
- [ ] Task 2.4: Conductor — User Manual Verification
- [x] Task 2.4: Conductor — User Manual Verification
- Launch app. Confirm menubar has: "manual slop" (with Quit), "Windows", "Project".
- Confirm "View" menu is gone (was dead duplicate of "Windows").
- Confirm Quit closes the app.
---
## Phase 3: Token Budget Layout Fix
## Phase 3: Token Budget Layout Fix [checkpoint: 0d081a2]
Focus: Give the token budget panel its own collapsing header in AI Settings; remove the double label from the provider panel.
- [ ] Task 3.1: Remove the double label + embedded call from `_render_provider_panel`.
- [x] Task 3.1: Remove the double label + embedded call from `_render_provider_panel`. 6097368
- **Location**: `gui_2.py` `_render_provider_panel` (lines ~2687-2746 — use `py_get_definition` to confirm). The block to remove is:
```python
imgui.text("Token Budget:")
@@ -77,7 +77,7 @@ Focus: Give the token budget panel its own collapsing header in AI Settings; rem
- **How**: Use `Edit` with `old_string` set to those exact 4 lines.
- **Verify**: `_render_provider_panel` ends with the `if self._gemini_cache_text:` block and no "Token Budget" text labels.
- [ ] Task 3.2: Add `collapsing_header("Token Budget")` to AI Settings in `_gui_func`.
- [x] Task 3.2: Add `collapsing_header("Token Budget")` to AI Settings in `_gui_func`. 6097368
- **Location**: `gui_2.py` `_gui_func`, AI Settings window block (currently lines ~1719-1723 — `get_file_slice(1715, 1730)` to confirm). Current content:
```python
if imgui.collapsing_header("Provider & Model"):
@@ -93,10 +93,10 @@ Focus: Give the token budget panel its own collapsing header in AI Settings; rem
- **How**: Use `Edit` to insert after the `_render_system_prompts_panel()` call.
- **Verify**: AI Settings window now shows three collapsing sections: "Provider & Model", "System Prompts", "Token Budget".
- [ ] Task 3.3: Write/run tests.
- [x] Task 3.3: Write/run tests. bd3d0e7
- Run `uv run pytest tests/ -x -q`.
- [ ] Task 3.4: Conductor — User Manual Verification
- [x] Task 3.4: Conductor — User Manual Verification
- Launch app. Open "AI Settings" window.
- Confirm "Token Budget" appears as a collapsing header (expand it — panel renders correctly).
- Confirm "Provider & Model" section no longer shows any "Token Budget" label.

View File

@@ -1613,6 +1613,10 @@ class App:
# ---------------------------------------------------------------- gui
def _show_menus(self) -> None:
if imgui.begin_menu("manual slop"):
if imgui.menu_item("Quit", "Ctrl+Q", False)[0]:
self.runner_params.app_shall_exit = True
imgui.end_menu()
if imgui.begin_menu("Windows"):
for w in self.show_windows.keys():
_, self.show_windows[w] = imgui.menu_item(w, "", self.show_windows[w])
@@ -1671,30 +1675,6 @@ class App:
for tc in self._pending_tool_calls:
self._tool_log.append(tc)
self._pending_tool_calls.clear()
# ---- Menubar
if imgui.begin_main_menu_bar():
if imgui.begin_menu("manual slop"):
if imgui.menu_item("Quit", "Ctrl+Q", False)[0]:
self.should_quit = True
imgui.end_menu()
if imgui.begin_menu("View"):
for name in self.show_windows:
_, self.show_windows[name] = imgui.menu_item(name, "", self.show_windows[name])
imgui.end_menu()
if imgui.begin_menu("Project"):
if imgui.menu_item("Save All", "Ctrl+S", False)[0]:
self._flush_to_project()
self._save_active_project()
self._flush_to_config()
save_config(self.config)
self.ai_status = "config saved"
if imgui.menu_item("Generate MD Only", "", False)[0]:
self._handle_md_only()
if imgui.menu_item("Reset Session", "", False)[0]:
self._handle_reset_session()
imgui.end_menu()
imgui.end_main_menu_bar()
# --- Hubs ---
if self.show_windows.get("Context Hub", False):
exp, self.show_windows["Context Hub"] = imgui.begin("Context Hub", self.show_windows["Context Hub"])
if exp:
@@ -1715,6 +1695,8 @@ class App:
self._render_provider_panel()
if imgui.collapsing_header("System Prompts"):
self._render_system_prompts_panel()
if imgui.collapsing_header("Token Budget"):
self._render_token_budget_panel()
imgui.end()
if self.show_windows.get("MMA Dashboard", False):
exp, self.show_windows["MMA Dashboard"] = imgui.begin("MMA Dashboard", self.show_windows["MMA Dashboard"])
@@ -2733,10 +2715,6 @@ class App:
imgui.text_colored(C_LBL, f" Last Latency: {usage['last_latency']:.2f}s")
if usage["cache_read_input_tokens"]:
imgui.text_colored(C_LBL, f" Cache Read: {usage['cache_read_input_tokens']:,} Creation: {usage['cache_creation_input_tokens']:,}")
imgui.text("Token Budget:")
imgui.separator()
imgui.text("Token Budget")
self._render_token_budget_panel()
if self._gemini_cache_text:
imgui.text_colored(C_SUB, self._gemini_cache_text)