diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-24 06:44:45 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-24 06:44:45 -0400 |
| commit | 212e02c0fde0ccdbcabb6d023544cadb0e67f1f3 (patch) | |
| tree | ca8d1b6f5b728c95cde87cd56434c0212966eb21 /todo.org | |
| parent | 4e1401d1499be3d24df78edd97310d200e719e10 (diff) | |
| download | dotemacs-212e02c0fde0ccdbcabb6d023544cadb0e67f1f3.tar.gz dotemacs-212e02c0fde0ccdbcabb6d023544cadb0e67f1f3.zip | |
chore(todo): close ai-term wrap-teardown task, file end-to-end VERIFY
Close the task with the three functions shipped and unit-verified, and file the tmux/shutdown side effects and both-sides workflow run as a VERIFY under Manual testing and validation.
Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
Diffstat (limited to 'todo.org')
| -rw-r--r-- | todo.org | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -58,7 +58,9 @@ Tags are additive. For example, a small wrong-behavior fix can be ** DONE [#B] C-<left>/<right>/<down> wrongly enter terminal copy-mode :bug:quick: CLOSED: [2026-06-24 Wed] Fixed 2026-06-24: per Craig, only C-<up> enters copy-mode now — all other arrows (C-<down>/<left>/<right> and the M-arrows) were dropped from both the ghostel-mode-map binding and ghostel-keymap-exceptions in modules/term-config.el, so C-<left>/C-<right> reach the shell as readline word-motion again. Also per Craig: C-<up> pressed while already in copy-mode just moves up — cj/term-copy-mode-up checks tmux pane_in_mode (and ghostel--input-mode without tmux) and skips re-entry, which would otherwise reset the cursor. 6 ERT tests rewritten; byte-compile clean; the live daemon was stripped of the stale bindings/exceptions and reloaded (C-<up> bound + an exception, C-<left> forwarded to the pty). Real-terminal scroll is the VERIFY under Manual testing and validation. -** TODO [#B] ai-term wrap-teardown + shutdown functions :feature: +** DONE [#B] ai-term wrap-teardown + shutdown functions :feature: +CLOSED: [2026-06-24 Wed] +Done 2026-06-24: added the three headless functions to =modules/ai-term.el= per the rulesets contract — =cj/ai-term-quit= (kill aiv- session + agent buffer + restore layout, idempotent), =cj/ai-term-live-count= (integer gate), =cj/ai-term-shutdown-countdown= (gate re-check → abort-able run-at-time countdown → =cj/ai-term-shutdown-command=, a defcustom). Reused the existing kill/close helpers. 13 ERT tests (live-count parsing, quit kill+idempotency, gate-abort/cancel/tick); byte-compile + validate-modules + launch smoke clean; headless contracts verified live in the daemon (live-count→3, quit no-op returns the session name, countdown aborted with sessions live — no shutdown). The tmux/shutdown side effects and the both-sides end-to-end are a VERIFY under Manual testing and validation. Original task body: The .emacs.d half of the rulesets wrap-it-up teardown / shutdown feature. Implement three functions in =modules/ai-term.el=, all callable headlessly via =emacsclient -e= (no interactive frame): =cj/ai-term-quit "<project>"= (teardown a project's aiv- tmux session + buffer + geometry restore), =cj/ai-term-live-count= (integer, the safety gate), =cj/ai-term-shutdown-countdown= (run-at-time timer). Craig's 2026-06-23 decisions: non-destructive qualifier = "with summary"/"and summarize"; countdown is a run-at-time timer (not a tty writer); safety gate uses cj/ai-term-live-count. Lands with the rulesets half (workflow + Stop hook already built/pushed). Spec: =inbox/PROCESSED-2026-06-23-2331-from-rulesets-ai-term-teardown-companion.org= (rulesets proposal: docs/design/2026-06-23-wrap-teardown-shutdown-proposal.org). Own focused session. ** TODO [#C] ai-term multi-LLM support — Claude / Codex / ollama :feature: Allow creating an ai-term that launches any of Claude, Codex, or a local LLM via ollama, switchable at session start. From rulesets/Craig via the roam inbox. Spec note: =inbox/PROCESSED-2026-06-23-2123-from-rulesets-ai-term-multi-llm-support-from-craig.org=. @@ -517,6 +519,21 @@ What we're verifying: the nerd-icons v1 feature reads right end to end. The Pyth - Restart Emacs (the running daemon still has the old darkgoldenrod tint baked into the faces until restart). - In a fresh frame, look at icons in completing-read (find-file), dirvish, the dashboard, and ibuffer. Expected: the legend renders glyphs in their assigned colors and recolor repaints live; after restart, file/dir/buffer icons show nerd-icons' per-filetype multicolor palette driven by the theme (not a uniform darkgoldenrod), and directory icons are yellow. If icons are still uniform or uncolored, capture it and reopen. +*** VERIFY ai-term wrap-teardown + shutdown end-to-end +What we're verifying: the three headless functions drive the rulesets wrap-it-up workflow correctly, including the real tmux/shutdown side effects the ERT tests can't exercise. The .emacs.d functions are in and unit-verified; the rulesets half (workflow + Stop hook) is already built. Test the countdown with a stubbed shutdown command first — do not power off during the check. +#+begin_src emacs-lisp +;; temporarily stub the shutdown so the countdown can't power off: +(setq cj/ai-term-shutdown-command "echo SHUTDOWN-WOULD-FIRE") +#+end_src +- "wrap it up" in an agent: the valediction renders fully, then that agent's buffer + its =aiv-<proj>= session + the claude process are gone and the window layout is restored. +- "wrap it up with summary" / "and summarize": wrap completes but the buffer stays. +- "wrap it up and shutdown" with a second =aiv-*= session alive: it refuses, names the other session, does a normal wrap (no countdown). +- "wrap it up and shutdown" as the sole session: the echo area counts 10→1 one per second; press C-g mid-count and confirm "Shutdown cancelled."; then let one run to zero and confirm it would fire the (stubbed) command. +#+begin_src emacs-lisp +;; restore the real command when done: +(custom-reevaluate-setting 'cj/ai-term-shutdown-command) +#+end_src +Expected: teardown removes exactly the right session/buffer and restores layout; the with-summary variants keep the buffer; the multi-session shutdown refuses; the sole-session countdown renders, cancels on C-g, and fires only at zero. If any step misbehaves, capture it and reopen. Once the stubbed run looks right, a single real shutdown test confirms the live path. ** PROJECT [#A] Theme-Studio Open Work Parent grouping the open theme-studio / theming issues; close each child independently. |
