aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-25 08:53:31 -0400
committerCraig Jennings <c@cjennings.net>2026-06-25 08:53:31 -0400
commit3d53f4540a1165fbcce65ec1cdbc96b79c4c4c79 (patch)
treee8caeb214c3dbdb9c8b37175d2e604b3745dda93
parent79cbccb59da539d6cce0f7f67b8efe1844ae4cbd (diff)
downloaddotemacs-3d53f4540a1165fbcce65ec1cdbc96b79c4c4c79.tar.gz
dotemacs-3d53f4540a1165fbcce65ec1cdbc96b79c4c4c79.zip
chore(todo): close ai-term detached-step task, file live VERIFY + collapse-split isolation task
-rw-r--r--todo.org13
1 files changed, 11 insertions, 2 deletions
diff --git a/todo.org b/todo.org
index add8b9c39..fdc0b1fea 100644
--- a/todo.org
+++ b/todo.org
@@ -55,6 +55,8 @@ Tags are additive. For example, a small wrong-behavior fix can be
=:bug:quick:=, and a feature that requires internal restructuring can be
=:feature:refactor:=.
* Emacs Open Work
+** TODO [#C] ai-term test isolation: collapse-split leaks state breaking display-rule :bug:test:
+=tests/test-ai-term--collapse-split.el= leaves window/display state that makes =test-ai-term--display-rule-routes-agent-buffer-to-right= (=tests/test-ai-term--display-rule.el:30=) fail when collapse-split runs before it in the suite. Bisected to those two files: loading just them together reproduces it; display-rule passes in isolation, and pairs cleanly with every other geometry test (default-geometry / reuse-edge-window / single-window-toggle). Both files predate this session and neither uses the 2026-06-25 ai-term-next rework (collapse-split drives =cj/ai-term= the dispatch; display-rule tests the display rule), so it is pre-existing and unrelated to that change — surfaced when the full ai-term suite was run. Ruled out: it is NOT the frame size (stays 80x25), NOT =split-width-threshold= / =split-height-threshold= (stay 160/80), NOT a window parameter on the selected window (all nil after =delete-other-windows=), and forcing =split-width-threshold= low does not restore the directional right-split. So collapse-split's GUI dispatch (=cj/test--call-as-gui #'cj/ai-term=) leaves some deeper =display-buffer-in-direction= state that survives =save-window-excursion= + =delete-other-windows=. Fix direction: instrument what the dispatch mutates (likely in =cj-window-geometry-lib= / =cj-window-toggle-lib=) and restore it in collapse-split's teardown, or have display-rule build its split in a hermetic frame. Until then the full ai-term suite shows this one red.
** TODO [#B] eww User-Agent advice may not inject under Emacs 30 :bug:
The UA-injection advice =my-eww--inject-user-agent= (=modules/eww-config.el:47=) gates on =(derived-mode-p 'eww-mode)= and is an =:around= on =url-retrieve= / =url-retrieve-synchronously=. Its tests (=tests/test-eww-config-user-agent-advice.el=) fail under =make test=: =test-eww-ua-injected-in-eww-buffer= (:21) and =test-eww-ua-replaces-existing-and-keeps-other-headers= (:42) both see no injected UA, because =(derived-mode-p 'eww-mode)= returns nil in the test's temp buffer where the mode is set with a bare =(setq major-mode 'eww-mode)=. Two possibilities: (a) test-only artifact — a bare setq doesn't establish the mode the way =derived-mode-p= now resolves it, so the test should set the mode properly (call =eww-mode=, or set =derived-mode-parent=); or (b) a real Emacs-30 =derived-mode-p= change that means the advice no longer fires in real eww buffers either, so the desktop User-Agent isn't actually sent. Check (b) first: in a live eww page, =M-: (derived-mode-p 'eww-mode)= — if nil, the gate is broken in production (fix to =(eq major-mode 'eww-mode)= or =provided-mode-derived-p=). If only the test is wrong, fix its mode setup. Pre-existing (eww-config + test unchanged this session); surfaced 2026-06-25 running the full suite during the google-keep work. The third test (=test-eww-ua-not-injected-outside-eww=) passes.
** TODO [#B] first f12 doesn't toggle the term window :bug:solo:
@@ -71,6 +73,12 @@ CLOSED: [2026-06-25 Thu]
A recurring event declined for just one occurrence synced out with =:STATUS: accepted= (chime then faithfully showed it). Root cause (diagnosed by a chime session, 2026-06-24): =calendar-sync--apply-single-exception= merged the override's =:attendees= but never re-derived =:status=, so the occurrence kept the series master's accepted status, and =calendar-sync--filter-declined= (which keys off =:status=) didn't drop it. Fix (TDD): in =apply-single-exception=, when overriding =:attendees=, re-derive =:status= via =calendar-sync--find-user-status= against =calendar-sync-user-emails=. Four new tests in =test-calendar-sync--apply-single-exception.el= (declined → "declined"; no-attendee override → inherited intact; accepted override → accepted; override without the user → inherited intact); recurrence + find-user-status + integration suites unchanged. Live-reloaded; a manual re-sync ran clean. The specific 2026-06-24 Arusyak occurrence is past now (its RECURRENCE-ID override aged out of the feed), so the live confirmation lands on the next single-occurrence decline.
** PROJECT [#A] Manual testing and validation
Exercised once the phases above land.
+*** VERIFY ai-term next steps into and attaches a detached session
+What we're verifying: =C-; a n= (or =M-SPC=) cycles into a detached ai-term (alive in tmux, no Emacs buffer) and attaches it, not just live buffers. The pure logic is unit-tested; this is the live attach-on-landing check only Craig can run.
+- Start agents in two projects so two ai-terms exist, then leave one detached (kill its Emacs buffer while the tmux session stays alive, or after an Emacs restart that leaves =aiv-*= sessions running).
+- Confirm one is attached (a live =agent [...]= buffer) and one is detached (its =aiv-= tmux session is alive but has no buffer).
+- Press =C-; a n= repeatedly to cycle through the agents.
+Expected: the rotation includes the detached agent; landing on it recreates its terminal buffer and reattaches the tmux session (its live output appears), instead of skipping it. Order is stable (by buffer name) and wraps after the last.
*** VERIFY Google Keep v1 live setup and first fetch
What we're verifying: read-only v1 fetches real Keep notes and renders =data/keep.org= once the one-time gkeepapi + master-token setup is done. The code and 27 tests (12 Python + 15 ERT) are green; this is the live-credential step only Craig can run.
- Install the client into the interpreter =cj/keep-python= uses: =pip install gkeepapi= (or pipx).
@@ -2931,11 +2939,12 @@ Brainstorm complete 2026-06-22 — validated design at [[file:docs/design/vamp-m
Next: (1) revise the spec to the new direction; (2) spike the risky assumptions (mpd dumb-single-file-player contract; m3u =.desktop= on Hyprland); (3) =/start-work= against the revised spec — pure-helper extraction (review Migration Plan step 1) is the safe first phase. Priority [#C] is a placeholder pending Craig's call.
-** TODO [#C] ai-term: step between running ai-terms even when detached :feature:solo:next:
+** DONE [#C] ai-term: step between running ai-terms even when detached :feature:solo:next:
+CLOSED: [2026-06-25 Thu]
:PROPERTIES:
:LAST_REVIEWED: 2026-06-22
:END:
-The step-to-next-agent family (s-F9 and friends) should cycle to a running ai-term even when that ai-term is currently detached, instead of skipping it. Today the step only lands on attached/visible ai-terms, so a detached-but-running agent gets passed over and there's no keyboard path back to it — re-attach/display it on landing. From the roam inbox.
+Implemented 2026-06-25 (commit 79cbccb5): =cj/ai-term-next= now cycles every active agent (a live buffer OR a live tmux session) keyed on the project dir and ordered by buffer name, and stepping onto a detached one attaches it (=cj/--ai-term-show-or-create= recreates the terminal, which reattaches the session). New pure helpers =cj/--ai-term-next-agent-dir= + =cj/--ai-term-active-agent-dirs= with 10 ERT tests; the live-buffer swap path is unchanged. Live check filed under Manual testing and validation.
** TODO [#C] ai-term: multi-backend (Claude / Codex / local ollama) :feature:
:PROPERTIES: