Private
Public Access
0
0
Commit Graph

2447 Commits

Author SHA1 Message Date
ed df7bda6e0d fix(gui): explicit child size for comms_scroll and prior_scroll prevents early clipping
ROOT CAUSE: When child windows used ImVec2(0, 0) for auto-fill, the
child's reported height was unstable inside tab items (especially when
the parent tab was inside a tab_bar inside a window). Result: the
scrollable child rendered with a fixed smaller height, showing only the
first half of the content, with empty space below.

FIX: Use imgui.get_content_region_avail() to compute explicit dimensions
and pass them to begin_child. Now the child fills the full available area
inside the tab content.

- render_comms_history_panel: avail.x, avail.y
- render_prior_session_view: same, plus added entry count indicator next
  to the Exit Prior Session button ({N} entries) for at-a-glance info

Tests:
- test_comms_scroll_no_clipping.py: verifies comms_scroll child uses
  explicit (non-zero) size
- test_prior_session_no_clipping.py: same for prior_scroll child
- test_log_management_first_open.py: minor cleanup
- 42/42 broad regression pass
2026-06-03 13:47:08 -04:00
ed 91fe07f72a fix(markdown): rewrite render() to walk lines (no text replacement)
ROOT CAUSE: src/markdown_helper.py:render() used a 'mask text with placeholders
then re.split' approach that failed when AI responses contained CRLF or when
the same table content appeared twice. The replace() either didn't match
(CRLF mismatch) or only replaced the first occurrence, leaving the second
table as raw markdown for imgui_md to render badly. Result: the same table
appeared twice (bad rendering via imgui_md, good rendering via my new code).

FIX: rewrite render() to walk lines directly. Per-line, decide whether to
buffer for imgui_md, skip into a table renderer, or accumulate into a
code-block renderer. No text replacement needed.

- src/markdown_helper.py: new render() walks lines, handles code fences
  and table intervals inline via lookup dicts.
- src/gui_2.py: render_log_management now calls load_registry() on the
  newly-created LogRegistry when _log_registry was None. Previously the
  initial construction populated an empty table, AND the 'Refresh Registry'
  button was inside the else branch, so users had no way to load data.
  User re-indented the surrounding block during debugging.

Tests:
- test_markdown_render_robust.py: 2 tests (CRLF text, duplicate content)
- test_log_management_first_open.py: 1 test (registry populated on open)
40/40 broad regression pass.
2026-06-03 13:14:49 -04:00
ed 9396154779 fix(gui): Gen+Send and MD Only with empty context no-op silently
ROOT CAUSE: 3 mismatched names in the empty-context warning path:

1. _handle_generate_send set self.show_empty_context_warning_modal = True
   but render_empty_context_modal checks self.show_empty_context_modal.
   The modal never opened.

2. _handle_generate_send / _handle_md_only never set
   self._pending_generation_action, so the modal's 'Proceed Anyway'
   button always saw None and dispatched nothing.

3. After Proceed Anyway, _pending_generation_action was never reset,
   so subsequent empty-context calls would dispatch the wrong action.

FIX:
- gui_2.py:494,501: show_empty_context_warning_modal -> show_empty_context_modal
- gui_2.py:494,501: set _pending_generation_action before showing modal
- gui_2.py:5385: reset _pending_generation_action = None after dispatch

Tests: tests/test_gen_send_empty_context.py (5 cases) covers all 4 dispatch
paths (generate/md_only x proceed/skip) plus the happy path with context.

37/37 regression pass. No new ImGui scope errors (2 pre-existing unrelated).
2026-06-03 12:41:13 -04:00
ed d42f3cce34 conductor(checkpoint): UI Polish track complete 2026-06-03 12:24:51 -04:00
ed 55eb923bd9 feat(files-media): group files by directory + add 'Add Directory' button
- render_files_and_media now wraps the per-file loop in directory groups
  via aggregate.group_files_by_dir + imscope.tree_node_ex (mirrors the
  Context Composition visual style at gui_2.py:3114)
- New 'Add Directory' button next to 'Add Files to Inventory':
  uses filedialog.askdirectory() + os.walk to bulk-import a folder tree
- Button IDs (i, add_f_{i}, rem_f_{i}) preserve global uniqueness via
  file_indices map (regression-safe across the directory wrap)
- Test uses mock button=False, mock filedialog.askopenfilenames/askdirectory
  to avoid opening a real Tk dialog during test run
2026-06-03 12:24:51 -04:00
ed ab54d6b8a8 conductor(checkpoint): Phase 4 complete 2026-06-03 12:12:30 -04:00
ed 3a86407610 feat(ops-hub): add Vendor State tab with quota + context + cache
- New module-level render_vendor_state(app) in gui_2.py
- New 'Vendor State' tab in render_operations_hub tab_bar
- Renders 5 stable metrics: provider_model, context_window, cache, quota, last_error
- Each row: Metric label | Value | State (colored ok/warn/error/info)
- Tooltips via imgui.set_tooltip on the value cell

ImGui scope linter: render_vendor_state OK. Pre-existing 2 errors at lines
2684 and 4994 unrelated to this commit.
2026-06-03 12:12:29 -04:00
ed 7aeed5e01f feat(vendor-state): add vendor_quota/last_error/token_tracker to AppController
- AppController.__init__: public vendor_quota: Dict[str,Any], last_error: Optional[Dict[str,str]], token_tracker: Dict[str,Any]
- set_vendor_quota(provider, remaining_pct, reset_at): public API for ai_client quota paths
- clear_last_error(): reset hook
- _refresh_api_metrics: read vendor_quota and error from payload, populate state

ai_client per-provider quota wire-up deferred to a future track (per-provider
signals differ; this commit establishes the state shape and read path).
2026-06-03 11:53:56 -04:00
ed 375e30e427 feat(vendor-state): add pure aggregator with stable metric keys 2026-06-03 11:31:29 -04:00
ed b155578179 conductor(checkpoint): Phase 3 complete 2026-06-03 11:28:59 -04:00
ed 8fac9c34c9 fix(log): Refresh Registry button now calls load_registry() on the live instance
ROOT CAUSE: gui_2.py:1675 re-instantiated LogRegistry() which opens the TOML
but never called .load_registry() so the table stayed empty.

FIX: in-place load_registry() on the existing instance — preserves in-memory
state (any pending update_session_metadata call) and matches the user's intent
of 'refresh from disk'.
2026-06-03 11:28:36 -04:00
ed e8c9a0d460 conductor(checkpoint): Phase 2 complete 2026-06-03 11:27:25 -04:00
ed d0b06575c7 fix(gui): widen Keep Pairs input (80->140) and switch to drag_int
- src/gui_2.py:3829 set_next_item_width 80 -> 140, input_int -> drag_int
- Tests adapted to mock drag_int alongside input_int (5 test files)
2026-06-03 11:27:04 -04:00
ed 38d1354b9c conductor(checkpoint): Phase 1 complete 2026-06-03 11:11:00 -04:00
ed 79ac9210ef feat(markdown): intercept GFM tables and render via imgui.begin_table 2026-06-03 11:10:30 -04:00
ed f72e72c92c feat(markdown): implement table rendering with imgui.begin_table 2026-06-03 11:08:58 -04:00
ed 4d410c8ff4 feat(markdown): implement GFM table parser 2026-06-03 11:06:03 -04:00
ed 44f631c9a5 test(markdown): add GFM table parser failing tests 2026-06-03 10:59:57 -04:00
ed 11253e8d60 conductor(plan): UI Polish track - 5 phases, design spec + impl plan 2026-06-03 10:29:25 -04:00
ed f0b72494f4 fix(docker): add tk/X11 deps for headless; improve sloppy.py web mode 2026-06-03 10:13:57 -04:00
ed b56b62fa1e feat(docker): convert push script to PowerShell 2026-06-03 09:01:43 -04:00
ed 1208ccd89d docs(docker): add Gitea registry push and pull instructions 2026-06-03 08:48:42 -04:00
ed 08abc9f907 feat(docker): add Gitea registry push script 2026-06-03 08:48:12 -04:00
ed df96c6a4ed test(docker): add Docker Desktop auto-start and detection 2026-06-03 08:33:10 -04:00
ed dd52df7e11 conductor(plan): Mark docker web frontend plan complete 2026-06-03 08:28:22 -04:00
ed 99a84bd683 conductor(checkpoint): Docker & web frontend complete 2026-06-03 08:27:28 -04:00
ed ea3bbbc828 docs(docker): add Unraid deployment guide 2026-06-03 08:26:35 -04:00
ed 7708b76286 test(docker): add opt-in build and container-run tests 2026-06-03 08:25:37 -04:00
ed fa8f473716 test(pytest): add docker marker 2026-06-03 08:24:35 -04:00
ed 36a6874e03 feat(docker): add build and run shell scripts 2026-06-03 08:23:40 -04:00
ed 46c66277b2 feat(docker): add docker-compose.yml for Unraid deployment 2026-06-03 08:23:01 -04:00
ed 1c62e88cbd feat(docker): add Dockerfile and .dockerignore for containerized deployment 2026-06-03 08:22:17 -04:00
ed 067d228d9e feat(sloppy): add --web-host and --web-port args for web mode 2026-06-03 08:20:28 -04:00
ed db177e4494 docs(api): correct endpoint /api/mma_status -> /api/gui/mma_status across docs 2026-06-03 00:56:32 -04:00
ed 6ce119dffe conductor(checkpoint): Fix markdown_helper.py for imgui-bundle >=1.92.801 complete 2026-06-03 00:54:07 -04:00
ed b306f8f609 test(clean-install): use correct endpoint /api/gui/mma_status (not /api/mma_status) 2026-06-03 00:52:08 -04:00
ed 7a34edf605 fixes 2026-06-03 00:47:40 -04:00
ed 79a12d2c3e conductor(tracks): register Clean Install Test track with checkpoint d14ae3b 2026-06-03 00:33:13 -04:00
ed d14ae3bd08 conductor(checkpoint): Clean install test complete 2026-06-03 00:31:55 -04:00
ed d171c18717 test(clean-install): add opt-in clone-and-verify pytest test 2026-06-03 00:30:00 -04:00
ed 573d289941 test(pytest): register clean_install marker for opt-in clone-and-verify test 2026-06-03 00:28:20 -04:00
ed 0309420ba1 conductor(checkpoint): Archive Completed Tracks (2026-05 to 2026-06) complete 2026-06-03 00:19:13 -04:00
ed b87742ecba conductor(tracks): fix 25 broken links in Phase 5/6/Hot Reload sections after archival 2026-06-03 00:17:38 -04:00
ed 56ea316afa conductor(tracks): consolidate 'Earlier Archives' into 'Recent Completed Tracks (2026-05+)' with archive/ links 2026-06-03 00:14:45 -04:00
ed 594f14f943 conductor(archive): move 39 completed tracks (2026-05 to 2026-06) to archive/ 2026-06-03 00:09:52 -04:00
ed 0ffeccc7d3 conductor(tracks): register 4 completed 2026-06-02 tracks with checkpoint SHAs 2026-06-03 00:02:15 -04:00
ed f93dac7d8f conductor(guidelines): add See Also section linking to per-file conventions 2026-06-02 23:53:31 -04:00
ed f03b24eaca conductor(refactor): update OOP tracker with Phase 4 progress and 2026-06-02 log 2026-06-02 23:53:05 -04:00
ed f210d228ec conductor(style): add See Also section linking to per-file pattern demonstrations 2026-06-02 23:51:20 -04:00
ed 7f8a9c4496 conductor(tracks): mark command_palette done, add documentation_refresh track entry 2026-06-02 23:50:34 -04:00