diff options
Diffstat (limited to 'todo.org')
| -rw-r--r-- | todo.org | 4312 |
1 files changed, 2630 insertions, 1682 deletions
@@ -21,6 +21,17 @@ tests, chores, and features can all be high or low priority. upstream/package tracking, optimizations without current pain, or deferred ideas that should not compete with active maintenance. +The task status (the TODO keyword) tracks where a task sits in its lifecycle. +The active keywords are: +- =TODO= — open, not started. +- =PROJECT= — a top-level task that groups several subtasks; the children are the real work, and the project closes when they do. PROJECT lives only at the top task level (a =**= heading under a section), never at the second level or below. A subtask that itself has children stays =TODO= / =DOING=; it does not become a nested PROJECT. +- =DOING= — actively in progress. +- =WAITING= — blocked on something external (a person, an upstream release). +- =VERIFY= — the code is done; only Craig's hands-on check or a pending answer remains. VERIFY tasks wait on Craig and are never auto-implemented. +- =STALLED= — blocked on an upstream issue outside our control. +- =DELEGATED= — handed to someone else to carry. +The done keywords (after the =|= in the sequence) are =DONE= (completed), =CANCELLED= (abandoned), and =FAILED= (attempted, could not be made to work). + For =PROJECT= headings, use the highest priority of the meaningful child work inside the project. If a project only contains exploration or review, assign the priority by the expected decision value rather than the number of files touched. @@ -44,1089 +55,491 @@ 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 [#B] ai-term adaptive side/bottom window placement :feature:solo: -The ai-term window should dock from whichever edge conserves more screen space, chosen at display time from the frame's aspect ratio: when the frame is wider than it is tall, dock from the right; when it is square or taller than wide, dock from the bottom. Compare the frame's pixel width against its height in the display-buffer rule to pick the edge. - -** TODO [#A] Calibre Open Work +** TODO [#B] Un-pin ghostel from 0.33.0 once upstream fixes #422/#423 :bug: :PROPERTIES: -:LAST_REVIEWED: 2026-06-06 +:LAST_REVIEWED: 2026-06-20 :END: -Parent grouping the open Calibre / ebook-workflow issues; close each child independently. The EPUB reading-width tasks were already resolved (2026-05-12/14). +ghostel is held at 0.33.0 (=ghostel-20260604.2049=, commit 5779a2adceb2) in =modules/term-config.el= to dodge the 0.35.x native-PTY crash. When dakra/ghostel ships a fix for #422 (Linux malloc/signal reentrancy) and #423 (macOS recursive lock), restore =:ensure t= (drop the pin comment) and =package-upgrade ghostel=, then re-run the open-ghostel-in-a-GUI-frame survival check. Watch the two issues for the fixing commit. -*** 2026-06-12 Fri @ 07:34:05 -0500 Calibre bookmark naming ships "Author, Title" from the filename -When I hit m in calibre, I'm making my place in the book with a bookmark. -While sometimes, the books look fine: "The A.B.C. Murders - Agatha Christie.epub" -Sometimes they look not so good: Engines of Logic_ Mathematicians and the O - Martin Davis.pdf or Software Architecture_ The Hard Parts _ Mo - Neal Ford.pdf - -What I would like to do is to have the bookmarks be saved in the following format: - -Author, Title [no extension]. Underscores should be stripped. - -Root cause: in a nov buffer =m= is =bookmark-set= (rebound at calibredb-epub-config.el:311); nov's =nov-bookmark-make-record= names the record =(buffer-name)= -- the EPUB filename. - -Implemented 2026-06-06. Source decision: parse the *filename*, not the embedded EPUB metadata -- under Calibre's "<Title> - <Author>.epub" naming the filename is more complete (the embedded metadata had truncated titles, author-sort "Last, First" forms, and lost punctuation; see the separate metadata-cleanup task). A =:filter-return= advice on =nov-bookmark-make-record= rebuilds the name from the record's filename: split on the last " - " into title/author, restore the colon Calibre sanitized to "_ " (-> ": "), reorder to "Author, Title". Pure helpers =cj/--nov-clean-title= + =cj/--nov-bookmark-name-from-file= in =modules/calibredb-epub-config.el=; 10 ERT tests in =tests/test-calibredb-epub-config--bookmark-name.el=. Live in the daemon. - -Existing bookmarks: the 3 nov bookmarks in =~/sync/org/emacs_bookmarks= were renamed by hand (one-pass, in the daemon + saved; backup at =emacs_bookmarks.bak-2026-06-06=): "Edward Kanterian, Frege: A Guide for the Perplexed", "Agatha Christie, The A.B.C. Murders", "Edward Abbey, The Fool's Progress: An Honest Novel". - -Manual verify filed under the Manual testing and validation parent. - -*** 2026-06-12 Fri @ 07:34:05 -0500 Curated Calibre keybinding menu + docked description shipped -Relocated from the global capture inbox 2026-06-06. Want a discoverable set of keybindings (visible in which-key) for the most frequent calibredb workflows: -- Switch to a library (e.g. Literature), sort by last name, scroll the list. -- Scope/filter the list in place, keeping the current library scope: - - by format (e.g. epubs only) - - by author last name (exact == or ^begins-with some text) - - sort by title, publication date, or group by format -- One key pops up the selected book's description in a bottom-30% buffer, dismissed with q (same display pattern as the signel chat dock). -- RET opens the book in the appropriate viewer. -Survey finding 2026-06-06: calibredb already binds almost all of this in calibredb-search-mode-map (S/L library, g filter [f format, a author, t tag, d date], o sort [t title, a author, p pubdate, f format], RET open) and even ships transient menus (? = calibredb-dispatch, g, o). The real problem was discoverability -- they are top-level single keys (which-key never pops up) and Craig didn't know ? opened a menu. calibredb-quick-look is macOS-only; the detail view (v -> *calibredb-entry*, q quits) is the description but opens full-window. - -Implemented 2026-06-06 in =modules/calibredb-epub-config.el=: -- A curated transient =cj/calibredb-menu= (library switch; filter format/author/reset; sort author/title/pubdate/format; open; describe; H = full calibredb-dispatch) bound to =?= in calibredb-search-mode-map. calibredb's own full dispatch moved to =H=. Defined in the use-package =:config= (needs the elpa transient, which batch doesn't load) -- the "? brings up a curated help menu" convention. -- Bottom-30% description dock: =calibredb-show-entry-switch= -> =pop-to-buffer= + a =display-buffer-alist= rule for =*calibredb-entry*= (display-buffer-at-bottom, height 0.3); =cj/calibredb-describe-at-point= shows the entry without switching focus so q dismisses it. Same pattern as the signel chat dock. -1 ERT test (the describe command; the transient/bindings/dock need the elpa transient + live calibredb, verified in the daemon). Author "begins-with" is covered well enough by g a's completing-read over "Last, First"; a true regex filter was not built. Manual verify filed under the Manual testing and validation parent. - -*** TODO Embed Calibre DB metadata into the EPUB files -Surfaced 2026-06-06 while building the bookmark naming: the metadata embedded in the EPUB files' OPF is worse than Calibre's database metadata. nov reads the embedded OPF and got truncated titles ("Frege" vs the filename's "Frege: A Guide for the Perplexed"), author-sort "Last, First" forms ("Christie, Agatha"), and lost punctuation ("A.B.C." -> "A B C"). The filenames (from Calibre's curated DB) are the good copy. Fix on the Calibre side: select all (or by library), run "Edit metadata -> Embed metadata into book files" so the DB metadata is written into each EPUB's OPF. Consider auditing author vs author_sort first. After embedding, the in-file metadata matches the library and any tool reading the files (nov, other readers, re-imports) gets the good data. Not an Emacs task; Calibre-side bulk maintenance. - -** TODO [#A] Lock screen silently fails — slock is X11-only :bug:quick: -=modules/system-commands.el:105= binds the lockscreen command to =slock=, which can't grab a Wayland session; =cj/system-cmd= launches it detached with output silenced, so C-; ! l does nothing and the screen never locks. Security issue: Craig believes the screen locks when it doesn't. Fix: =hyprlock= (or =swaylock=), ideally resolved per session type via =env-wayland-p= so an X11 fallback survives for other machines. From the 2026-06 config audit. - -** TODO [#A] mu4e: cmail can't trash, no account can refile :bug:quick:solo: -=modules/mail-config.el:217-220= — the cmail context (primary account) sets only drafts/sent, so D falls back to default "/trash" which doesn't exist under ~/.mail (=/cmail/Trash= does); and NO context sets =mu4e-refile-folder=, so r targets nonexistent "/archive" everywhere. Accepting mu4e's offer to create the maildir strands mail in a directory mbsync never syncs — messages silently vanish from the server's view. Add =mu4e-trash-folder= to cmail + per-context =mu4e-refile-folder=. From the 2026-06 config audit. - -** TODO [#A] calendar-sync drops final occurrences and resurrects cancelled meetings :bug:solo: -RFC 5545 conformance holes in =modules/calendar-sync.el=, all agenda-visible (from the 2026-06 config audit): -- =:973,1015,1024= — UNTIL treated as exclusive (strict =calendar-sync--before-date-p=); RFC and Google make it inclusive, so the LAST instance of every UNTIL-bounded series vanishes. Tests assert loose count ranges, so it's unpinned. Allow equality. -- =:578= — comma-separated EXDATE lists (Google emits them) never parse; the exclusion drops silently and cancelled occurrences reappear on the agenda. Split on "," before parsing; no comma-case test exists. -- =:902= — timed events without DTEND render as all-day (time lost); multi-day all-day spans collapse to one day (end date unused, exclusive-DTEND unhandled). Emit start-time-only stamps and org date ranges. +archsetup automated the zig 0.15.2 pin (managed =install_zig_pin= step, sha-verified, unit-tested). If the un-pinned ghostel bumps its ghostty dependency to a newer zig, send archsetup the new version + sha256 so it bumps its =ZIG_VERSION= / =ZIG_SHA256= constants (=inbox-send archsetup=). -** TODO [#A] Native compilation disabled config-wide; GC at stock 800KB :bug: -From the 2026-06 config audit (verified against the live daemon). =early-init.el:69= =(setq native-comp-deferred-compilation nil)= — the obsolete alias of =native-comp-jit-compilation= — turns JIT native compilation OFF entirely, not "synchronous" as the comment claims: 19 .eln files exist for 184 packages, ~100 of 121 modules run interpreted for the daemon's lifetime, and system-defaults.el:42-44's speed-3/8-jobs/always-compile settings are dead. Plus =early-init.el:113-116= restores =gc-cons-threshold= to the captured STOCK default (800000, verified) post-startup — frequent small GC pauses forever. Together these plausibly feed the filed org-capture 15-20s task more than anything in the capture path itself. Actions: retest the old "Selecting deleted buffer" race on 30.2 and re-enable JIT (or AOT sweep); set a deliberate 16-64MB threshold (or gcmh). Check both before burning time on the capture-perf debug task. - -** TODO [#A] Global yes-or-no-p fset defeats every strong confirmation :bug:quick: -=modules/system-defaults.el:203= =(fset 'yes-or-no-p 'y-or-n-p)= — verified live. Several modules deliberately chose yes-or-no-p as the strong tier for irreversible actions: shutdown/reboot (=system-commands.el:74=, whose comment explicitly says "so a stray RET/space can't trigger them"), "permanently destroy files" (=dwim-shell-config.el:804=), file overwrites (=custom-buffer-file.el:159,199=, =music-config.el:374=). The fset makes all of them single-keystroke — the two-tier design is dead. Drop the fset, or provide a real =cj/confirm-strong= (typed "yes") for the irreversible set. From the 2026-06 config audit. - -** TODO [#B] theme-studio preview face mislinks (org, erc, flycheck) :bug:quick:solo: +** VERIFY [#B] calendar-sync robustness: atomic writes, curl --fail, zero-event false errors :bug:solo:next: :PROPERTIES: -:LAST_REVIEWED: 2026-06-11 +:LAST_REVIEWED: 2026-06-20 :END: -Found by Craig 2026-06-11 during the manual-test walk (org case), then a full audit of all 20 bespoke previews confirmed three mislinks; the rest are clean: - -1. app.js:564 (org) — "Heading three" carries data-face org-headline-todo on a line with no TODO keyword; org-headline-todo's docstring says it applies to the part of the headline after the TODO keyword. Fix: add an org-todo keyword span mirroring the DONE line at app.js:563 (stars = org-level-3, keyword = org-todo, text = org-headline-todo). -2. app.js:765-766 (erc) — swapped: craig's own message text is erc-default-face and bob's is erc-input-face. erc-input-face is "ERC face used for your input"; swap them. -3. app.js:720 (flycheck) — swapped: brackets carry flycheck-delimited-error and the content flycheck-error-delimiter. In flycheck's delimiters highlighting style the delimiter strings get error-delimiter and the enclosed text gets delimited-error; swap them. - -Pin with a browser-gate assertion that these preview elements link the right faces (e.g. the org headline-todo span sits after an org-todo span; the erc my-message line uses input-face). +Deferred, pairs with the calendar-sync recurrence VERIFY above. The mechanical parts (write to a temp file + rename, add curl --fail, guard the zero-event case) are doable, but any calendar-sync change needs verification against a real .ics feed to avoid masking a genuine empty/failed sync. Do this together with the recurrence fix once you provide a fixture / confirm the live feed. +From the 2026-06 config audit, =modules/calendar-sync.el=: +- =:1309= — agenda file written via =with-temp-file= directly on the target (truncate-in-place); org-agenda/chime reading mid-write sees a partial calendar, hourly. Write temp + =rename-file= (atomic same-fs). Same for =--save-state= :258. +- =:1284= — curl runs without =--fail=: an HTTP 404/500 error page exits 0 and the HTML proceeds into conversion. +- =:1229-1233= — =--parse-ics= returns nil for both garbage and a valid calendar with zero in-window events, so healthy near-empty calendars report "parse failed" in =calendar-sync-status=. Distinguish the cases. -** TODO [#B] Split window opens the dashboard in the other window :feature:quick:solo: +** VERIFY [#B] org-roam :config triggers the 15-20s refile scan synchronously at first idle :bug:solo:next: :PROPERTIES: -:LAST_REVIEWED: 2026-06-10 +:LAST_REVIEWED: 2026-06-20 :END: -When splitting with C-x 2 (=split-window-below=) or C-x 3 (=split-window-right=), the new/other window should default to the =*dashboard*= buffer instead of mirroring the current buffer. Advise =split-window-below= / =split-window-right= (or rebind the keys) to select the dashboard in the freshly-created window. Keep point in the original window. +Needs from Craig: this is measurement-first (perf), not a blind fix — it's the same bottleneck as the "optimize org-capture target building" debug task. Run /debug with debug-profiling to measure what actually costs the 15-20s (file count? regex? agenda rebuild?), then fix from the data. I won't restructure the refile/agenda scan without a profile. Say "let's debug it" and I'll profile + fix. +=modules/org-roam-config.el:78-79= — org-roam is =:defer 1=, so its :config calls =cj/build-org-refile-targets= at 1s idle, BEFORE the 5s background timer (=org-refile-config.el:144-151=); on a cold cache the 30k-file scan runs inline and freezes Emacs at first idle. Drop the call — org-roam is loaded long before the 5s timer fires. Likely a player in the filed org-capture 15-20s perf task (=[#B] Optimize org-capture target building performance=) — check both together. From the 2026-06 config audit. -** TODO [#B] theme-studio palette ramps + contrast safety v1 :feature: +** VERIFY [#B] transcription: stderr never reaches the log, video transcripts stranded in /tmp :bug:solo:next: :PROPERTIES: -:LAST_REVIEWED: 2026-06-10 +:LAST_REVIEWED: 2026-06-20 :END: -The v1 build from [[file:docs/theme-studio-palette-ramps-spec.org][theme-studio-palette-ramps-spec.org]] (Ready, Codex-reviewed). Two coupled features: a ramp generator (one base color → harmonized tonal ramp) and background-contrast safety (worst-case floor over a face's foreground set + safe-lightness guidance). - -All five phases + the README close-out landed 2026-06-09 (commits 1d51a332, 9da6c663, e7021bfe, 1d8b9f9e, 843bbf08, 23926837); =make theme-studio-test= green (78 node tests, 12 browser gates). Code-complete and self-verified. Remaining: the aesthetic and real-Emacs-fidelity sign-off under the Manual testing parent below (does a ramp harmonize, does the safe band read clearly, does a "safe" tint actually read behind real syntax). Mark this DONE once that passes. -*** 2026-06-09 Tue @ 18:40:20 -0500 Ramp generator core landed -Phase 1 (commit =1d51a332=). =ramp(baseHex, {n, stepL, chromaEase})= in app-core.js → ={steps: [{hex, clamped, offset}], adjusted}= or ={steps: [], error: 'bad-hex'}=. Holds the OKLCH hue, steps lightness by =stepL=, quadratic chroma-ease toward the extremes, gamut-clamps each step; knobs clamp to range with the clamped knob named in =adjusted= (n=2/stepL=0.08/chromaEase=0.5 defaults). 10 node tests (mid/near-white/near-black bases, hue-hold, chroma ease, knob clamping, malformed hex), suite 55→65, =make theme-studio-test= green. The app-core integrity stripper now drops =import= lines too. -*** 2026-06-09 Tue @ 19:06:46 -0500 Ramp UI in palette landed -Phase 2 (commit =9da6c663=). A "ramp" button opens a panel that generates from the current color and previews the steps (named per source swatch, clamp badge on out-of-gamut steps); the n/stepL/chroma-ease controls default to 2/0.08/0.5. Click a step or "add all" to insert adjacent to the source in -n..+n order; name collisions skip (no overwrite), hex duplicates add with a flag. New #ramptest gate pins count, ordered insertion, collision skip, and the clamp badge. Verified headless + screenshot. -*** 2026-06-09 Tue @ 18:53:16 -0500 Foreground-set + floor + L_max core landed -Phase 3 (commit =e7021bfe=). =fgSetFor=, =floor=, =lMax= and the =COVERED_FACES= constant in app-core.js, all pure and explicit-state. fgSetFor returns {set:[{hex,label}]} or a structured reason ('out-of-scope'/'empty'); floor returns {ratio, limitingHex, limitingLabel}; lMax scans L from black to bracket the dark-side crossing then binary-searches it (tol 0.001), status ok/none/all/clamp. 13 node tests including the keyword-blue #67809c fixture and lMax's none/all/clamp branches. Suite 65→78, =make theme-studio-test= green. -*** 2026-06-09 Tue @ 19:06:46 -0500 Worst-case contrast readout landed -Phase 4 (commit =1d8b9f9e=). The five covered overlay faces show the worst-case floor over their foreground set (live syntax colors + default fg) and name the limiting foreground; a syntax-color edit repaints them. Out-of-scope faces keep the single-pair cell; an empty set reads "no fg set". Verdict is WCAG AA by default. New #contrasttest gate pins the readout, the keyword-blue limiting case, the single-pair fallback, and the no-set string. -*** 2026-06-09 Tue @ 19:06:46 -0500 Safe-lightness picker guidance landed -Phase 5 (commit =843bbf08=). The OKLCH picker gets a "safe for" selector over the covered faces; the C×L plane shades the lightness band too light to keep that face readable, with the L_max ceiling (via =lMax= at the current chroma) as the band's lower edge. A too-dark foreground shades the whole plane. New #safetest gate pins band-shows-for-covered-face and hides-when-none. Verified headless + screenshot. -*** 2026-06-09 Tue @ 19:06:46 -0500 README + test-surface close-out landed -Commit =23926837=. README documents the ramp controls and defaults, the worst-case floor / limiting foreground, the five covered faces, the safe-lightness guidance, and WCAG-drives-PASS-FAIL with APCA as a diagnostic; the browser-gate list is updated. =make theme-studio-test= carries all new node tests and the #ramptest/#contrasttest/#safetest gates. All acceptance criteria met. +Deferred from the batch (no blocker; needs a focused pass with live verification). Plan: (1) transcription-config.el:210 — make-process :stderr with a file path creates a buffer, not a file; route stderr into the process buffer and write the captured text out in the sentinel, then drop the leaked buffer. (2) :370-374 — derive the txt/log base from the VIDEO path, not the temp mp3's /tmp path, so transcripts land alongside the source. The path-derivation half is cleanly unit-testable; the stderr half needs a real transcription run to verify, which is why I held it for a focused session rather than the batch. +From the 2026-06 config audit, =modules/transcription-config.el=: +- =:210= — =make-process :stderr= with a file PATH creates a BUFFER named like the path (verified by probe); the "Errored. Logs in <file>" notification points at a log without the error text, and the hidden stderr buffer leaks per transcription. Route stderr into the process buffer or write it out in the sentinel. +- =:370-374= — video path derives txt/log from the temp mp3's /tmp path; the transcript lands in /tmp and dies on reboot, contradicting the "alongside the source" docstring. Pass the video's path as the output base. -** TODO [#B] theme-studio color families :feature: +** VERIFY [#C] page-signal pager account deregistered — re-registration needs your hands :PROPERTIES: -:LAST_REVIEWED: 2026-06-11 +:LAST_REVIEWED: 2026-06-12 :END: -Show the palette as hue-grouped strips (dark→light) over the existing flat, individually-editable palette. Grouping is by OKLCH hue from the hex, so renaming a color never moves it. A per-strip count control generates a symmetric ramp (N → base ±N) from the strip's most-saturated color; regenerate is authoritative, repointing surviving-step references by lightness rank and leaving removed-step references a visible "(gone)". The ground strip is synthesized from the bg/fg assignments and pinned first; the standalone ramp panel is removed. Designed in [[file:docs/theme-studio-color-families-spec.org][docs/theme-studio-color-families-spec.org]]. Codex-reviewed Ready 2026-06-10 after response folded: pivoted from name-derived families to hex-derived families over a flat palette, which designs out the name-grammar/import-inference and chip-ownership blockers. All review findings dispositioned; both open decisions resolved. Builds on and supersedes the palette-ramps v1 ramp UI. - -All six phases landed 2026-06-10 (commits ebe18d51, 74db9a52, 111687b0, e7ae18c4, 77783126, f6ab0001, 9daeff15, and the Phase 6 commit); =make theme-studio-test= green (98 node tests, 16 browser gates). Code-complete and self-verified. The hue-adjacent warm-color grouping limitation is filed as a separate research task (=~/color-sorting.org=). Remaining: the manual aesthetic/fidelity sign-off under the Manual testing parent (hue grouping reads right, regenerate-replace reads as deliberate, removed-step "(gone)" is clear). Mark this DONE once that passes. -*** 2026-06-10 Wed @ 01:17:45 -0500 Family model core landed -Phase 1 (commit =ebe18d51=, grouping reworked in =77783126=). =familiesFromPalette=, =regenFamily=, =rankByLightness=, =stepRepointPlan= in app-core.js, pure and hex-derived. Grouping started as gap-clustering + flat neutral threshold; after the design discussion it became nearest-hue-anchor bucketing (no single-linkage chaining) + a lightness-scaled neutral threshold (pale tints keep their hue, mid grays go neutral). regenFamily handles n=0 without ramp()'s clamp; stepRepointPlan maps survivors / lists removed by signed lightness rank. 20 node tests including the green/yellow split and the no-chaining case. Open: hue-adjacent warm colors still merge — research task above (=~/color-sorting.org=). -*** 2026-06-10 Wed @ 01:17:45 -0500 Family sort core landed -Phase 2 (commit =74db9a52=). =sortFamilies=/=sortFamilyMembers=: neutrals first, then chromatic by base hue (rounded so a hue hair doesn't outrank lightness), ties by base lightness then hex; members dark→light. Display-only; stored palette order untouched. 4 node tests. -*** 2026-06-10 Wed @ 01:17:45 -0500 Family-strip rendering landed -Phase 3 (commit =111687b0=, columns =e7ae18c4=). renderPalette restructured into the pinned ground strip + hue-sorted family columns (top→bottom dark→light), chips keep per-chip rename/remove/select, move-arrows/drag dropped. #familytest gate locks the structure + rename-stays-in-strip. Existing palette flows stay green. -*** 2026-06-10 Wed @ 01:17:45 -0500 Count control + regenerate landed -Phase 4 (commit =f6ab0001=). Per-chromatic-strip count input (0-4); setting N regenerates the family as base ±N, repointing survivor references by lightness rank and leaving removed-step references on their now-gone hex. Also fixed the neutral-threshold curve to taper at both lightness ends (symmetric Munsell) so chroma-eased dark/light extremes keep their hue. #counttest gate covers count up/down + the survivor/removed reference behavior. -*** 2026-06-10 Wed @ 01:17:45 -0500 Base edit + retire ramp panel landed -Phase 5 (commit =9daeff15=). Editing a family base recolors the whole family (shared =regenFamilyInPlace= with the count control); editing a ground swatch writes the bg/fg assignment. The standalone ramp panel (button, panel, JS, CSS, #ramptest) is removed — fan a color via its column's count instead. #baseedittest gate covers base-edit recolor + reference follow + the bg-swatch edit. -*** 2026-06-10 Wed @ 01:17:45 -0500 Warnings, seeding, export, README close-out landed -Phase 6 (commit =c175e2be=). Export stays a flat palette and import needs no reconstruction (#roundtriptest: export→import→export byte-identical). =seedPkgmap= reads the flat palette unchanged. The too-similar warning stays on the full palette — the planned ramp-step exemption was dropped after analysis: ramp steps are a stepL apart (well above the ΔE threshold) so they never warn, and exempting same-family pairs would hide genuine near-duplicates (caught by #deltatest). README documents families, the ground strip, the count control/regenerate, removed-step references, and the ramp-panel removal. +Reported by .emacs.d 2026-06-12 01:01: the dedicated pager number (+15045173983, the Claude Pager Google Voice number on signal-cli) returns "User ... is not registered" on every send — Signal appears to have deregistered it (GV numbers get periodically re-verified). Re-registration requires captcha/SMS, which only you can do. Until then every page-signal call fails; .emacs.d's config-audit page fell back to email. Wrapper lives at claude-templates/bin/page-signal. -** TODO [#B] Dupre diff-changed / diff-refine-changed legibility :bug: +** VERIFY [#C] Remove unused system-power keybindings :refactor:quick:next: :PROPERTIES: -:LAST_REVIEWED: 2026-06-11 +:LAST_REVIEWED: 2026-06-20 :END: -Surfaced 2026-06-07 from a pearl session designing its modified-ticket indicator (pearl marks a changed field by inheriting =diff-changed=). dupre's =diff-refine-changed= is bright gold (#ffd700) under near-white text (#f0fef0) -- WCAG contrast ~1.35, unreadable as a plain background. It only looks fine inside diff-mode because diff-mode overlays its own dark foreground. =diff-changed= (#875f00 amber) is ~5.49, readable but off the modus model. Every modus variant keeps both faces legible (contrast 9-16) by pairing a dark low-saturation background with a hue-matched foreground. - -Ask: -1. Rework dupre's =diff-changed= and =diff-refine-changed= on modus lines: dark low-saturation background, legible foreground (plain default fg for simplicity, or hue-tinted per modus -- decide), and keep refine slightly stronger than changed (refine is the word-level emphasis inside a changed region; modus keeps them distinct). -2. While there, audit dupre's broader diff/palette faces against modus conventions (background/foreground tinting, contrast targets) and flag where it diverges. +Needs from Craig: the task says "confirm the exact set to keep before unbinding." Under C-; ! the bindings are shutdown (s), reboot (r), restart-Emacs (e), and friends. Tell me which to keep bound and which to drop (the completing-read menu still reaches the rare ones), and I'll unbind the rest. +=modules/system-commands.el= binds shutdown (=C-; ! s=), reboot (=C-; ! r=), restart-Emacs (=C-; ! e=) and friends under the =C-; != prefix. Craig rarely uses them and wants the key real-estate back. Drop the bindings he doesn't use; the completing-read menu can still reach the rare ones. Confirm the exact set to keep before unbinding. From the roam inbox. -Reference values -- modus-vivendi: refine-changed bg #4a4a00 fg #efef80, changed bg #363300 fg #efef80. modus-operandi: refine-changed bg #fac090 fg #553d00, changed bg #ffdfa9 fg #553d00. +** DOING [#B] mu4e: cmail can't trash, no account can refile :bug:quick:solo: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +=modules/mail-config.el:217-220= — the cmail context (primary account) sets only drafts/sent, so D falls back to default "/trash" which doesn't exist under ~/.mail (=/cmail/Trash= does); and NO context sets =mu4e-refile-folder=, so r targets nonexistent "/archive" everywhere. Accepting mu4e's offer to create the maildir strands mail in a directory mbsync never syncs — messages silently vanish from the server's view. Add =mu4e-trash-folder= to cmail + per-context =mu4e-refile-folder=. From the 2026-06 config audit. +Fixed 2026-06-13: cmail gets =mu4e-trash-folder= "/cmail/Trash"; refile is a per-message function (=cj/mu4e--refile-folder=) instead of a per-context string — mu4e context :vars are sticky, so a per-context refile leaks one account's archive folder into another. cmail → "/cmail/Archive"; gmail/dmail signal a =user-error= rather than move mail into an unsynced phantom folder (Craig chose the fail-safe over syncing [Gmail]/All Mail — the All Mail option means a multi-GB pull + cross-folder duplicates; revisit if local Gmail archiving is wanted). Applies on next mu4e open; pure dispatch helper covered by tests. -Side-by-side legibility render: [[file:assets/2026-06-07-dupre-diff-face-legibility-compare.png][assets/2026-06-07-dupre-diff-face-legibility-compare.png]]. -** TODO [#B] dupre-theme test failures :bug:test:quick:solo: +** DOING [#C] Lock screen silently fails — slock is X11-only :bug:quick: :PROPERTIES: -:LAST_REVIEWED: 2026-06-11 +:LAST_REVIEWED: 2026-06-13 :END: -A full =make test= run (2026-06-07) is green across 516 of 517 files; the only failures are 4 tests in =tests/test-dupre-theme.el=, long pre-existing. Two root causes. For each, decide whether the palette or the test assertion is canonical, then fix the loser so =make test= goes fully green. +=modules/system-commands.el:105= binds the lockscreen command to =slock=, which can't grab a Wayland session; =cj/system-cmd= launches it detached with output silenced, so C-; ! l does nothing and the screen never locks. Security issue: Craig believes the screen locks when it doesn't. Fix: =hyprlock= (or =swaylock=), ideally resolved per session type via =env-wayland-p= so an X11 fallback survives for other machines. From the 2026-06 config audit. +Fixed 2026-06-13: lockscreen-cmd resolves to =loginctl lock-session= on Wayland (logind Lock → hypridle → hyprlock, the path idle/sleep locking already uses), =slock= on X11; also added the missing =(require 'host-environment)=. Live in the daemon; manual lock test under the Manual testing parent. +** PROJECT [#A] Manual testing and validation +Exercised once the phases above land. +*** VERIFY deferred game commands still work after a restart (load-graph Phase 4) +What we're verifying: with games-config no longer eagerly required, malyon and 2048-game still launch from a fresh Emacs, and games-config loads on first use rather than at startup. Batch tests cover the autoload chain; this is the interactive confirmation the spec asks for after each deferral batch. +- Restart Emacs (daemon or standalone) so games-config is no longer pre-loaded from this session. +- Confirm it's not loaded at startup: +#+begin_src emacs-lisp +(featurep 'games-config) +#+end_src +- M-x malyon — it should load games-config and the malyon package, then start interactive fiction (stories under ~/sync/org/text.games/). +- M-x 2048-game — should start the 2048 puzzle. +- Re-check (featurep 'games-config) — now non-nil. +Expected: at startup (featurep 'games-config) is nil; both commands launch normally; after invoking one, games-config is loaded. If a command errors instead of launching, capture it and reopen the deferral as a TODO. +*** VERIFY native-comp + gcmh survive a daemon restart cleanly +What we're verifying: re-enabling JIT native compilation and switching GC to gcmh holds up across a full daemon restart and a real work session. The fix is live in the current daemon and a throwaway daemon launched clean, but the already-loaded modules only get natively compiled on a fresh start (a background async burst), and the old "Selecting deleted buffer" race needs a real GUI session to rule out on 30.2. +- Restart the Emacs daemon (clean state): kill it and start fresh, or reboot. +- Use Emacs normally for a while — the first session after restart triggers background native compilation of ~100 modules. Watch for any "Selecting deleted buffer" errors or compilation crashes (check the *Async-native-compile-log* buffer and comp-warnings.log). +- After things settle, confirm the settings are live: +#+begin_src emacs-lisp +(list :jit native-comp-jit-compilation + :gcmh gcmh-mode + :gcmh-high gcmh-high-cons-threshold) +#+end_src +- Edit normally (completion, agenda, AI buffers) and notice whether the periodic GC jank is gone. +Expected: restart is clean (no backtrace); the background native-comp burst finishes without "Selecting deleted buffer" errors; the form returns (:jit t :gcmh t :gcmh-high 1073741824); editing feels smoother with no frequent GC pauses. If the async race recurs on 30.2, capture the error and reopen as a TODO — the fallback is an AOT sweep or going back to JIT-off. +*** VERIFY mu4e buffers are themed (headers, main, message view) +What we're verifying: with the mu4e modes excluded from global font-lock, mu4e's manual face properties survive, so the buffers pick up the theme. The headers + main + view-headers are the ones global font-lock was stripping. +- Restart Emacs (cleanest), or kill and reopen the mu4e buffers +- Open mu4e, look at the headers list and the main menu +- Open a message and read the body +Expected: headers list shows unread/flagged/date/subject in their theme colors (mu4e-unread-face gold, mu4e-header-face green, etc.); the main menu and the message-view headers (From/To/Subject) are themed; the message body still renders correctly (gnus does the body, so it's unaffected). NOTE: a plain "g" refresh in an already-open *mu4e-headers* won't fix it on its own unless font-lock is off there; a restart is the reliable check. +*** VERIFY C-c ; reaches the custom command family in a real terminal frame +What we're verifying: the TTY mirror prefix C-c ; reaches the same cj/custom-keymap as the GUI C-; prefix, so the whole command family works in a terminal. The unit tests + a live daemon eval already confirm both prefixes resolve to the one keymap; this is the end-to-end in an actual TTY frame, which the batch harness can't drive. +- Open a terminal Emacs frame: emacsclient -nw (or emacs -nw, or Emacs inside vterm/tmux) +- Press C-c ; L (pearl), C-c ; a (AI), C-c ; g (calendar) — the same leaf keys you use under C-; in GUI +- Confirm which-key shows the custom prefix under C-c ; +Expected: each C-c ; <leaf> runs the same command its C-; <leaf> counterpart runs in GUI; which-key lists the family under C-c ;. C-; itself stays working in GUI frames (unchanged). +*** VERIFY theme-studio gnus view package themes the article headers +What we're verifying: gnus is now its own view package in theme-studio (it drives the mu4e article view), so the bright-green article headers can be themed and exported. #gnustest confirms the package is registered and its preview emits only real gnus faces; this is the visual read plus the live-green retirement. +- Reload theme-studio (or make theme-studio-open) +- Pick "gnus (mu4e article view)" from the view dropdown (sits among the g entries) +- Confirm the preview shows a header block, an emphasized body, an 11-level quoted reply chain, and a signature +- Theme a few gnus faces (e.g. gnus-header-name, gnus-header-from, gnus-cite-1) to obvious colors, export to WIP.json, then deploy +#+begin_src sh :results output +make -C /home/cjennings/.emacs.d deploy-wip +#+end_src +- Restart Emacs (or reload the theme), reopen a mu4e message +Expected: the studio preview renders each gnus face in its theme color; after export + deploy, the *mu4e-article* From/Subject/To/Date headers show the themed colors instead of the gnus green defaults. +*** VERIFY theme-studio markdown preview reads like a real README +What we're verifying: selecting markdown-mode in the view dropdown shows a realistic README (not the generic face-name list), and the markdown faces render legibly in context. #mdtest already confirms the wiring + that every element's face is real; this is the visual read. +- Reload theme-studio (or make theme-studio-open) +- Pick "markdown-mode" from the view dropdown +Expected: a README preview with headers, bold/italic, code, links, lists/checkboxes, blockquote, table, etc., each in its theme face. Clicking an element flashes its row in the faces table. +*** VERIFY dashboard theming — banner gold, headings themed, items show per-filetype icons +What we're verifying: with the dashboard out of global font-lock (Fix A) and file icons on (Fix C), the live dashboard shows the theme colors and icons. Eyeball it. +- Open the dashboard (F1) +Expected: the "Emacs:" banner title is gold, the "Projects:/Bookmarks:/Recent Files:" headings are themed blue, and the project/recent-file rows each show a colored per-filetype icon (org files greenish, dirs yellow; bookmarks a plain icon). +*** VERIFY gptel C-; a B switches model without the modeline hang +What we're verifying: cj/gptel-switch-backend (C-; a B) now sets gptel-model to an interned symbol, so the switch completes without the wrong-type-argument-symbolp redisplay hang. Unit tests + a live helper eval already cover the coercion; this is the interactive end-to-end. +- Invoke cj/gptel-switch-backend (C-; a B) +- Pick a backend, then a model from its list +Expected: the modeline updates to the chosen model and Emacs stays responsive — no "Querying ..." hang, no wrong-type-argument backtrace. +*** VERIFY org-faces color set in theme-studio reaches the agenda +What we're verifying: editing an org-faces-* row in theme-studio, exporting, and deploying lands the new color on the real agenda's keyword/priority. The build-theme -> deftheme half and the live org-todo-keyword-faces / org-priority-faces wiring are already verified mechanically; this confirms the visual end-to-end with a human eye. +- Open theme-studio in Chrome and pick "org-faces" from the application dropdown (it sits beside elfeed and mu4e) +- Confirm the preview shows the focused agenda block over the auto-dim block, and that the rows read "todo", "priority a", etc. +- Edit org-faces-todo to an obviously different color (e.g. bright magenta) and export the theme to WIP.json +#+begin_src sh :results output +make -C /home/cjennings/.emacs.d deploy-wip +#+end_src +- Open the org agenda (or any todo.org buffer) and look at a TODO keyword +Expected: the TODO keyword renders in the color just set; the priority cookies and other keywords keep their own colors; an unfocused window shows the dimmed variants. +*** VERIFY slack keys are safe before slack loads +What we're verifying: the C-; S slack keys don't error before slack has started, and the prefix shows in which-key. Fixed in modules/slack-config.el; restart to apply (not reloaded into the live session). +- Restart Emacs but do NOT run cj/slack-start +- Press C-; S Q (close all), and C-; S w / @ / # (these previously void-function'd or void-variable'd before load) +- Press C-; S and check which-key shows the "slack" prefix +Expected: C-; S Q reports "Closed 0 Slack buffers" with no error; w/@/# either run or autoload slack cleanly (no void-function); the which-key popup lists the slack prefix. +*** VERIFY ERC fires one mention notification and lists real servers +What we're verifying: a mention pops a single desktop notification (not two), and cj/erc-connected-servers lists only live server connections. Fixed in modules/erc-config.el; takes effect after an Emacs restart (not reloaded into the live IRC session). +- Restart Emacs and reconnect ERC +- Have someone mention your nick in a channel (or trigger erc-text-matched-hook) +- Run M-x cj/erc-connected-servers with one server connected and a few channels open +Expected: exactly one desktop notification per mention; cj/erc-connected-servers reports just the connected server(s), not every channel/query buffer. +*** VERIFY modeline still shows the git branch and state +What we're verifying: the VC-cache simplification didn't change what the modeline shows on a normal repo. Fixed in modules/modeline-config.el (live in the daemon after reload). +- Open a file inside a git repo +- Glance at the mode-line VC segment +Expected: the branch name and state still render as before (e.g. "main" with the usual state face). The change only drops a per-render stat and guards against git errors; normal display is unchanged. +*** VERIFY info-mode open is non-destructive and cancels cleanly +What we're verifying: opening a .info file no longer auto-kills the buffer, and the explicit cj/open-with-info-mode prompt cancels cleanly on decline. Fixed in modules/help-config.el; stale daemon state already cleared, so this also survives a fresh restart. +- find-file a .info file (e.g. one under elpa) — it should open as an ordinary buffer, not vanish into Info +- In that buffer, edit something, then M-x cj/open-with-info-mode; at the save prompt answer no +- Repeat M-x cj/open-with-info-mode on an unmodified .info buffer +Expected: find-file leaves the buffer intact (no auto-kill); declining the save prompt prints "Operation canceled" with no "No catch for tag" error; on an unmodified buffer it opens the file in Info. +*** VERIFY dwim-shell zip/backup/menu-key behave +What we're verifying: single-file zip makes a valid <name>.zip, the dated backup gets a real timestamp, and the dwim-shell menu is reachable on M-D in plain dired. Fixed in modules/dwim-shell-config.el, reloaded into the daemon. +- In dired, mark a single file, run the dwim-shell menu (M-D), pick Zip +- Mark a file, run the menu, pick "Backup with date" +- Open a plain dired buffer (not dirvish) and press M-D +Expected: zip produces foo.zip (a valid archive, openable); backup produces foo.ext.YYYYMMDD_HHMMSS.bak with a real date; M-D opens the dwim-shell command menu in plain dired (before the fix it did nothing there). +*** VERIFY markdown live preview renders in the browser +What we're verifying: F2 in a markdown buffer runs the custom cj/markdown-preview (not markdown-mode's own command) and the impatient-mode strapdown preview actually renders. Fixed in modules/markdown-config.el, reloaded into the daemon. +- Open a .md file with some markdown content +- M-x cj/markdown-preview-server-start (starts simple-httpd on :8080) +- Press F2 in the markdown buffer +Expected: a browser opens http://localhost:8080/imp showing the rendered markdown, and edits to the buffer update the preview live. Pressing F2 before starting the server gives a user-error telling you to start it. +*** VERIFY orderless matching works inside a vertico session +What we're verifying: vertico-prescient no longer overrides completion-styles, so orderless's space-separated, out-of-order matching is live in the minibuffer (prescient still sorts). Fixed in modules/selection-framework.el, applied live in the daemon. +- Run a command with a vertico minibuffer (e.g. M-x, or C-x b) +- Type two space-separated fragments out of order, e.g. "mode buf" to match "switch-to-buffer-other-... mode" style candidates +Expected: candidates match on both fragments regardless of order (orderless), and the ordering still reflects prescient frecency. Before the fix, space-separated out-of-order input would not match. +*** VERIFY C-; b d diffs, C-; b D deletes +What we're verifying: the buffer-and-file keymap now puts diff on the easy lowercase key and the destructive delete on the capital. Swapped in modules/custom-buffer-file.el and re-bound live in the daemon. +- Open a file buffer and edit it without saving +- Press C-; b d +- Press C-; b D, then cancel at the delete confirmation +Expected: C-; b d runs the diff (buffer vs saved file); C-; b D starts delete-buffer-and-file (offers to delete the file). Before the swap these were reversed. +*** TODO C-s C-s repeats the last search +What we're verifying: the second consecutive C-s repeats the previous consult-line search instead of erroring "No Vertico session". Fix in modules/selection-framework.el (vertico-repeat-save now on minibuffer-setup-hook), live in the daemon. +- Press C-s, type a search term, RET to dismiss (or just narrow then exit) +- Press C-s again, then C-s a second time without any command in between +Expected: the second C-s reopens the last search (vertico-repeat) rather than signalling "No Vertico session". +*** TODO reconcile-open-repos includes dot-named repos +What we're verifying: M-P (reconcile open repos) now visits repos whose directory name has a dot (mcp.el, capture.el, etc.), which the old "^[^.]+$" filter silently skipped. Fix in modules/reconcile-open-repos.el, live in the daemon; live-daemon check already confirmed discovery, this is the through-the-command spot-check. +- Run M-P (or M-x cj/reconcile-open-repos) +- Watch the per-repo progress / final summary +Expected: dot-named repos under ~/code (mcp.el, gptel-mcp.el, capture.el, google-contacts.el, …) appear in the reconciliation pass, not just dot-free ones. +*** 2026-06-15 Mon @ 12:10:06 -0500 org-capture popup single-Task into inbox verified +Craig confirmed: Super+Shift+N pops straight into a Task capture (no menu), single full-frame window, files under "Inbox" in ~/org/roam/inbox.org, and the frame closes cleanly. Passed. +*** TODO Lock screen actually locks on Wayland +What we're verifying: C-; ! l locks the screen on Wayland. slock (X11-only) never worked here; the locker now runs loginctl lock-session, which logind turns into a Lock signal that hypridle handles by running hyprlock — the same path idle/sleep locking already uses. Fix in modules/system-commands.el, live in the daemon. +- Press C-; ! l (or run M-x cj/system-cmd-lock) +- The screen should lock with hyprlock +- Unlock with your password +Expected: the screen locks immediately and unlocks with your password. (Before the fix it printed "Running lockscreen-cmd..." and nothing happened.) +*** TODO Irreversible actions require a typed "yes" after a daemon restart +What we're verifying: the strong-confirm tier is restored for irreversible actions. The global (fset 'yes-or-no-p 'y-or-n-p) was removed and those sites now call cj/confirm-strong, which forces a typed "yes"/"no". The fset is baked into the running daemon and can't be cleared from Lisp, so this only takes effect after a restart. Ordinary yes-or-no-p prompts stay single-key (use-short-answers t). +- Restart the Emacs daemon (clean state) +- Trigger an irreversible action, e.g. M-x cj/system-cmd-shutdown (then abort), or attempt to overwrite a file via the rename/move commands +Expected: the irreversible prompt requires typing the full word "yes" (not a single y); a benign yes-or-no-p prompt elsewhere still accepts a single keystroke. +*** 2026-06-11 Thu @ 18:29:39 -0500 Verified UI-face preview and contrast survive a ground bg change +Craig walked the repro: mode-line with its own fg/bg kept its preview bg and ratio through a ground change; ground-dependent rows re-rated; package-faces contrast column updated. Pass. Closed the [#A] contrast-cell and [#B] preview-bg parents. +*** 2026-06-11 Thu @ 18:29:39 -0500 Verified seeded package-face defaults, with steel tuning +Craig read org/magit/elfeed against the ground. Pass with tuning: steel reads a bit dark — flipped to steel+1 on magit (better), but org wanted darker; these are updated selections, NOT final — he expects to adjust many more before the theme ships. His export saved to scripts/theme-studio/theme.json (replaced the 2026-06-09 state, prior version in git at 4f2d00eb). Side find: the org preview's heading-three ↔ headline-todo flash linkage is cross-wired — filed as its own bug task. +*** 2026-06-11 Thu @ 18:29:39 -0500 Verified large face tables stay usable +Craig scrolled the org table, filtered on "agenda", reassigned a face — grouping, narrowing, and live preview update all behaved. Pass. +*** 2026-06-11 Thu @ 18:29:39 -0500 Verified perceptual readouts in the picker +Craig validated the readouts against computed reference values (default fg #f0fef0 on ground #000000: APCA Lc -104.7 / WCAG 20.14; keyword blue #67809c: Lc -33.7 / WCAG 5.14 — negative polarity correct for light-on-dark). Legible, uncrowded. Pass. Side find filed separately: the picker panel itself blends into the page background ([#C] picker-visibility task). +*** 2026-06-11 Thu @ 18:29:39 -0500 Verified ΔE warnings read clearly +Craig built a near-duplicate pair and a well-spread palette: the close pair was named with its ΔE, sorted closest-first with the cap behaving; no warning on the spread palette. Pass. +*** TODO OKLCH editor feels right +What we're verifying: the OKLCH sliders / C×L plane edit cleanly and clamping is visible. +- Switch the picker to OKLCH mode and drag L, then C, then H +- Push chroma past the sRGB gamut, then toggle the AA/AAA mask +Expected: each axis moves independently; the C×L plane (once 4b lands) opens on the current color; "chroma clamped to sRGB" shows on clamp; toggling the mask does not reset OKLCH mode. +*** TODO Generated ramp harmonizes +What we're verifying: a ramp generated from a base color reads as one family, not a grab-bag (the aesthetic the math is meant to produce). +- Open =scripts/theme-studio/theme-studio.html= in Chrome +- Pick a mid-lightness base swatch (e.g. a blue) and generate its ramp at the defaults +- Read the row of steps left to right, then try a near-black and a near-white base +Expected: the steps share an obvious hue and step evenly in lightness; the chroma-ease keeps the extreme steps from going muddy or garish; nothing looks like it belongs to a different color. +*** TODO Safe-lightness guidance reads clearly +What we're verifying: the L_max marker and unsafe-band shade are legible and land in the right place when editing a covered face. +- Open the picker in OKLCH mode on region (or hl-line), with syntax colors assigned +- Read the L_max marker and the shaded unsafe band on the lightness slider +- Drag lightness up toward and past the marker +Expected: the marker is visible and correctly placed, the band above it reads as "unsafe," and crossing it is obvious; an out-of-scope face shows no marker. +*** TODO Safe tint actually reads in real Emacs +What we're verifying: a background tint the tool calls safe really keeps every token readable behind real syntax-colored text — the whole point of the worst-case floor. +- In the tool, set a covered face (e.g. region) to a tint at or just below its L_max with the worst-case readout showing PASS +- Build the theme and load it in Emacs, open a code buffer with varied syntax, and select a region spanning many token colors +- Read every token through the region highlight, paying attention to the limiting foreground the tool named +Expected: every token stays readable over the tint, including the limiting one; a tint pushed just past L_max (readout FAIL) shows a visibly strained or unreadable token, confirming the floor matches reality. +*** TODO Color families group the way the eye reads them +What we're verifying: the OKLCH hue clustering (25° gap) splits and merges families the way you'd expect, and renaming never moves a color. +- Open =scripts/theme-studio/theme-studio.html= in Chrome and load a real theme (e.g. sterling) +- Read the strips top to bottom: are "the blues" one strip, "the greens" another, neutrals and ground pinned at the top +- Find a pair you'd consider one family that landed in two strips (or two you'd consider separate that merged) +- Rename any swatch to something absurd and confirm it stays in the same strip +Expected: families match your mental grouping; the few that don't are the cue to revisit the 25° gap; renaming never regroups. +*** TODO Regenerate-replace reads as deliberate +What we're verifying: the count control clearly signals it rewrites the whole family, so replacing hand-added same-hue colors isn't a surprise. +- Add two unrelated colors at a similar hue so they share a strip +- Set that strip's count to 2 +- Watch what happens to the two colors +Expected: the strip becomes a clean base±2 ramp, the two loose colors are gone, and the control made it obvious that's what it would do before you committed. +*** TODO Removed-step references read clearly as "(gone)" +What we're verifying: lowering a family's count leaves a referencing face visibly stale, not silently re-pointed. +- Assign a UI or syntax element to an outer step of a family (e.g. region = a blue+3) +- Lower that family's count to 2 so blue+3 disappears +- Read the assignment's dropdown +Expected: the dropdown shows "(gone)" for the removed step, never a silent jump to a different color; re-pointing it is a deliberate choice. +*** TODO Calibre bookmark default name is "Author, Title" +What we're verifying: a new nov bookmark takes the "Author, Title" form parsed from the filename, not the raw EPUB filename. +- Open an EPUB in Calibre (nov buffer). +- Hit m to set a bookmark. +Expected: the default bookmark name is "Author, Title" (underscores stripped, colon restored), e.g. "Agatha Christie, The A.B.C. Murders". -Decided 2026-06-11 (Craig): #0d0b0a is the canonical background — the three drift assertions are stale, update them. org-todo stays the muted red-1 #a7502d — update the test's expected value. Both sides decided; this is now a pure assertion fix. +*** TODO Calibre curated ? menu and docked description +What we're verifying: the curated ? transient, the docked description, and the full dispatch all work in a live calibredb buffer. +- In a calibredb search buffer, press ? and confirm the curated menu (library / filter / sort / open / describe) appears. +- Press d or v to dock the selected book's description in a bottom-30% buffer; press q to dismiss it. +- Press H and confirm calibredb's full dispatch opens. +Expected: ? shows the curated menu, d/v dock the description (q dismisses), H opens the full calibredb dispatch. -*** TODO Background drift: 3 tests expect #151311, palette bg is #0d0b0a -=dupre-get-color-base= (test:46), =dupre-theme-default-face= (test:84), and =dupre-with-colors-binds-values= (test:62) all assert the default background is "#151311", but =themes/dupre-palette.el= defines =bg= as "#0d0b0a". The committed palette looks intentional, so the three assertions are likely just stale -- confirm #0d0b0a is the wanted background, then update the tests. +*** TODO Signel: real incoming message raises a toast through the notify script +What we're verifying: the full receive path (signal-cli → signel --handle-receive → cj/signel--notify → notify script) fires on a real message. +- Make sure you are NOT viewing the sender's chat buffer. +- Have a real message sent to you on Signal (or send one from your phone to a second device thread that lands here). +Expected: a transient info toast titled "Signal: <sender>" with the message text (one line, truncated if long), no sound. -*** TODO org-todo color mismatch: test expects #ff2a00, theme renders #a7502d -=dupre-theme-org-todo= (test:130) asserts the org-todo foreground is "#ff2a00" (intense-red), but the theme renders "#a7502d" (red-1). Design call: should org-todo be the bright intense-red or the muted red-1? Fix whichever side loses the decision. -** TODO [#B] theme-studio guide-support features :feature: -From the color-assignment guide work (2026-06-08): make the tool support the guide without mandating it — everything a seed, an advisory, or a view, never a gate. Two specs to write, both deriving from the rewritten guide and its seed table ([[file:scripts/theme-studio/theme-coloring-guide.org][theme-coloring-guide.org]]). -*** 2026-06-08 Mon @ 19:08:00 -0500 Seeding-engine spec written and Ready -[[file:docs/design/theme-studio-seeding-engine-spec.org][theme-studio-seeding-engine-spec.org]] — role table + face→role maps for syntax/UI/org, OKLCH shade generation, reseed dupre-revised to the compact mapping. Codex-reviewed, Ready. Implementation tracked under the seeding-engine parent below. -*** TODO Guide-support views and advisories spec -Five optional surfaces, all dismissible and non-blocking, in one collapsible panel where they advise: (1) CVD-simulation toggle on previews (deuteranopia/protanopia/tritanopia); (2) squint/blur preview toggle; (3) lightness-ramp view + palette advisories (accent count over 6-8, roles separated only by red/green) — depends on the OKLCH/ΔE core; (4) definition-vs-call / weight advisories; (5) state-over-syntax preview (region/search/diff tint over real syntax-colored text). Sequence: rewritten guide reviewed → seeding-engine spec → this. Advisories (3, 4) layer on the perceptual-metrics feature. -** TODO [#B] theme-studio seeding engine :feature: -Spec (Ready): [[file:docs/design/theme-studio-seeding-engine-spec.org][spec]]. Role table → guide-correct defaults for syntax/UI/org; reseed dupre-revised.json to the compact mapping; opens seeded with an all-tier reseed button. Depends on the perceptual-metrics colormath.js core for OKLCH shade generation, so it runs after that feature's Phase 1. -*** TODO Seed model + seed() + #seedtest :solo: -Phase 1. Palette anchors + OKLCH shade generation (reusing colormath.js), the ROLES table, and the three face→role maps as data; pure seed(). Gate: #seedtest asserts representative syntax/UI/org faces resolve correctly (bi→blue-grey, fnd→gold+bold, region bg-only, link underlined, org-level-1 strongest, org-code literal lane) and a non-org bespoke package (magit) keeps its curated seed. -*** TODO Open-seeded + reseed + dupre-revised regen :solo: -Phase 2. Initial state from seed() plus seedPkgmap for the non-org packages; all-tier reseed button with a scope-named overwrite warning, resetting non-org to their APPS defaults; regenerate dupre-revised.json. Gate: #selftest PASS; default-on-open equals seed(); artifact round-trip (regenerated dupre-revised.json imports back to the same seeded state); Chrome eyeball. -*** TODO Seeding-engine test surface :solo:test: -Keep #seedtest, #selftest, the default-on-open check, the dupre-revised round-trip, node --check, and Chrome validation green. -** TODO [#B] Dashboard keybinding changes :quick:solo: +*** TODO Signel: actively-viewed chat stays quiet +What we're verifying: the suppression predicate gates the toast when you're reading that chat. +- Open the sender's chat buffer (=C-; M m=) and keep it the selected window in a focused frame. +- Have the same sender message you again. +Expected: the message renders in the buffer, but no desktop toast appears. + +*** TODO Project-aware capture files into the right todo.org +What we're verifying: C-c c t and C-c c b file into the current projectile project's todo.org under its "<Project> Open Work" header, and fall back to the global inbox outside a project. +- Inside a projectile project that has a todo.org, run C-c c t (Task), capture a test entry, and confirm it lands under "<Project> Open Work". +- Run C-c c b (Bug) similarly and confirm it lands as "* TODO [#C] ..." under the same header. +- Run a capture from outside any project (or a project with no todo.org) and confirm the global-inbox fallback with a warning. +Expected: in-project captures land in that project's Open Work; out-of-project captures fall back to the global inbox with a warning. +*** VERIFY Dirvish d duplicates, D force-deletes with a confirm +What we're verifying: in dirvish, d now duplicates the file at point (delete-to-trash removed), and D force-deletes the marked files via sudo rm -rf after a yes-or-no-p naming the targets. The pure command builder is unit-tested; this is the live keypress plus the guarded destructive path. +- Open dirvish on a scratch directory holding a couple of throwaway files +- Put point on a file and press d — confirm a "<name>-copy.<ext>" appears (a duplicate, nothing deleted) +- Mark one or two throwaway files, press D, and read the "Force-delete (sudo rm -rf, NO undo): <names>?" prompt +- Answer no first (confirm nothing happens), then press D again and answer yes +- Note whether sudo prompts for a password and whether the file actually disappears +Expected: d duplicates; D names the exact targets and only deletes on yes; the files are gone with no trash copy. If sudo needs a password that shell-command can't supply, flag it — the delete may need to route through a tty instead. +*** 2026-06-20 Sat @ 22:11:00 -0400 F9 agent toggle no longer shrinks after a C-; b pull-away +Craig confirmed in his live GUI frame: the agent window keeps its height across repeated F9 toggles after a C-; b pull-away, even under the WIP theme's near-zero mode-line-inactive. The total-height capture/replay fix holds (dbee95ae). +*** 2026-06-20 Sat @ 22:11:00 -0400 F9 toggle preserves all windows in a 3-window layout +Craig confirmed in his live GUI frame: toggling the agent off then on in a 3-window layout returns the same three windows — both working windows survive and the agent re-splits its own bottom strip. The reversible-toggle fix holds (64916462). + +** PROJECT [#A] Theme-Studio Open Work +Parent grouping the open theme-studio / theming issues; close each child independently. +*** TODO [#A] theme-studio: consistent assignment-view table columns :feature:studio:next: +All view-assignment tables should use one consistent column set and order, whatever view is selected: element name (sortable), lock, fg, bg, style, box (with a side expansion showing the selected color, as in UI faces), contrast, inheritance, size, preview text. No other columns at this design stage. When a view's elements can't take a given section, raise a signal and disable that section for that view; the disabled state is the visual cue. From the roam inbox 2026-06-16. +*** TODO [#B] Route hardcoded theme colors through the theme :refactor: +Config modules hardcode colors that should come from the theme (audit 2026-06-16, after removing the =*scratch*= background tint). Drive these from the theme, or expose them in theme-studio, instead of literal values. +- Buffer-bg tints (same shape as the removed scratch tint): =music-config.el:794= and =org-noter-config.el:287= both face-remap =default :background "#1d1b19"= on the active window. +- Hardcoded face colors that should ride the theme: =nerd-icons-config.el:32= =cj/nerd-icons-tint-color "darkgoldenrod"=; =prog-general.el:370-375= hl-todo keyword faces =#FF0000= / =#DAA520= / =#2C780E=; =eshell-config.el:78-86= prompt =:foreground "gray"/"white"=. +- Reading-mode palettes (deliberate but hardcoded, confirm keep vs theme): =pdf-config.el:27= =pdf-view-midnight-colors=; =calibredb-epub-config.el:298-300= =:foreground "#E8DCC0"=. +- =org-faces-config.el:38-103= defface defaults (~36 hex) — the themeable org-faces theme-studio already overrides; decide whether the defaults should derive from the palette too. +*** TODO [#C] theme-studio: custom view-assignment dropdown with lock indicators :feature:studio:next: +The view-assignment dropdown is a plain HTML menu. Make it a custom menu colored like the other custom menus, and have it indicate which assignment views have all their elements locked, so the user knows when a view's assignments are done. From the roam inbox 2026-06-16. +*** TODO [#C] theme-studio: move the "clear palette" button :feature:studio:next: +The clear-palette button is too easy to hit by accident (then re-import the JSON to recover). It currently rides with the update-color and palette-generation controls, not with the palette columns. Move it to be left-aligned at the same vertical level as the color-column names. Layout/CSS change in the palette area (app.js / styles.css); visual, so verify by eye. From the roam inbox 2026-06-16. +*** 2026-06-20 Sat @ 05:53:39 -0400 Tightened the elements-table horizontal layout +Reduced per-cell padding 12px to 8px across all three tables and shortened the redundant "mode-line-highlight (mode-line hover)" label to "(hover)". The weight/slant narrowing landed with the custom-widget task below. Commit 792e09b5. +*** 2026-06-20 Sat @ 05:53:39 -0400 Custom weight/slant dropdowns with previews +Replaced the native weight/slant selects with mkEnumDropdown, themed like the color dropdown. Values are spelled out (semibold not "semi"; unset reads "weight"/"slant"), each popup option previews its own weight or slant, and lock + popup behavior mirrors the color dropdown. Commit 055e0992. +*** 2026-06-20 Sat @ 05:53:39 -0400 Language dropdown sorted with nav arrows +Alphabetized the language list with Elisp pinned as the default, and added the ‹ › arrows that step the selection (clamped) reusing stepViewIndex. #langtest gate. Commit be62ae5b. +*** 2026-06-20 Sat @ 05:53:39 -0400 Moved the lock column to the leftmost position +Lock cell now sits first in all three tables, ahead of the element/face name; the name sort moved to column 1. From the roam inbox 2026-06-20. Commit 4f869aa1. +*** 2026-06-20 Sat @ 06:44:07 -0400 Explanatory hovers on the expander detail labels +Each label in the expander detail row carries a DETAIL_HOVERS tooltip, matching the table-header labels. From the roam inbox 2026-06-20. Commit 2caa4606. +*** 2026-06-20 Sat @ 06:44:07 -0400 View-dropdown lock indicator +The view dropdown prefixes a lock glyph on any view whose elements are all locked. Delivers the lock-indicator half of the custom-view-dropdown task; the custom-menu half is still open. From the roam inbox 2026-06-20. Commit 2caa4606. +*** 2026-06-20 Sat @ 06:44:07 -0400 Expand/collapse-all toggle with disclosure triangles +Per-row expander toggles show ▶/▼ disclosure triangles; a header-level expand-all/collapse-all button per table opens or closes every row at once. From the roam inbox 2026-06-20. Commit 2933a362. +*** 2026-06-20 Sat @ 06:44:07 -0400 Expander stays open across a table rebuild +A package edit rebuilds the table, which had collapsed an open expander mid-edit. An EXPANDED set keyed by element/face reopens the open rows on rebuild. From the roam inbox 2026-06-20. Commit 7382bf53. +*** 2026-06-20 Sat @ 06:44:07 -0400 Added 18 language previews +Tokenized samples.py previews for Racket, Scheme, Haskell, OCaml, Scala, Kotlin, Swift, Lua, Ruby, Perl, R, Erlang, SQL, PHP, Ada, Fortran, MATLAB, Assembly, wired into the language dropdown (28 languages total) with a guard test. From the roam inbox 2026-06-20. Commit 309b1e9a. +*** 2026-06-20 Sat @ 06:44:07 -0400 Moved the box column between style and contrast +Box now sits at column 5 in all three tables, after style and before contrast (reverses the earlier box-to-last). From the roam inbox 2026-06-20. Commit 2a34c3c7. +*** VERIFY [#A] theme-studio: deploy-wip button on the browser page :feature:studio:next: +Needs from Craig: a mechanism choice before I build it. The page is served from file://, so a button can't run make directly. Two options: (a) a tiny localhost helper the page POSTs to (it runs make deploy-wip), or (b) the page writes a watched trigger file that a small daemon/timer picks up. Pick (a) or (b) and I'll implement + test it. +Add a button on the theme-studio page that runs the make deploy-wip target locally (build WIP.json into the theme, live-reload the daemon). The page is served from file://, so the browser can't run make directly. Needs a local bridge: a tiny localhost helper the button POSTs to, or a watched trigger file the page writes. Pick the mechanism before building. From the roam inbox 2026-06-15. +*** VERIFY [#A] theme-studio: cannot reassign fg color :bug:studio:next: +Needs from Craig: the exact repro (palette JSON + click sequence, or a quick screen capture). I traced it and couldn't reproduce from the code: updateColor (the "update selected" path) already excludes the selected entry from its uniqueness check (j!==i), and the fg/bg chips are selectable — paletteChip wires d.onclick -> selectColor(i), with the lock only blocking removal, not selection. The "already exists" wording is addColor's message, which is only reached via applyEdit when selectedIdx is null (i.e. no chip selected). So the trigger is a state I can't see statically — selection getting lost before "update", or a second entry already named "fg". With the precise steps I can pin it; I won't guess-patch the palette-update path on an [#A] bug since a wrong fix there corrupts themes. +Selecting the fg tile, changing its value, and clicking update errors that an fg already exists instead of updating it. The update path treats a reassign as an add. From the roam inbox. +*** VERIFY [#B] theme-studio: sort newest colors near the top :feature:studio:next: +Deferred from the no-approvals batch (no blocker, needs a focused studio session). Plan: the palette + gallery order comes from columnsFromPalette / sortColumns / paletteOptionList; newest entries currently sort low. Add a recency signal (palette insertion order) and surface recent columns near the front. Risk: the column sort is pinned by several browser gates (#sorttest etc.), so it needs careful test updates — which is why I held it rather than rush it here. +Newly added colors currently land after the ground layer (bg/fg), low in the order. Surface them near the first entry instead, in both the palette color list and the gallery/dropdown, since the most recently added colors are usually the ones being worked on. From the roam inbox 2026-06-15. +*** VERIFY [#B] theme-studio: dashboard preview icons missing, list items unthemed :bug:studio:next: +Needs from Craig: an approach decision on the icon half. The navigator nerd-glyphs show as mojibake because the browser has no nerd font — fixing it means shipping/@font-face-ing a Symbols Nerd Font web font into the studio page (a real asset + licensing call), or substituting plain glyphs in the preview. The "list items unthemed" half is a separate studio-CSS fix I can do, but I'd rather settle the font approach and do both together. Tell me: embed the nerd font, or use substitute glyphs? +Found while theme-testing the live dashboard against the preview. +- The navigator icons don't render in the preview at all, showing as mojibake. The nerd-font glyphs have no font fallback in the browser. +- No way to set the color of the project, bookmark, and recent-files list items. The preview renders those entries as plain unstyled text, and the dashboard app exposes no editable face for them. +*** TODO [#B] theme-studio import organization workflow needs a spec :feature:studio: :PROPERTIES: -:LAST_REVIEWED: 2026-06-06 +:LAST_REVIEWED: 2026-06-13 :END: -pressing g has should refresh. find another binding for Telegram. -** TODO [#B] TTY-accessible personal C-; keymap :feature:solo:quick: +Design import handling for unstructured color sources such as Emacs themes, CSS palettes, screenshots, and generic palette files. Principles from the 2026-06-13 Theme Studio discussion: +- Preserve declared structure whenever an imported entry has a =columnId=. +- For unstructured legacy imports with no =columnId=, avoid silent hue clustering and avoid treating arbitrary =color-N= names as one long ramp; each =color-N= should become its own base column. +- Keep meaningful generated ramp-name inference for names like =blue-1= / =blue= / =blue+1=. +- Group external numeric color-name variants for compact display: =blue1= / =blue2= / =blue3= infer column =blue=; =grey80= / =grey81= infer column =grey=; =orchid3= infers =orchid=. This is display organization, not proof that the colors are an authored Theme Studio span. +- If a numeric external base is spanned later, generate from the actual base name, e.g. =blue1-1= / =blue1= / =blue1+1=, while keeping those generated tiles in the inferred =blue= column. +- Add explicit organization tools rather than hidden inference: group selected colors into a column, suggest hue groups as a preview/action, sort imported colors for inspection, and promote a color from an import bucket into a normal column. +- Consider a compact imported/captured bucket UI for large unstructured imports while preserving per-color column ids internally. + +*** VERIFY [#B] theme-studio: org-agenda app + agenda preview :feature:theme-studio: :studio:next: +Needs from Craig: this is a multi-phase feature, not a bug fix — it depends on the preview-locate feature (per the 2026-06-15 spec) and means breaking org-agenda-* / scheduling / deadline / calendar / clocking faces into their own theme-studio pane with a representative week-agenda preview. Too large to land inside this batch. Confirm you want it built now (and as its own focused session) and I'll start from the spec; otherwise it stays parked. +Break the org-agenda-* plus scheduling / deadline / calendar / clocking / filter faces out of the overloaded org-mode app into a dedicated org-agenda pane (org-mode-line-clock* stay in org-mode), with a representative week-agenda preview at natural item frequency. Keywords, priorities, and tags render live via org-faces / org-mode through the locate registry (hover-only there). Same five-file bespoke-app pattern as org-faces. Depends on the preview-locate feature. Partly subsumes the "break org-mode preview into grouped subsections" task. +*** TODO [#B] theme-studio UI face inheritance needs a spec :feature:studio: :PROPERTIES: -:LAST_REVIEWED: 2026-06-05 +:LAST_REVIEWED: 2026-06-13 :END: -The personal prefix =C-;= (Control-semicolon) is GUI-only — terminals can't encode it, so the entire custom command family (=C-; g= calendar, =C-; a= AI, =C-; S= Slack, =C-; O= org, =C-; M= Signal, =C-; L= pearl, =C-; j= jump, …) is unreachable in a terminal frame (=emacsclient -nw=, Emacs inside vterm/tmux). Surfaced 2026-06-03 out of the pearl =C-; L= prefix discussion. - -Goal: keep =C-;= in GUI and add a TTY-typable mirror prefix so the same leaf keys work in a terminal. The fix is a single point: =modules/keybindings.el= defines =cj/custom-keymap= once, binds it globally with =(keymap-global-set "C-;" cj/custom-keymap)=, and every module registers into it via =cj/bind-prefix= / =cj/bind-command=. Binding that one keymap under a second prefix mirrors the whole family for free — no per-module edits. - -Easy prefix candidates (home-row-leaning, TTY-safe), same leaf keys under each: -- =C-c ;= (recommended) — keeps the semicolon mnemonic; =C-c= is the standard user prefix and always TTY-encodable, =;= is home row. =C-; L= becomes =C-c ; L=, zero leaf-key relearning. Bind it unconditionally alongside =C-;= so both GUI and TTY reach the identical map — no =env-terminal-p= branch needed. -- =C-c SPC= — easy reach, but collides with =org-table-blank-field= (=C-c SPC=) inside org buffers. -- Bare =C-c <leaf>= (the literal "C-c L" idea) — rejected: =C-c= is shared with org (=C-c l= = =org-store-link=, confirmed live), the LSP prefix (=lsp-keymap-prefix "C-c l"=), and pdf-view; binding the whole family under bare =C-c= would shadow/conflict with those. - -While in here, audit individual leaf chords for other non-TTY keys (any =C-RET=, super/hyper bindings — terminals can't send super/hyper either) and note or remap them. Verify the result in an actual =emacs -nw= / =emacsclient -nw= frame, not just GUI. Relates to the standing "org-mode keybinding consolidation" reminder. - -** TODO [#B] F-key Completion :feature: +Package faces model =inherit= explicitly, but UI faces currently expose only fg/bg/style fields in the table and generated theme output. Before implementing UI-face inheritance, write and review a small spec that defines: which UI faces get an inherit selector, how own defaults from =emacs-default-faces.json= appear versus effective inherited values, how export/import stores cleared vs inherited vs explicit values, how preview resolution follows UI inherit chains, and what browser gates prove the behavior. This touches the UI model, generated defaults, export format, preview rendering, and reset semantics, so it should not be slipped in as a refactor. + +*** TODO [#C] theme-studio: calibre package doesn't color properly :bug:studio: +The calibre package preview has no elements to theme in the search list, and coloring switches to the string color on mismatched quotes. Investigate, then record a diagnosis and solution in this task before fixing. From the roam inbox 2026-06-15. +*** TODO [#C] theme-studio: break org-mode preview into grouped subsections :feature:studio: +Rather than cramming all org-mode preview into one pane, split into groups so each element is shown in a common, context-rich environment. From the roam inbox. +*** TODO [#C] theme-studio: converter drops :inherit on UI faces :bug:studio: +build-theme.el's UI tier passes inherit=nil to --attrs, so a UI face that relies only on its inherit field (no explicit fg/bg) loses the inheritance in the generated theme, while the studio preview shows the inherited color via resolveUiAttr. The package tier already emits :inherit; the UI tier should match. Surfaced while diagnosing why mode-line-inactive looked off in Emacs versus the preview (that case had explicit colors and turned out to be a stale deploy, but the inherit gap is real for any inherit-only UI face). +*** TODO [#C] theme-studio: elfeed ignores theme assignments :studio:studio: +The preview shows theme colors, but elfeed itself renders all-white with no variation. Note: this may be the shr-rendered entry/article view (elfeed-show), where color often comes from the document rather than the theme — confirm whether the symptom is in the search list or the article view. From the roam inbox. +*** VERIFY [#C] theme-studio face-consistency check :feature:studio:next: :PROPERTIES: -:LAST_REVIEWED: 2026-06-02 +:LAST_REVIEWED: 2026-06-10 :END: +Needs from Craig: this is an open-ended feature, not a bug — it needs a spec first (what "consistency" means: which faces are compared, what rule flags an inconsistency, how it's surfaced in the UI). Give me the check's definition (or say "brainstorm a spec") and I'll build it; parked until then. +Rule taxonomy captured in [[file:docs/design/theme-studio-face-rules.org][docs/design/theme-studio-face-rules.org]] (Design Rules vs Fidelity Rules). The two checks below map to those two rule kinds. Both surface structural-attribute (weight/slant/underline/box/overline/height) issues; color is the theme's design and out of scope. -The L546 ticket "Rework dev F-keys" landed roughly 75% as of the 2026-05-27 audit. F4 (compile+run dispatcher, project-type detection, clean-rebuild, projectile cache revert), F7 (coverage), and the format-key migration off F6 are all shipped with ERT coverage. F6 ships Phase 2a only — "All tests" and "Current file's tests" via plain F6 and C-F6. - -Phase 2b remains: per-language test discovery, the "Run a test..." menu entry, M-F6 fast path, buffer-local last-test memory, and the spec-mandated "No tests found for <buffer>" error. The =dev-fkeys.el= header (L35–46) already sketches the tree-sitter capture-then-filter pattern needed to work around Emacs bug #79687 on the emacs-30 branch. - -Two smaller cleanups also fall out: the header comment claims TS/JS is "punted for v1" while the cmd-builder at =dev-fkeys.el:384= actually emits a vitest/jest command, and the cmd-builder is a likely home for =cj/--tests-in-buffer= once it lands. +1. Theme cross-cutting consistency (primary, per Craig 2026-06-09): the theme has deliberate cross-cutting rules — e.g. headings/titles are bold, links are underlined, errors/warnings/success are bold. Flag where the theme BREAKS ITS OWN rule (a heading that isn't bold, a link that isn't underlined). The designer declares the rules; the check finds the violators. This is the "tell me where I broke the rule" guardrail. -Open: helper home — keep =cj/--tests-in-buffer= in =dev-fkeys.el= (per L546 spec) or push it into =test-runner.el= (per the parallel "Fix up test runner" thread). Elisp "Run a test..." — drill into individual =ert-deftest= names, or keep the current regex-aggregate (=make test-name TEST=^test-<stem>-=). +2. defface-baseline divergence (secondary): flag where a face's structural attrs differ from its package =defface= so each divergence is deliberate, not an accidental drop. Would have caught the dropped underline/bold defaults and the contradictions (shr-h3 bold-vs-italic, erc-action italic-vs-bold) from the package-face audit as they were introduced. -*** TODO [#B] Per-language test discovery helper :feature:test: -Build =cj/--tests-in-buffer= returning a list of test names; tree-sitter capture-then-filter for python/go/ts/js per the bug #79687 workaround in =dev-fkeys.el= L35–46; sexp scan for elisp =ert-deftest= forms. +Bake into the tool (a lint surfaced in the UI) or run as a build-time check (seeds vs live deffaces via emacsclient). -*** TODO [#B] F6 Run-a-test menu entry :feature:test: -Add "Run a test..." to =cj/f6-test-runner= candidates; pre-select =cj/--last-test-run=; signal =user-error= "No tests found for <buffer>" when discovery returns nil. +*** TODO [#C] theme-studio: restrict the cursor row to its background :bug:studio: +The UI table gives the cursor face the full control set (fg, B/I/U/S, box), but Emacs only honors the cursor face's :background. Its shape is cursor-type, not a face attribute, so every other control on that row is a no-op once the theme loads. Restrict the cursor row to just its background swatch so the studio doesn't present controls Emacs drops. +*** TODO [#C] theme-studio terminal/ANSI colors :feature:studio: +theme-studio represents GUI faces only; terminal colors aren't surfaced at all. Scope decided 2026-06-09: GUI-first faces, NOT full per-face display-class fallback. Two pieces: -*** TODO [#B] M-F6 fast path :feature:test: -Bind =M-<f6>= to a thin wrapper that calls the same "Run a test..." path directly; release the reservation comment at =dev-fkeys.el:541=. +1. ANSI-16 panel. Map the 16 ANSI slots (black/red/green/yellow/blue/magenta/cyan/white + bright variants) to palette colors, with a preview, and export them so =build-theme.el= emits the =ansi-color-*= / =term-color-*= faces. This matters even in pure-GUI Emacs: colored shell output, compilation buffers, eshell, and vterm/eat all draw from these. Signals must line up with their ANSI slot (error red→ansi red, success→green, warning→yellow, info/link→blue) so a signal reads the same in a terminal. -*** TODO [#B] Buffer-local cj/--last-test-run :feature:test: -Add the buffer-local var, set it on each "Run a test..." selection, use it as the completing-read default so a bare RET re-runs the last test. +2. Core-face 16-color fallback. Only the ~10 faces that decide console legibility get a =(((class color) (min-colors 16)) ...)= clause plus a =(t ...)= floor: default/fg, bg, keyword, string, comment, constant, error, warning, region, mode-line, line-number. Tune these for contrast — push it UP, legibility over fidelity, because the only 16-color target is the bare Linux virtual console (an occasional emergency context). The long tail stays GUI-first and auto-approximates. -*** TODO [#B] TS/JS coverage status sync -Update the =dev-fkeys.el= header comment (L33) — TS/JS is no longer punted; the cmd-builder at L384 emits vitest/jest. Document the prefer-vitest fallback. +Why this scope: the GUI and the normal terminal (foot + tmux, truecolor / ≥256-color) both render the GUI hexes fine; GUI-first is correct there. Only the Linux VT is 16-color, and a low-contrast palette approximates badly down to 16 — so a few core faces get a deliberately higher-contrast 16-color fallback rather than every face carrying a multi-spec. Tool work: the ANSI-16 panel + a flag on the core faces to also capture a 16-color value; =build-theme.el= emits multi-spec only for those. Full per-face fallback is revisited only if console work becomes regular. +*** TODO [#D] theme-studio CIEDE2000 DeltaE option :feature:studio: +Deferred from the perceptual color metrics spec (vNext). v1 uses DeltaE-OK on its native scale with a 0.02 threshold (decided); revisit CIEDE2000 only if the native OKLab scale proves too unfamiliar or poorly calibrated for palette distinguishability. Spec: [[id:15db8ae3-fc14-49f3-9ed5-d5ff59790904][spec]] (vNext candidates; review folded in 2026-06-08). +*** TODO [#D] theme-studio low-contrast preset/mask mode :feature:studio: +Deferred from the perceptual color metrics spec (vNext). After raw OKLCH/APCA/DeltaE readouts exist, decide whether to add a named low-contrast workflow: APCA Lc bands, a contrast ceiling/floor mask, or a "soft" sibling to the existing any/AA+/AAA picker mask. Spec: [[id:15db8ae3-fc14-49f3-9ed5-d5ff59790904][spec]] (vNext candidates; review folded in 2026-06-08). +*** TODO [#D] theme-studio per-tier reseed controls :feature:studio: +Deferred from the seeding-engine spec (vNext). V1 reseeds all three guide-owned tiers at once; later consider separate "reseed syntax", "reseed UI", and "reseed package/org" controls if all-at-once proves too blunt. Spec: [[id:b70b37f2-37df-4c8e-ac2f-1f20d12e33dd][spec]] (vNext; review folded in 2026-06-08). +*** VERIFY [#C] Palette-columns spec review +SCHEDULED: <2026-06-12 Fri> +Read [[file:docs/theme-studio-palette-columns-spec.org][docs/theme-studio-palette-columns-spec.org]] (Draft, from the 2026-06-10 design discussion) and bless or amend. Decisions 9 and 10 are the two session calls awaiting your word: strips flip to lightest→darkest top→bottom to match the dropdown, and each dropdown column run places the base at its natural lightness position (vs bg/fg bases leading before any steps). On "spec's good": mark Ready, file the phase breakdown, cancel the [#C] hint-override task, start Phase 1. -** TODO [#B] Fix up test runner :bug: +*** TODO [#D] org-faces: dim variants and retire dupre-org-* :feature:theme-studio: +vNext from the org-faces spec: org-faces-*-dim variants wired into auto-dim so keywords stay legible in unfocused windows, and migrate or retire the legacy dupre-org-* set. [[id:35578114-8c29-43af-97a2-fdfea01a802e][org-faces-spec-implemented.org]] +*** TODO [#D] Face diagnostic popup — theme-studio bridge (vNext) :feature: +vNext for the face/font diagnostic tool: interactivity — "send this face to theme-studio", jump-to-theme-spec, any write path. Deferred per [[id:98f065cf-8bd5-46a0-ac24-da94d66855ad][the spec]]'s scope tiers. +*** 2026-06-16 Tue @ 05:10:55 -0500 Alphabetized the assignment-view package dropdown +The package-faces optgroup (below the @code/@ui editor entries) now lists apps alphabetically by display label. Root cause: =buildViewSel= iterated =for(const app in APPS)=, and =generate.py= builds APPS as bespoke apps first then inventory apps, so the combined list wasn't alphabetical. Fix is localized to the view-list build per the plan: added a pure =appViewKeysSorted(apps)= helper in =app-core.js= (sorts keys by label, case-insensitive, key fallback when a label is missing) and =buildViewSel= iterates it. TDD: 4 node tests in =test-app-core.mjs= (red->green); updated the #viewtest browser gate from asserting insertion order to asserting =appViewKeysSorted(APPS)=; full theme-studio suite green (Python + Node + all browser gates). Commit =afd2ddad=, pushed. Visual sign-off optional (gate already confirms the DOM order). +*** 2026-06-16 Tue @ 06:11:30 -0500 Contrast cell: dropped PASS/FAIL, verdict moved to the hover +Craig's call (option a + hover): the contrast cell now shows just the rating-colored number (green = passes AAA, grey = passes AA, red = fails AA), and the WCAG meaning lives in a hover. Added a pure =contrastTitle(r)= to =app-util.js= (4 node tests), changed =crHtml= (app.js) to drop the verdict word and set =title=, kept =verdictFor= for the covered-overlay worst-case readout (untouched, #contrasttest still green). New #crtest browser gate; full theme-studio suite green. Commit =9e99749d=, pushed. +*** DOING [#B] Dashboard theming broken: font-lock strips faces; items + icons :bug: +Investigated 2026-06-16. Three independent causes make the live dashboard render banner, headings, and items in the default face, with no file/section icons. Diagnosis grounded in live daemon inspection (face props, overlays, font-lock state). + +**** Cause A — banner + section headings render default ("Banner Text not gold") +=global-font-lock-mode= (enabled at startup, =early-init.el:311=) fontifies the =*dashboard*= buffer. Dashboard applies the banner title (=dashboard-banner-logo-title=) and section headings (=dashboard-heading=) via the =face= TEXT PROPERTY. font-lock owns the =face= property and strips manually-applied ones it didn't set via keywords, so those faces get cleared on render (every line carries =fontified t=, the jit-lock fingerprint). The theme is fine: =dashboard-banner-logo-title= computes to #dab53d gold and =dashboard-heading= to #67809c — they're stripped at render, not missing. This is a regression of the 2026-05-22 fix "Dashboard navigator icons and section titles uncolored" (7496), which worked before font-lock ran in this buffer. +FIX A — DONE 2026-06-16, commit =202cf430=: exclude dashboard-mode from global font-lock — =(setq font-lock-global-modes '(not dashboard-mode))= at top level in =dashboard-config.el= (top-level so it runs even though the use-package =:config= errors on a void nerd-icons symbol under the test harness). Banner is gold again and the headings pick up =dashboard-heading=. TDD test =tests/test-dashboard-config-font-lock.el=; full suite green; live in the daemon. Causes B and C still open below. + +**** Cause B — project/bookmark/recent items have no color +Items and the navigator are painted by a =dashboard-items-face= button OVERLAY (overlays survive font-lock, which is why Cause A didn't touch them). But in =WIP-theme.el= =dashboard-items-face= is just =(:inherit widget-button)= — unspecified foreground, so it renders in the default color. 7496 had colored it (steel+2) in the now-retired Dupre theme; that color never carried into WIP. Per 7496, the navigator and items share =dashboard-items-face=, so coloring it colors both (separating them is the open task "Color dashboard navigator independently of list items", 7740). +FIX B (per Craig 2026-06-16 — no hardcoded colors, theme it): the items already fall back to the default foreground (=dashboard-items-face= inherits =widget-button= -> unspecified -> default fg), which is the right default. To actually COLOR them, theme-studio must expose =dashboard-items-face= so the color comes from the theme, not a hardcoded hex in =WIP-theme.el=. That is the items half of task 2418. No config/theme change here; this routes to 2418. + +**** Cause C — no icons on items or section titles +=dashboard-set-file-icons= and =dashboard-set-heading-icons= are both nil in the live config (=dashboard-config.el= sets =dashboard-display-icons-p t= + =dashboard-icon-type 'nerd-icons= but never the two enable toggles), so dashboard renders no file/section icons. Only the custom navigator row has icons. +FIX C — file icons DONE 2026-06-16, commit =1c97cba7=: =(setq dashboard-set-file-icons t)= in =dashboard-config.el=. Items now show nerd-icons file icons colored per filetype (verified live: =todo.org= -> nerd-icons-lgreen, project dirs -> nerd-icons-yellow; bookmarks fall back to a generic uncolored icon, no filetype to map). Per Craig: per-filetype (the nerd-icons default). They render only because Fix A took the dashboard out of font-lock, which was stripping the icon faces too. OPEN (offered, not done): =dashboard-set-heading-icons t= would add icons to the section titles — left off pending Craig's call. + +**** Studio angle +To set the item color from theme-studio instead of hand-editing =WIP-theme.el=, the studio's dashboard app must expose =dashboard-items-face= as editable — the "list items unthemed" half of task 2418 (theme-studio: dashboard preview icons missing, list items unthemed). + +**** Next +Confirm Fix A to persist it; pick the item color (Fix B); decide the icon enable + color policy (Fix C). +*** TODO [#B] theme-studio semantic theme architecture :feature:theme-studio:spec: :spec:studio: :PROPERTIES: -:LAST_REVIEWED: 2026-06-06 +:LAST_REVIEWED: 2026-06-14 :END: -*** 2026-05-16 Sat @ 11:15:51 -0500 Ideas -**** Current State -=modules/test-runner.el= is a solid first pass for an Emacs-config-specific ERT -workflow: -- project-scoped focus lists -- run all vs focused mode -- run ERT test at point -- load all test files -- clear ERT tests from other project roots -- keybindings under =C-; t= - -The universal test-running direction is currently split across modules: -- =test-runner.el= owns ERT focus/state/UI. -- =dev-fkeys.el= owns F6 language detection and command generation for Elisp, - Python, Go, and partial TypeScript. - -That split is the biggest architectural pressure point. The test runner should -eventually own runner discovery, scopes, command construction, result handling, -and UI. F6 should become a thin entry point into the runner. - -**** Critical Design Issues -***** Too ERT-specific at the core -The current state model is named generically, but most operations assume: -- test files live in =test/= or =tests/= -- files match =test-*.el= -- tests are ERT forms -- individual tests can be selected by ERT selector regex -- loading tests into the current Emacs process is acceptable - -This makes the module hard to extend cleanly to pytest, Jest, Vitest, Go, Rust, -or shell test runners. The common abstraction should be "test run request" and -"test runner adapter", not "ERT file list". - -***** In-process ERT causes state contamination -=cj/test-load-all= and focused runs load test files into the current Emacs -session. This is fast and ergonomic, but it can leak: -- global variables -- advice -- loaded features -- overridden functions -- ERT test definitions -- load-path mutations - -The runner should support two ERT execution modes: -- =interactive= / in-process for fast local TDD -- =isolated= / batch Emacs for reliable verification - -The isolated path should be preferred for "before commit", CI parity, and -agent-driven verification. - -***** Test discovery is regex-based and fragile -=cj/test--extract-test-names= scans files with a regex for =ert-deftest=. -That misses or mishandles: -- macro-generated tests -- commented forms in unusual shapes -- multiline or reader-conditional forms -- non-ERT Elisp tests such as Buttercup -- stale ERT tests already loaded in the session - -Better approach: -- for ERT in isolated mode, let ERT discover tests after loading files -- for source navigation, use syntax-aware forms where possible -- store discovered tests as structured records with file, line, name, framework, - tags, and runner - -***** Path containment has at least one suspicious edge -=cj/test--do-focus-add-file= checks: - -#+begin_src elisp -(string-prefix-p (file-truename testdir) (file-truename filepath)) -#+end_src - -That should use =cj/test--file-in-directory-p= or ensure the directory has a -trailing slash. Otherwise sibling paths with a shared prefix are a recurring -class of bug. - -***** Runner commands are shell strings too early -=cj/--f6-test-runner-cmd-for= returns shell command strings. That makes it -harder to: -- inspect command parts -- safely quote arguments -- offer command editing -- run via =make-process= / =compilation-start= without shell ambiguity -- attach metadata -- rerun exact invocations -- convert commands into UI labels - -Prefer a structured command object: - -#+begin_src elisp -(:program "pytest" - :args ("tests/test_foo.py" "-q") - :default-directory "/project/" - :env (("PYTHONPATH" . "...")) - :runner pytest - :scope file) -#+end_src - -Render to a shell string only at the final compilation boundary. - -***** F6 and =C-; t= workflows duplicate the same domain -F6 already handles "all tests" and "current file's tests" for multiple -languages. =C-; t= handles ERT-only focus and run state. These should converge -on one runner service: -- F6: quick entry point -- =C-; t=: full runner menu -- both call the same scope/adapter engine - -***** Test directory discovery is too narrow -Current discovery prefers =test/= then =tests/=, with a global fallback. Real -projects often need: -- Python: =tests/=, package-local =test_*.py=, =pytest.ini=, =pyproject.toml= -- JS/TS: =package.json= scripts, =vitest.config.*=, =jest.config.*=, - =*.test.ts=, =*.spec.ts= -- Go: package directories, =go.mod= -- Rust: =Cargo.toml=, integration tests under =tests/= -- Elisp packages: =Makefile=, =Eask=, =ert-runner=, Buttercup, =tests/= - -Discovery should be adapter-specific and project-config-aware. - -***** No structured result model -=cj/test-last-results= exists but is not meaningfully populated. A powerful -runner needs a normalized result model: -- run id -- started/finished timestamps -- status: passed/failed/errored/cancelled/skipped/xfail/xpass -- command -- runner adapter -- scope -- exit code -- duration -- failed test records -- file/line locations -- raw output buffer -- coverage artifact paths - -This enables last-failed, failures-first, summaries, dashboards, and AI-assisted -failure explanation. - -***** No failure parser / navigation layer -Compilation buffers are useful, but the runner should parse common failure -formats and provide: -- next/previous failure -- jump to source line -- failure summary buffer -- copy failure context -- rerun failed test at point -- annotate failing tests in source buffers +Spec draft: [[id:fe980b12-451a-4d8b-a550-d99f9ec49f45][theme-studio-semantic-theme-architecture-spec.org]]. -Adapters can provide regexes/parsers for ERT, pytest, Jest/Vitest, Go, Rust, -and shell. - -***** Missing watch/rerun modes -Modern test runners optimize the feedback loop: -- pytest supports selecting tests, markers, last-failed, failures-first, - stepwise, fixtures, xfail/skip, plugins, and cache state. -- Jest/Vitest support watch workflows, changed-file selection, coverage, - snapshots, and rich interactive filtering. Vitest also defaults to watch in - development and run mode in CI. -- Go and Rust runners commonly support package-level runs, regex selection, - race/coverage flags, and cached test behavior. - -The Emacs runner should expose the subset that maps well to editor workflows: -- current test -- current file -- related test file -- focused set -- last failed -- failed first -- changed since git base -- watch current scope -- full project -- coverage for current scope +Design a Modus-inspired layered Theme Studio output path: palette data, semantic role mappings, face templates, and a generated theme wrapper. Keep the current flat JSON-to-theme converter as the compatibility/default path while proving a layered, self-contained generated theme. Include advisory semantic rules as a possible validation layer, not v1 enforcement. -**** Proposed Architecture -***** Core Types -Use plain plists initially; promote to =cl-defstruct= only if helpful. - -#+begin_src elisp -;; Test runner adapter -(:id pytest - :name "pytest" - :languages (python) - :detect cj/test-pytest-detect - :discover cj/test-pytest-discover - :build-command cj/test-pytest-build-command - :parse-results cj/test-pytest-parse-results - :capabilities (:current-test :file :project :last-failed :coverage :watch)) - -;; Test run request -(:project-root "/repo/" - :language python - :framework pytest - :scope file - :file "/repo/tests/test_api.py" - :test-name "test_create_user" - :extra-args ("-q") - :profile default) - -;; Test run result -(:run-id "..." - :status failed - :exit-code 1 - :duration 2.14 - :failures (...) - :output-buffer "*test pytest*" - :artifacts (...)) -#+end_src - -***** Adapter Registry -Create a registry like: - -#+begin_src elisp -(defvar cj/test-runner-adapters nil) -(cj/test-register-adapter 'pytest ...) -(cj/test-register-adapter 'ert ...) -(cj/test-register-adapter 'vitest ...) -#+end_src - -Runner selection should consider: -- buffer file extension -- project files -- explicit user override -- available executables -- package manager scripts -- existing Makefile targets - -***** Scope Model -Make scopes explicit and shared across languages: -- =test-at-point= -- =current-file= -- =related-file= -- =focused-files= -- =last-failed= -- =changed= -- =package/module= -- =project= -- =coverage= -- =watch= - -Each adapter can say which scopes it supports. Unsupported scopes should produce -clear user-errors with suggestions. - -***** Command Builder Pipeline -1. Detect project. -2. Detect language/framework candidates. -3. Resolve user-requested scope. -4. Build structured command object. -5. Optionally let user edit command. -6. Run via =compilation-start= or =make-process=. -7. Parse output/result artifacts. -8. Store normalized result. -9. Update UI/modeline/messages/failure buffer. - -***** Keep Makefile Support But Do Not Require It -For this Emacs config, =make test-file= and =make test-name= are useful and -should remain the default Elisp isolated path. But adapter detection should -support: -- direct =emacs --batch= ERT invocation -- =make test= -- =make test-file= -- =make test-name= -- Eask -- Buttercup - -**** Elisp-Specific Improvements -***** Add isolated ERT runs -Support batch commands for: -- all project tests -- one test file -- one test name -- focused files -- last failed, once result parsing exists - -Use the same Makefile targets in this repo, but design the adapter so other -Elisp projects can run without this Makefile. - -***** Support Buttercup/Eask Later -Buttercup uses BDD-style =describe= / =it= suites and is common in Elisp -package testing. Eask is often used to run package tests. Add adapter slots -for these instead of hard-coding ERT forever. - -***** Avoid unnecessary global ERT deletion -=cj/ert-clear-tests= is a pragmatic fix for project contamination, but the -stronger long-term answer is isolated runs plus project-scoped discovery. Keep -the cleanup command, but do not make correctness depend on deleting global ERT -state. - -**** Python / pytest Ideas -- Detect pytest by =pyproject.toml=, =pytest.ini=, =tox.ini=, =setup.cfg=, or - presence of =tests/=. -- Build commands for: - - project: =pytest= - - file: =pytest path/to/test_file.py= - - test at point: =pytest path/to/test_file.py::test_name= - - class method: =pytest path::TestClass::test_method= - - marker: =pytest -m marker= - - last failed: =pytest --lf= - - failed first: =pytest --ff= - - stop after first: =pytest -x= - - coverage: =pytest --cov=...= -- Parse output for failing node ids and =file:line= references. -- Read pytest cache for last-failed where useful. -- Offer marker completion by parsing =pytest --markers= or config files. -- Surface xfail/skip separately from hard failures. - -**** TypeScript / JavaScript Ideas -***** Detection -Detect runner by project files and scripts: -- =vitest.config.ts/js/mts/mjs= -- =jest.config.ts/js/mjs/cjs= -- =package.json= scripts: =test=, =test:watch=, =vitest=, =jest= -- lockfile/package manager: =pnpm-lock.yaml=, =yarn.lock=, =package-lock.json=, - =bun.lockb= - -Prefer project scripts over raw =npx= when present: -- =pnpm test -- path= -- =npm test -- path= -- =yarn test path= -- =bun test path= - -***** Scopes -- current file: =vitest run path= or =jest path= -- test at point: use nearest =it= / =test= / =describe= string and pass =-t= -- watch current file -- changed tests where runner supports it -- coverage current file/project -- update snapshots - -***** Result Parsing -Parse: -- failing test names -- file paths and line numbers -- snapshot failures -- coverage summary - -Treat snapshot updates as an explicit command, not an automatic side effect. - -**** Go Ideas -- Detect =go.mod=. -- Current file/source: run package =go test ./pkg=. -- Test at point: nearest =func TestXxx= and run =go test ./pkg -run '^TestXxx$'=. -- Bench at point: nearest =BenchmarkXxx= and run =go test -bench '^BenchmarkXxx$'=. -- Add toggles for =-race=, =-cover=, =-count=1=, =-v=. -- Parse =file.go:line:= output and package failure summaries. - -**** Rust Ideas -- Detect =Cargo.toml=. -- Use =cargo test= by default, optionally =cargo nextest run= when available. -- Current test at point: nearest =#[test]= function. -- Current file/module where possible. -- Integration test file: =cargo test --test name=. -- Support =-- --nocapture= toggle. -- Parse compiler/test failures and =file:line= links. - -**** Shell / Generic Ideas -- Adapter for Makefile targets: - - detect =make test=, =make check=, =make coverage= - - expose project-level commands even when language-specific detection fails -- Adapter for arbitrary project command configured in dir-locals or a project - config plist. -- Let users register custom command templates per project: - -#+begin_src elisp -((:name "unit" - :command ("npm" "run" "test:unit" "--" "{file}")) - (:name "integration" - :command ("pytest" "tests/integration" "-q"))) -#+end_src - -**** UI Ideas -***** Transient Menu -Replace or complement the raw keymap with a =transient= menu: -- scope: current test/file/focused/last failed/project -- runner: auto/ert/pytest/vitest/jest/go/cargo/make -- toggles: watch, coverage, debug, fail-fast, verbose, update snapshots -- actions: run, rerun, edit command, show failures, open report - -***** Result Buffer -Create a normalized =*Test Results*= buffer: -- latest status per project -- command and duration -- pass/fail/skip counts -- failure list with clickable =file:line= -- actions to rerun failed/current/all -- links to coverage artifacts - -***** Modeline / Headerline Signal -Show the last run status for the current project: -- green passed -- red failed -- yellow running -- gray no run - -Keep it quiet and optional. - -***** History -Store recent run requests per project: -- rerun last -- rerun last failed -- choose previous command -- compare duration/status against previous run - -**** Configuration Ideas -- =cj/test-runner-default-scope= -- =cj/test-runner-prefer-isolated-elisp= -- =cj/test-runner-project-overrides= -- =cj/test-runner-known-adapters= -- =cj/test-runner-enable-watch= -- =cj/test-runner-result-retention= -- per-project override through =.dir-locals.el= - -Example: - -#+begin_src elisp -((nil . ((cj/test-runner-project-overrides - . (:adapter pytest - :default-args ("-q") - :coverage-args ("--cov=src")))))) -#+end_src - -**** Safety And Robustness -- Use structured commands until the final boundary. -- Quote only at render time. -- Avoid shell when =make-process= / =process-file= is sufficient. -- Keep command preview/editing available for surprising cases. -- Detect missing executables before running. -- Add timeouts/cancel commands for long-running or hung tests. -- Do not silently fall back from a missing runner to a different runner unless - the fallback is visible in the command preview. -- Avoid mutating global =load-path= permanently. -- Keep remote/TRAMP behavior explicit; do not accidentally run local commands - for remote projects. - -**** Coverage Integration -Tie this into the existing coverage work: -- run coverage for current file/scope -- open latest coverage report -- summarize uncovered lines for current file -- support Elisp SimpleCov/Undercover, pytest-cov, Vitest coverage, Go cover, - and Rust coverage later -- store coverage artifact paths in the normalized run result - -**** AI-Assisted Debugging Ideas -- Summarize failing tests from the parsed failure records and raw output. -- Include command, changed files, failure snippets, and relevant source/test - locations. -- Redact env vars, tokens, Authorization headers, and secrets before sending to - =gptel=. -- Add commands: - - =cj/test-runner-explain-failure= - - =cj/test-runner-suggest-related-tests= - - =cj/test-runner-summarize-coverage-gap= - -**** Migration Plan -***** Phase 1: Internal cleanup -- Fix the task typo and rename current ERT-specific functions or wrap them under - an ERT adapter. -- Move F6 language detection/command construction from =dev-fkeys.el= into - =test-runner.el= or a new =test-runner-core.el=. -- Replace shell-string command builders with structured command plists. -- Fix path containment in =cj/test--do-focus-add-file=. -- Make =cj/test-last-results= real for ERT runs. - -***** Phase 2: ERT adapter -- Implement adapter registry. -- Add ERT adapter with in-process and isolated modes. -- Preserve all current keybindings by routing them through the adapter. -- Add failure/result normalization for ERT. -- Add "rerun last" and "rerun failed" for ERT. - -***** Phase 3: Python and JS/TS adapters -- Add pytest adapter. -- Add Vitest/Jest adapter with package-manager/script detection. -- Support current file and test-at-point for both. -- Add parser/navigation for common failures. - -***** Phase 4: UI and watch modes -- Add transient menu. -- Add result buffer. -- Add cancellation and rerun history. -- Add watch commands where supported. - -***** Phase 5: Coverage and AI -- Connect coverage commands to adapter capabilities. -- Add failure summarization with redaction. -- Add coverage-gap summarization. - -**** Acceptance Criteria For First Fix-Up Pass -- Existing ERT workflow still works. -- F6 and =C-; t= use the same underlying runner API. -- Current-file test command generation is covered for Elisp, Python, Go, - TypeScript, and JavaScript. -- At least one isolated ERT command path exists. -- Path containment checks are robust against sibling-prefix paths and symlinks. -- Runner requests and results are represented as data, not only messages. -- Missing runner/tool errors are clear and actionable. -- Tests cover adapter detection, command building, scope resolution, result - storage, and key interactive paths. - -** TODO [#B] Add Signal to the dashboard :quick:solo: +**** TODO [#B] theme-studio palette generator source modes for base-only vs ground-aware palettes :feature: :PROPERTIES: -:LAST_REVIEWED: 2026-06-01 +:LAST_REVIEWED: 2026-06-14 :END: -** TODO [#B] Messenger window/key unification :feature: -Spec: [[file:docs/design/messenger-unification-spec.org][messenger-unification-spec.org]] (Draft, 2026-06-11). One library (=cj-messenger-lib.el=) gives every messenger the same shape: chat windows rise from the bottom (the signel rule, generalized), C-c C-c confirms, C-c C-k cancels, C-c C-a attaches — dispatched per backend through a registry + minor mode. Signel already conforms (reference backend); telega and slack join in phases 2-3; ERC later. All eight decisions settled 2026-06-11 (cancel closes an idle window; telega's filter-cancel shadow accepted; slack rooms join the bottom rule). Spec held open — Craig has more ideas to fold in before it's marked Ready. - -** DONE [#B] cj/undo-kill-buffer off-by-one on plain invocation :bug:quick:solo: -CLOSED: [2026-06-12 Fri] -Fixed in =modules/ui-navigation.el=: indexing is now =(nth (1- arg) ...)=, so a numeric prefix is 1-based and plain M-S-z re-opens the most-recently-killed file (was opening the second). Rewrote the two undo-kill tests to exercise the real no-prefix path (arg=1 -> first) and a 1-based numeric prefix; both red against the bug, green after. Full suite: no new failures (the 4 pre-existing dupre-theme failures are the separate task below). Live-reloaded into the daemon. - -** TODO [#C] cj/undo-kill-buffer skip-visited uses delq (eq) on path strings :bug:quick:solo: -=modules/ui-navigation.el= — the visited-file filter calls =(delq buf-file recently-killed-list)= where =buf-file= is a fresh string from =expand-file-name=, never =eq= to the =recentf-list= entries, so already-open files are never skipped (the skip logic is dead). Use =delete= (equal-based). Found 2026-06-12 while fixing the off-by-one above; the two bugs cancel exactly when one file is open, which is why it went unnoticed. +Tentative follow-up from walking through the generator algorithms. Consider splitting the current =source: palette= behavior into two explicit source modes, names TBD: +- =base color palette= — current behavior; use non-ground base color columns only and ignore bg, fg, ground spans, and color spans. +- =ground and base palette= — use bg/fg plus non-ground base color columns as generator anchors, useful when colored ground endpoints should shape fill-gap or harmony choices. -** TODO [#B] reconcile-open-repos skips any repo with a dot in its name :bug:solo: -=modules/reconcile-open-repos.el:174= — discovery regexp ="^[^.]+$"= matches only dot-free names, so =~/code/mcp.el=, =capture.el=, =google-contacts.el=, =auto-dim-other-buffers.el= etc. are never reconciled while M-P still reports "Complete." Replace with =directory-files-no-dot-files-regexp= + a hidden-dir check; add a regression test with a dotted repo name. From the 2026-06 config audit. +This may be cancelled if the extra distinction makes the generator harder to understand. Before implementing, decide final names and whether ground-aware source should include only bg/fg or also ground span steps. -** TODO [#B] jumper: register collisions and dead-marker errors :bug:solo: -Two related defects from the 2026-06 config audit: -- =modules/jumper.el:155= — removal shifts the vector without renumbering registers, so a later store allocates a register still held by a surviving location and silently overwrites it. Allocate the first free register char in the live slice; =set-register nil= on removal so freed markers don't pin buffers. -- =modules/jumper.el:117,132= — guards check =(markerp marker)= but not =(buffer-live-p (marker-buffer marker))=; after killing a buffer holding a location, M-SPC SPC and M-SPC j signal wrong-type errors. Treat dead entries as skippable/removable. -Also =jumper.el:178= — the promised single-location toggle never toggles back ('already-there branch should =jump-to-register= z when set). - -** TODO [#B] C-s C-s vertico-repeat path never works :bug:quick:solo: -=modules/selection-framework.el:263= — =cj/consult-line-or-repeat= calls =vertico-repeat= on the second consecutive C-s, but nothing adds =vertico-repeat-save= to =minibuffer-setup-hook= (grep: zero hits config-wide), so it always signals "No Vertico session". Add the hook next to the vertico use-package block. From the 2026-06 config audit. - -** DONE [#B] dashboard-config setq wipes recentf-exclude list :bug:quick:solo: -CLOSED: [2026-06-12 Fri] -Fixed in =modules/dashboard-config.el=: extracted the EMMS exclusion into =cj/--dashboard-exclude-emms-from-recentf= (the =:config= side-effect was not reachable for a test) and switched =setq= to =add-to-list=, so the five exclusions system-defaults adds earlier in init order survive. Two ERT tests in =tests/test-dashboard-config-recentf-exclude.el= (preserves prior entries / adds the pattern); the preservation test was red before, green after. Live-reloaded into the daemon and restored the five wiped entries in the running session. - -** TODO [#B] auth-config: unguarded gpg-connect-agent call + compile-time require :bug:quick:solo: -From the 2026-06 config audit. =modules/auth-config.el:88= — bare =(call-process "gpg-connect-agent" ...)= in a =:demand t= :config signals file-missing and aborts init on machines without the binary; guard with =cj/executable-find-or-warn=. =auth-config.el:36= — =user-constants= is required only =eval-when-compile= but =authinfo-file= is read at load time; works from .el source, fails from standalone .elc. Use a runtime require (system-defaults.el:32-35 documents this exact trap). - -** TODO [#B] system-defaults: top-level server-start unguarded in batch :bug:quick:solo: -=modules/system-defaults.el:140= — raw module load under =--batch= (make validate-modules on a machine with no daemon socket) starts a server from a batch process; the suite only passes because the testutil stubs it. Wrap in =(unless noninteractive ...)= — the repo's established guard for this defect class; same guard stops the =custom-file= =make-temp-file= at line 104 littering temp files per batch load. From the 2026-06 config audit. - -** TODO [#B] markdown live preview clobbered by markdown-mode :bug:quick:solo: -=modules/markdown-config.el:54= defines bare =markdown-preview=, which markdown-mode redefines the moment the first .md loads — the impatient-mode live preview is dead and F2 silently runs the package command (agent verified in the live daemon). Also =:61= guards on =(boundp 'httpd-process)=, a variable that doesn't exist in simple-httpd — use =(httpd-running-p)=. And the =:config= =(setq imp-set-user-filter 'markdown-html)= at line 41 is doubly dead (function-not-variable, symbol names nothing) — delete. Rename to =cj/markdown-preview=, rebind F2. From the 2026-06 config audit. - -** DONE [#B] org-roam dailies template writes FILETAGS and TITLE on one line :bug:quick:solo: -CLOSED: [2026-06-12 Fri] -Fixed in =modules/org-roam-config.el=: extracted the dailies head into the =cj/--org-roam-dailies-head= defconst (so it is unit-testable, the value was unreachable inside the use-package =:custom= form) and gave it real newlines — =#+FILETAGS: Journal\n#+TITLE: %<%Y-%m-%d>\n=. Two ERT tests in =tests/test-org-roam-config-dailies-head.el= assert FILETAGS and TITLE sit on separate lines and the head ends in a newline (both red before, green after). Live-reloaded into the daemon. Open follow-up for Craig: existing malformed daily files (with the run-together first line) are data, not code — sweep them by hand if desired. - -** TODO [#B] agenda sources: roam Projects missing, no existence filtering :bug:solo: -From the 2026-06 config audit, =modules/org-agenda-config.el=: -- =:182-191= — commentary and docstrings promise org-roam nodes tagged "Project" as agenda sources, but =cj/--org-agenda-scan-files= never scans them, and files added by the roam finalize-hook are wiped on the next =cj/build-org-agenda-list= cache rebuild (≤1h). Add a roam Project pass (mirror =org-refile-config.el:101-109=) or correct the docs. -- =:186,456= — agenda file list built unconditionally (inbox/calendars may not exist on a fresh machine) and =org-agenda-skip-unavailable-files= is unset — the exact interactive-prompt class that once hung the chime daemon. Filter with =file-exists-p= + set the var as backstop. - -** TODO [#B] org-roam :config triggers the 15-20s refile scan synchronously at first idle :bug:solo: -=modules/org-roam-config.el:78-79= — org-roam is =:defer 1=, so its :config calls =cj/build-org-refile-targets= at 1s idle, BEFORE the 5s background timer (=org-refile-config.el:144-151=); on a cold cache the 30k-file scan runs inline and freezes Emacs at first idle. Drop the call — org-roam is loaded long before the 5s timer fires. Likely a player in the filed org-capture 15-20s perf task (=[#B] Optimize org-capture target building performance=) — check both together. From the 2026-06 config audit. - -** TODO [#B] heavy-box comment inserts non-comment lines :bug:solo: -=modules/custom-comments.el:427= — =cj/--comment-heavy-box= interior/empty lines carry no comment prefix, so in line-comment languages (elisp, Python) C-; C h injects syntax-breaking bare =*...= lines. The existing test characterizes the broken output (asserts =^\*.*\*$=). Prefix interiors like =cj/--comment-box= does; add the missing min-length validation (negative width hits make-string with a raw error); fix the test to assert corrected output. From the 2026-06 config audit. - -** TODO [#B] calendar-sync robustness: atomic writes, curl --fail, zero-event false errors :bug:solo: -From the 2026-06 config audit, =modules/calendar-sync.el=: -- =:1309= — agenda file written via =with-temp-file= directly on the target (truncate-in-place); org-agenda/chime reading mid-write sees a partial calendar, hourly. Write temp + =rename-file= (atomic same-fs). Same for =--save-state= :258. -- =:1284= — curl runs without =--fail=: an HTTP 404/500 error page exits 0 and the HTML proceeds into conversion. -- =:1229-1233= — =--parse-ics= returns nil for both garbage and a valid calendar with zero in-window events, so healthy near-empty calendars report "parse failed" in =calendar-sync-status=. Distinguish the cases. - -** DONE [#B] drill-refile clobbers global org-refile-targets with an invalid spec :bug:quick:solo: -CLOSED: [2026-06-12 Fri] -Fixed in =modules/org-drill-config.el=: =cj/drill-refile= now =let=-binds =org-refile-targets= (the session-wide value survives) and supplies =(directory-files drill-dir t "\\.org$")= as the file list instead of the bound =drill-dir= symbol (org reads a bound symbol as a directory string, which yielded nothing). Rewrote the stale test (it asserted the buggy =(assoc 'drill-dir ...)=) into two: targets are a real .org file list, and the global is not clobbered. Both red before, green after. Live-reloaded into the daemon. - -Follow-up 2026-06-12 (Codex review): the first fix reinvented file-listing with a raw =directory-files= call, bypassing the shared validated entry point =cj/--drill-files-or-error= — no missing/unreadable-dir =user-error=, silent fall-through on an empty dir, and it included leading-dot =.org= files the rest of the module excludes. Re-routed through =cj/--drill-files-or-error= + =expand-file-name=; the test was rewritten into three (validated-helper targets, no global clobber, =user-error= on a missing dir). - -** TODO [#B] ERC: double mention notifications + tautological server list :bug:quick:solo: -From the 2026-06 config audit, =modules/erc-config.el=: -- =:281= — =erc-modules= includes the built-in =notifications= module AND :config adds =cj/erc-notify-on-mention= to the same hook — every mention fires two desktop notifications. Pick one path (keep the custom one, slated for messenger unification). -- =:100= — =cj/erc-connected-servers=: inside =with-current-buffer=, the free =erc-server-process= is the buffer's own local value, so the eq test is tautologically true — returns ALL ERC buffers (channels, dead connections). Use =erc-server-buffer-p= + =erc-server-process-alive=. -- =:238= — =user-whole-name= read at load but =user-constants= only required at compile time (same trap as auth-config/keyboard-macros). - -** TODO [#B] slack-config lifecycle gaps :bug:quick:solo: -From the 2026-06 config audit, =modules/slack-config.el=: -- =:265= — w / @ / # bound to commands neither autoloaded nor in :commands — void-function before slack loads. Add to :commands. -- =:246= — =cj/slack-close-all-buffers= reads =slack-current-buffer= (declared but unbound) without the boundp guard its sibling has — void-variable on C-; S Q before slack loads. -- =:259= — raw =global-set-key= for C-; S bypasses =cj/register-prefix-map= (signal/erc use it); invisible to the keybindings registry and the planned unification enumeration. - -** TODO [#B] erc-yank silently publishes >5-line pastes as public gists :bug: -=modules/erc-config.el:345= — C-y in any ERC buffer auto-creates a public gist for anything over 5 lines: clipboard content goes to a public URL with no confirmation, and no executable-find guard for =gist= (errors mid-send if absent). Privacy trap. Add a =yes-or-no-p= gate or drop the package for plain C-y. From the 2026-06 config audit. - -** TODO [#B] F7 diff-aware coverage classifies every changed file "not tracked" :bug:solo: -=modules/coverage-core.el:252= — =cj/--coverage-intersect= joins covered×changed by exact string key, but simplecov.json keys are ABSOLUTE paths while the git-diff parser returns repo-RELATIVE ones — zero matches ever, so working-tree/staged/branch scopes report ":tracked nil" for everything and F7's main feature is inert (whole-project scope works, same-source keys). Unit tests hand-build matching keys so they pass; add one integration test feeding a real undercover report + real diff. Normalize both sides to repo-relative. From the 2026-06 config audit. - -** TODO [#B] eshell: visual-commands nested-list + xterm-color dead hook :bug:quick:solo: -=modules/eshell-config.el:104= — =add-to-list= pushes one LIST into the flat string list =eshell-visual-commands=, so lf/ranger/htop/top never get a visual terminal (and the r→ranger alias garbles). dolist the strings. =:166= — =:hook (eshell-before-prompt-hook . ...)= gets "-hook" appended → registers on nonexistent =eshell-before-prompt-hook-hook=; and =xterm-color-filter= is never added to =eshell-preoutput-filter-functions= anyway while TERM advertises xterm-256color. Wire xterm-color fully per its README or drop it + the TERM override. From the 2026-06 config audit. - -** TODO [#B] dirvish M (mark all files) marks every other file :bug:quick:solo: -=modules/dirvish-config.el:218= — =dired-mark= advances point to the next line itself; the loop's extra =forward-line 1= then skips it, so consecutive files are marked alternately. Live mis-marking on a key that feeds batch operations (delete/copy on marked files) — data-loss adjacent. Drop the manual forward-line when a mark was made (or =dired-unmark-all-marks= + mark dirs + =dired-toggle-marks=). The trivial line-predicate helper is tested; the loop isn't — add the marked-count test. From the 2026-06 config audit. - -** TODO [#B] dwim-shell: zip overwrites its own name, backup timestamp never expands, dired menu key dead :bug:quick:solo: -From the 2026-06 config audit, =modules/dwim-shell-config.el=: -- =:338= — single-file zip is =zip -r '<<fne>>.<<e>>' '<<f>>'= — reconstructs the input filename as the archive ("Zip file structure invalid"; directories produce =foo.=). Should be ='<<fne>>.zip'= like the tar-gzip sibling. -- =:549= — backup destination single-quotes =$(date ...)= so the substitution is literal: =foo.txt.$(date +%Y%m%d_%H%M%S).bak=. Move it outside the quotes or format-time-string in Elisp. -- =:932= — dired-mode binding "M-S-d" is unreachable (Meta+Shift+d generates M-D); the dirvish binding two lines down is correctly "M-D". Fix + the stale commentary at dirvish-config.el:30. - -** TODO [#B] Go: format key void-functions, go-mode :config never runs :bug:quick:solo: -=modules/prog-go.el:99,113-118= — .go maps to go-ts-mode so the go-mode package never loads, and =gofmt= isn't autoloaded in go-mode 1.6.0 — C-; f signals void-function, and the :config (exec-path += ~/go/bin, =gofmt-command "goimports"=) never executes. Wrapper that requires go-mode first (or autoload gofmt), move the setup to top level. From the 2026-06 config audit. - -** TODO [#B] prog hooks mutate global state per buffer :bug:quick:solo: -From the 2026-06 config audit: =prog-go.el:64=, =prog-c.el:73=, =prog-shell.el:77= call global =(electric-pair-mode t)= from buffer setup hooks — one Go/C/shell buffer turns on pairing in org/text everywhere (python/webdev correctly use =electric-pair-local-mode=). =prog-general.el:79-80= — =display-line-numbers-type 'relative= setq/setq-default run from the hook AFTER the mode is enabled, so the first prog buffer of a session gets absolute numbers. Local-mode for the three; move the line-number setqs to top level. +*** TODO [#B] theme-studio seeding engine :feature:studio: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +Spec (Ready): [[id:b70b37f2-37df-4c8e-ac2f-1f20d12e33dd][spec]]. Role table → guide-correct defaults for syntax/UI/org; reseed dupre-revised.json to the compact mapping; opens seeded with an all-tier reseed button. Depends on the perceptual-metrics colormath.js core for OKLCH shade generation, so it runs after that feature's Phase 1. +**** TODO Seed model + seed() + #seedtest :solo: +Phase 1. Palette anchors + OKLCH shade generation (reusing colormath.js), the ROLES table, and the three face→role maps as data; pure seed(). Gate: #seedtest asserts representative syntax/UI/org faces resolve correctly (bi→blue-grey, fnd→gold+bold, region bg-only, link underlined, org-level-1 strongest, org-code literal lane) and a non-org bespoke package (magit) keeps its curated seed. +**** TODO Open-seeded + reseed + dupre-revised regen :solo: +Phase 2. Initial state from seed() plus seedPkgmap for the non-org packages; all-tier reseed button with a scope-named overwrite warning, resetting non-org to their APPS defaults; regenerate dupre-revised.json. Gate: #selftest PASS; default-on-open equals seed(); artifact round-trip (regenerated dupre-revised.json imports back to the same seeded state); Chrome eyeball. +**** TODO Seeding-engine test surface :solo:test: +Keep #seedtest, #selftest, the default-on-open check, the dupre-revised round-trip, node --check, and Chrome validation green. +** PROJECT [#B] AI Open Work +Parent grouping the open AI assistant / gptel issues; close each child independently. +*** TODO [#B] ai-rewrite: chosen directive never reaches the request :bug:solo: +=modules/ai-rewrite.el:64= — the directive is let-bound around =(call-interactively #'gptel-rewrite)=, but gptel-rewrite is a transient prefix that returns when the menu shows; the send resolves the directive AFTER the binding unwound (verified against ~/code/gptel/gptel-rewrite.el:780-799). The picker's choice is silently dropped — the module's core feature is inert. Set =gptel--rewrite-directive= buffer-locally (restore via =gptel-post-rewrite-functions=) or use a self-removing global hook entry. From the 2026-06 config audit. -** CANCELLED [#B] M-S- launcher keys dead: eww, elfeed, calibredb unreachable :bug:quick:solo: -CLOSED: [2026-06-13 Sat] -Not a bug. The audit used =key-binding=, which ignores =key-translation-map=, so it read the M-S- launcher chords as dead. They work in GUI: =keyboard-compat.el= installs a =key-translation-map= entry (=M-E -> M-S-e=, etc.) in GUI frames, so Meta+Shift+letter reaches eww/elfeed/calibredb. The "fix" =4a1ecf64= bound =M-E= directly and broke them instead; reverted here. The real console-reachability problem (the chords are dead outside GUI) is the subject of [[file:docs/design/keybinding-console-safety-spec.org][the keybinding-console-safety spec]]. +*** VERIFY [#B] Stale elpa gptel shadows the local fork — likely the gptel-magit root :bug:quick:solo:next: +Needs from Craig: can't be done standalone. I tried deleting elpa/gptel-0.9.8.5 — the fork loaded fine and gptel-magit still worked via use-package autoloads, but package activation then printed "Unable to activate gptel-magit / Required gptel-0.9.8 unavailable" on every startup, so I reverted. To remove the shadow we must also resolve gptel-magit's package dependency: either drop gptel-magit's package dep (load it via load-path like the gptel fork), or repackage the fork into .localrepo as gptel. Tell me which and I'll do it; this pairs with the gptel-magit investigation. +=elpa/gptel-0.9.8.5= is still installed alongside the =~/code/gptel= fork (=ai-config.el:383=); package activation puts the elpa dir + autoloads on load-path, so which copy wins depends on ordering, and a mixed load (fork .el + elpa .elc) produces "impossible" bugs. =gptel-magit= (elpa) declares gptel as a dependency, so IT may be pulling the stale copy — check this first when working the open "[#B] Investigate gptel-magit not working properly" task. Fix: =package-delete= the elpa gptel + remove from .localrepo so the fork is the only copy on disk. From the 2026-06 config audit. -** TODO [#B] ai-rewrite: chosen directive never reaches the request :bug:solo: -=modules/ai-rewrite.el:64= — the directive is let-bound around =(call-interactively #'gptel-rewrite)=, but gptel-rewrite is a transient prefix that returns when the menu shows; the send resolves the directive AFTER the binding unwound (verified against ~/code/gptel/gptel-rewrite.el:780-799). The picker's choice is silently dropped — the module's core feature is inert. Set =gptel--rewrite-directive= buffer-locally (restore via =gptel-post-rewrite-functions=) or use a self-removing global hook entry. From the 2026-06 config audit. +2026-06-15: tried deleting =elpa/gptel-0.9.8.5= standalone. The fork loaded correctly and gptel-magit still worked via use-package =:commands= autoloads, BUT package activation then printed "Unable to activate package gptel-magit / Required package gptel-0.9.8 unavailable" on every startup and test run (gptel-magit declares gptel as a package dependency that no longer resolves). Reverted. This can't be done standalone — it must be paired with the gptel-magit dependency fix (drop gptel-magit's package dep, or repackage the fork into .localrepo as gptel). Do it together with the gptel-magit investigation task. -** TODO [#B] ai-conversations: dead-buffer load, role flattening, non-atomic writes :bug:solo: +*** TODO [#C] ai-conversations: dead-buffer load, role flattening, non-atomic writes :bug:solo: From the 2026-06 config audit, =modules/ai-conversations.el=: - =:324= — load in a fresh session does =get-buffer-create "*AI-Assistant*"= (plain fundamental-mode buffer); =--ensure-ai-buffer= then sees it exists and never calls =(gptel)=. Sending doesn't work, autosave self-cancels (requires gptel-mode). Use =get-buffer= for the check; let ensure create. The browser RET/l path inherits this. - =:240= — persistence drops gptel's =response= text properties, so a reloaded history replays to the model as ONE user message (model re-reads its own answers as Craig's words). Adopt gptel's native bounds persistence or re-mark on load from the "* Backend:" headings. - =:248= — =write-region= straight at the target; crash mid-write truncates the only copy of the history (autosave hits this constantly). Temp + rename. - =:140= — three overlapping autosave mechanisms (after-send advice that fires before the response exists, post-response hook, 60s timer). Keep the hook; drop the advice (and likely the timer). -** TODO [#B] cj/gptel-switch-backend reintroduces the string-model crash :bug:quick:solo: -=modules/ai-config.el:272= — =(setq gptel-model model)= with the raw completing-read STRING — the documented wrong-type-argument-symbolp modeline hang (CLAUDE.md gotcha), reachable from C-; a B today. =cj/gptel-change-model= (C-; a m) already does backend+model switching and interns correctly. Intern here, or delete switch-backend and keep one command. From the 2026-06 config audit. - -** TODO [#B] transcription: stderr never reaches the log, video transcripts stranded in /tmp :bug:solo: -From the 2026-06 config audit, =modules/transcription-config.el=: -- =:210= — =make-process :stderr= with a file PATH creates a BUFFER named like the path (verified by probe); the "Errored. Logs in <file>" notification points at a log without the error text, and the hidden stderr buffer leaks per transcription. Route stderr into the process buffer or write it out in the sentinel. -- =:370-374= — video path derives txt/log from the temp mp3's /tmp path; the transcript lands in /tmp and dies on reboot, contradicting the "alongside the source" docstring. Pass the video's path as the output base. - -** TODO [#B] ledger-config is orphaned — ledger-mode never configured :bug:quick: -Nothing requires =modules/ledger-config.el= (verified by grep), so .dat/.ledger/.journal open without ledger-mode, reports, or flycheck-ledger. The module looks finished, not staged (unlike duet-config, which documents its pre-alpha orphaning). Decide: wire into init.el (+ =cj/executable-find-or-warn= for the ledger binary) or delete. From the 2026-06 config audit. - -** TODO [#B] eww quick-add bookmarks split the store and break the default file :bug:quick:solo: -=modules/eww-config.el:116-126= — quick-add let-binds =eww-bookmarks-directory= to ~/.emacs.d/eww-bookmarks/ (creating a DIRECTORY at the path where the daemon's default store expects a FILE ~/.emacs.d/eww-bookmarks). After one quick-add, B reads an unreadable path and quick-added bookmarks are invisible post-restart. Drop the let-binding or setq the directory once in :config so both commands share one store. From the 2026-06 config audit. - -** TODO [#B] help-config: three defects in one small file :bug:quick:solo: -From the 2026-06 config audit, =modules/help-config.el=: -- =:67= — =cl-return-from= inside a plain =defun= (no cl-block): declining the save prompt signals "No catch for tag" instead of canceling. =cl-defun= or restructure. -- =:108= — =:hook (info-mode . info-persist-history-mode)= is dead twice: Info's hook is =Info-mode-hook= (capital I), and =info-persist-history-mode= doesn't exist anywhere. Implement the intent or delete. -- =:111= — auto-mode-alist maps .info to an interactive command that KILLS the buffer mid find-file — programmatic =find-file-noselect= of any .info destroys buffers and pops Info windows. Drop the entry; keep the explicit command. Zero test coverage on this module (the two broken paths are exactly the untested ones). - -** TODO [#B] modeline runs synchronous git on the redisplay path, unguarded :bug:solo: -=modules/modeline-config.el:173,154,145= — the mode-line :eval calls vc-backend/vc-state/vc-working-revision (synchronous git) on TTL expiry; a slow or unmounted filesystem stalls ALL redisplay. The cache key computes =file-truename= on every render (the "one stat per refresh" comment is wrong), and nothing is condition-case-wrapped, so a signal lands inside the mode-line eval. Defer the truename behind the TTL check; wrap the fetch in condition-case caching nil. From the 2026-06 config audit. - -** TODO [#B] Stale elpa gptel shadows the local fork — likely the gptel-magit root :bug:quick:solo: -=elpa/gptel-0.9.8.5= is still installed alongside the =~/code/gptel= fork (=ai-config.el:383=); package activation puts the elpa dir + autoloads on load-path, so which copy wins depends on ordering, and a mixed load (fork .el + elpa .elc) produces "impossible" bugs. =gptel-magit= (elpa) declares gptel as a dependency, so IT may be pulling the stale copy — check this first when working the open "[#B] Investigate gptel-magit not working properly" task. Fix: =package-delete= the elpa gptel + remove from .localrepo so the fork is the only copy on disk. From the 2026-06 config audit. - -** TODO [#B] vertico-prescient clobbers orderless filtering :bug:quick:solo: -=modules/selection-framework.el:250= — =vertico-prescient-mode= defaults =vertico-prescient-enable-filtering t=, overriding =completion-styles= to prescient inside vertico sessions; the orderless config at :151 is dead exactly where it matters. Set =vertico-prescient-enable-filtering nil= — orderless matches, prescient sorts (and this resolves the dead =vertico-sort-function= finding in the buffer/window-libs child the other way around). From the 2026-06 config audit. - -** TODO [#B] 2026-06 full config audit — findings backlog :refactor: -Module-by-module review of all 121 modules + init/early-init, holistic passes (startup/perf, stability, UX consistency, package strategy), and spin-offs into pearl, chime, emacs-wttrin. Method: parallel read-only review agents per module group; key claims spot-verified (incl. against the live daemon) before filing. Run 2026-06-11/12, COMPLETE. Tally: ~165 module findings + ~40 holistic + 30 spin-off ≈ 235 total; 40 high-impact bugs filed as standalone tasks above this parent; the rest live in the group children below. Spin-off findings delivered as inbox handoffs to pearl, chime, and emacs-wttrin (2026-06-12-0057). Start with the synthesis child below for the recommended attack order. - -*** Synthesis: the overall picture and attack order -Six cross-cutting themes, then the order I'd work them. - -Themes: -1. Performance has one systemic lever, not many small ones: native-comp is accidentally OFF config-wide and GC sits at the stock 800KB ([#A] task). Daemon init itself is healthy (1.11s measured). Fix the lever before any micro-deferral work, and before burning time on the org-capture-perf debug. -2. A "dangerous defaults" safety cluster: yes-or-no-p fset (single-keystroke shutdown/file-destruction), the silently-failing Wayland lock screen, erc-yank's public gists, mu4e's broken trash/refile on the primary account. All four are [#A]/[#B] standalones; do these first — they're where the config can actually hurt you. -3. Calendar/agenda data correctness: calendar-sync's RFC trio (vanishing final occurrences, resurrected cancelled meetings, collapsed multi-day events) + agenda sources missing roam Projects. Meetings are missed over this. -4. Recurring mechanical defect classes worth sweeping as one commit each, config-wide: use-package :hook "-hook" suffix trap (org-babel, eshell, latex); eval-when-compile-only requires read at runtime (auth-config, keyboard-macros, erc-config); M-S-<letter> bindings vs uppercase events (4 dead keys + 1 asymmetry); raw C-; entries bypassing cj/register-prefix-map (8 modules); unreachable modules (prog-lsp, ledger-config, show-kill-ring, mu4e-org-contacts-setup); config for package versions long gone (mu4e 1.7 block, dashboard override, org timeline, checkdoc-arguments). -5. The test suite has a blind-spot class: characterization tests asserting BROKEN output (reverse-lines, heavy-box, undo-kill's explicit 0), unit tests hand-building data that hides integration mismatches (F7 coverage paths), and an integration gate that prints green over "Ran 0 tests" (chime). When fixing any standalone bug above, fix its test to assert correct behavior — and consider extending the architecture smoke test to mechanically pin the class-4 sweeps (hooks must be bound after load, no raw C-; binds, no M-S-<letter> specs, no eval-when-compile requires of runtime vars). -6. Consistency wants conventions, not patches: one notification facade (cj/notify — messenger spec addendum already covers the messenger half), one confirmation tier (the fset fix), one prefix-registration mechanism with labels, one buffer-naming shape. The messenger-unification registry mindset generalizes. - -Attack order: (a) the three [#A]s + gptel-shadow (it's blocking the filed gptel-magit investigation); (b) the daily-data pair — mail trash/refile + calendar RFC trio; (c) the :quick:solo: standalone sweep — roughly 20 one-to-five-line fixes, a satisfying solo batch; (d) the class-4 mechanical sweeps, one commit per class, each with its smoke-test guard; (e) the consistency conventions, opportunistically as those modules get touched. - -*** TODO Findings: foundation/system group -From agents 2026-06-11; spot-verified sample. Remaining findings beyond the standalone bug tasks: -- [BUG] =keyboard-compat.el:121= — terminal arrow-key fix runs once on emacs-startup-hook; =input-decode-map= is terminal-local, so =emacsclient -t= frames under the daemon never get it. Register on =tty-setup-hook= (GUI half already uses =server-after-make-frame-hook=). -- [BUG] =config-utilities.el:142= — =cj/recompile-emacs-home=: =(boundp 'native-compile-async)= is always nil (it's a function — needs =fboundp=), so native compilation is never selected; and the helper deletes =<dir>/eln= when the real cache is =eln-cache/= (derive from =native-comp-eln-load-path=). Extend the existing test. -- [BUG] =system-utils.el:94= — success message args swapped: prints "Running notes.txt on mpv...". Trivial; wired into dirvish (O) and calibredb so it shows regularly. -- [REMOVE] =local-repository.el:51= — =localrepo-initialize=, its three defcustoms, and unprefixed =car-member= are dead; early-init owns archive setup with its own divergent path constant. Shrink to =cj/update-localrepo-repository= pointed at early-init's =localrepo-location=. -- [REMOVE] =keybindings.el:146-147= — C-x C-f unset/reset is a no-op (already find-file); comment wrong. Delete or retarget. -- [COVERAGE] =local-repository.el= — only module in the group with no test file. - -*** TODO Findings: UI core group -From agents 2026-06-11; spot-verified sample. Remaining findings beyond the standalone bug tasks: -- [BUG] =font-config.el:262= — emojify =:defer 1= means :config runs before any daemon GUI frame exists; =env-gui-p= picks ='unicode= permanently, GUI frames never get image emojis. Compute per-frame (=server-after-make-frame-hook=) or test =(daemonp)=. -- [BUG] =font-config.el:283= — =cj/display-available-fonts= errors on second invocation: first call's =special-mode= sets read-only; next call's erase/insert signals. Wrap in =inhibit-read-only=. (Also [COVERAGE]: untested — a call-twice test catches it.) -- [UX] =undead-buffers.el:82= — =cj/kill-other-window= in a single-window frame kills the buffer you're looking at (other-window no-ops; only delete-window is guarded). Add the sibling's =(user-error "No other window")= guard. -- [UX] =undead-buffers.el:48= — C-u C-x k silently marks a buffer undead (then it refuses to die with no explanation later). Undocumented mode-switch inside a core-command remap; document or split into its own command. -- [ENHANCE] =ui-theme.el:87= — theme persistence silently fails on a fresh machine until =persist/= exists; =make-directory= before the writability check. -- [REMOVE] =dashboard-config.el:32-58= — =dashboard-insert-bookmarks= override is dead code: the :demand t require lets upstream dashboard-widgets.el redefine it; behavior survives only because upstream natively honors the settings now. Delete. -- [REMOVE] =font-config.el:199-220= — all-the-icons stack (2 =:demand t= packages + unprompted network font install on fresh machines) likely redundant with nerd-icons everywhere; verify keyboard-compat's reference then drop. -- [REMOVE] =ui-config.el:185= — duplicate =(use-package nerd-icons :defer t)= stanza; nerd-icons-config owns it. Delete stanza + stale Commentary bullet. - -*** TODO Findings: buffer/window libs group -From agents 2026-06-11; spot-verified sample. Remaining findings beyond the standalone bug tasks: -- [REMOVE] =show-kill-ring.el= — loaded by nothing (init require deliberately removed in b785a19d), so its M-S-k binding is dead; =keyboard-compat.el:177= still installs the M-K → M-S-k translation whose only purpose was this module. Re-add or delete module + stale translation/comment (consult-yank-pop largely supersedes it). -- [UX] =selection-framework.el:38= — =vertico-sort-function= custom is dead config: =vertico-prescient-mode= (line 250) replaces sorting when it activates. Pick one policy (drop the custom, or =vertico-prescient-enable-sorting nil=). -- [BUG] =custom-buffer-file.el:486= — =cj/view-email-in-buffer= leaks MIME handles when no displayable part: =user-error= fires before =mm-destroy-parts=. unwind-protect. -- [ENHANCE] =custom-buffer-file.el:49= — eager =(require 'mm-decode)= at startup only for macro expansion; runtime require already exists at line 481. Make it =eval-when-compile=. -- [UX] =custom-buffer-file.el:221= — =cj/copy-link-to-buffer-file= is a silent no-op in non-file buffers while siblings signal =user-error=. Match them. - -*** TODO Findings: editing helpers group -From agents 2026-06-11; spot-verified sample (jump-paren, sortable-time confirmed). Beyond the standalone heavy-box task: -- [BUG] =custom-misc.el:48= — jump-to-matching-paren with point ON a closer lands at the last inner sexp, not the opener (batch-verified). =(forward-char)= before =(backward-sexp)= in the char-after-closer case; the test only covers the after-closer position. -- [BUG] =custom-datetime.el:71= — "sortable" time format is 12-hour ="%I:%M:%S %p %Z"= — "01:00:00 PM" sorts before "09:00:00 AM". Should be ="%H:%M:%S"=. -- [BUG] =custom-comments.el:82= — =cj/comment-reformat= prints "No region was selected" even on success (message outside the if-else), and the fill-column shrink/restore isn't unwind-protected — an error leaves fill-column permanently -3. Use let-binding + =user-error=; also =mark-active= vs the config's usual =use-region-p=. -- [BUG] =custom-line-paragraph.el:52= — join-line-or-region without region inserts a spurious blank line mid-buffer (verified); only insert the newline at eobp. -- [BUG] =custom-line-paragraph.el:77= — duplicate-line-or-region splits a mid-line-ending region via open-line and duplicates an extra empty line when the region ends at bol. Normalize bounds to whole lines. -- [BUG] =custom-ordering.el:158= — reverse-lines and number-lines mishandle the trailing newline ("a\nb\n" → "\nb\na"); the trailing-newline test asserts the broken output. =cj/--arrayify= (line 43) has the correct pattern — apply it; fix the characterization test. -- [BUG] =custom-comments.el:152= — inline-border lines come out 2 chars short for even-length or empty text (parity computed from text length instead of remaining width); stacked dividers misalign. -- [UX] =custom-text-enclose.el:216= — indent-lines =(interactive "p\nP")= couples COUNT and USE-TABS to one prefix arg — multi-column space indent is impossible interactively; docstrings claim "default 4" but "p" defaults to 1 (same in dedent :256). -- [REMOVE] =custom-ordering.el:90= — =cj/arrayify-python= is byte-identical to =cj/arrayify-json= (two bindings, same output). Delete one or differentiate (single quotes for Python). -- [UX] =custom-case.el:66= — title-case contradicts its docstring: "is" is in word-skip despite "linking verbs are major words"; no sentence-restart capitalization after periods; no capitalize-last-word rule. Align list + docstring. - -*** TODO Findings: text/prose tools group -From agents 2026-06-11. Beyond the standalone markdown/latex tasks: -- [BUG] =text-config.el:72= — "M-S-i" for edit-indirect-region is unreachable: Meta+Shift+i generates the event M-I, not M-S-i, so the keypress falls back to M-i tab-to-tab-stop. Rebind as "M-I" (the "was M-I" comment thought the rename was a no-op; it wasn't). -- [BUG] =keyboard-macros.el:46= — user-constants required only =eval-when-compile= but =macros-file= is read at runtime; works only because init.el loads user-constants first. Plain require (same trap as auth-config). -- [BUG] =keyboard-macros.el:137= — kill-emacs-hook fires =y-or-n-p= + an interactive name prompt whenever any last-kbd-macro exists — hazardous for daemon/systemd shutdown (no one to answer) and noisy for throwaway macros. Guard =(and last-kbd-macro (not noninteractive))= minimum; consider dropping the prompt (M-F3 already persists named macros). -- [BUG] =lorem-optimum.el:221= — empty Markov chain (missing assets/liber-primus.txt) makes =cj/lipsum-insert= do =(insert nil)= — cryptic wrong-type error far from cause. Signal =user-error= naming the fix; also Commentary advertises "M-x cj/lipsum" but it has no interactive spec. -- [UX] =flyspell-and-abbrev.el:230= — every C-' press re-runs =flyspell-buffer= over the whole buffer while flyspell-mode is off (the documented word-by-word workflow = O(buffer) per keypress in large files). Call =cj/flyspell-on-for-buffer-type= so the mode sticks and the scan runs once. -- [ENHANCE] =text-config.el:121= — accent is wired to the company backend (=accent-company=); the filed Company→Corfu migration task doesn't list it, so C-` breaks silently post-migration. Add to the migration scope or switch to =accent-menu= now. - -*** TODO Findings: org core group -From agents 2026-06-11; spot-verified sample (dailies head, babel hook, void bindings confirmed). Beyond the standalone tasks: -- [BUG] =org-babel-config.el:27= — =:hook (org-babel-after-execute-hook . org-redisplay-inline-images)= gets a second "-hook" appended (symbol unbound at expansion, doesn't end in -mode) → registers on nonexistent =org-babel-after-execute-hook-hook=; inline dot-graph images never refresh after C-c C-c. Write =(org-babel-after-execute . ...)= or add-hook in :config. -- [BUG] =org-roam-config.el:67,71= — C-c n p / C-c n w bound (and which-key-labeled) to =cj/org-roam-find-node-project= / =-webclip=, defined nowhere — keypress errors "autoloading failed to define function". Define via =cj/org-roam-find-node= (a project template exists) or drop bindings + labels. -- [BUG] =org-export-config.el:74-81= — ox-texinfo block can never run (=:defer t=, no trigger, excluded from line-47 dolist and =org-export-backends=); commentary still advertises Texinfo. Add to the dolist or delete; also commentary says "subtree default scope" vs actual ='buffer= (line 61). -- [UX] =org-roam-config.el:50-63= — two parallel template dirs drift: :custom templates read =~/.emacs.d/org-roam-templates/= while find-node-topic/recipe read =roam-dir/templates/= — overlapping recipe/topic/v2mom files, edits don't propagate. Pick one canonical dir. -- [REMOVE] =org-agenda-config.el:84= — dead =timeline= entry in org-agenda-prefix-format (removed in org 9.1). Also =org-config.el:47-48= — the TASK note claiming =org-indent-indentation-per-level= "doesn't exist" is wrong (real org-indent defcustom); restore the setq or fix the comment. -- [REMOVE] =org-babel-config.el:161= — =org-html-footnote-separator= is an ox-html setting parked in the babel module with a wrong comment; =org-roam-config.el:76= similarly hides =org-agenda-timegrid-use-ampm= in roam's :config (only takes effect after roam loads). Move both to their owning modules. -- [REMOVE] =org-roam-config.el:363-390= — 28-line commented consult-org-roam block on a TASK comment; its proposed C-c n l / C-c n r now collide with live bindings, so it can't ship as written. Decide + delete (git keeps the draft). -- [COVERAGE] =org-agenda-config.el:423= cj/add-timestamp-to-org-entry (defvar-inside-defun smell), =org-roam-config.el:115,185= node-insert-immediate + finalize-hook — untested. - -*** TODO Findings: org apps + calendar-sync group -From agents 2026-06-11/12; spot-verified sample (UNTIL comparisons, EXDATE regex, drill setq confirmed). Beyond the standalone tasks: -- [BUG] =org-reveal-config.el:241= — seven raw =global-set-key= "C-; p ..." calls carry a hidden load-order dependency on keybindings.el (signals "non-prefix key" otherwise); every sibling uses =defvar-keymap= + =cj/register-prefix-map=. Convert. -- [BUG] =org-drill-config.el:131= — =:load-path "~/code/org-drill"= dev checkout breaks drill on machines without it (velox already diverges per the gptel-magit task). Guard with =file-directory-p= fallback to :vc. -- [UX] =org-contacts-config.el:146= — =cj/org-contacts-find= visits the file BEFORE prompting (C-g strands you at point-min) and plain =search-forward= can match body text in another entry. Collect heading positions in org-map-entries, goto after prompt. -- [REMOVE] =calendar-sync.el:1240= — =calendar-sync--fetch-ics= (buffer-string variant) is dead; the sync path uses the temp-file variant exclusively. 30 lines of duplicate curl/sentinel logic that will drift. -- [REMOVE] =org-webclipper.el:216-241= dead commented keymap blocks; =org-contacts-config.el:118-124= commented duplicate capture template flagged "TASK: duplicate?!?". Delete both (git keeps drafts). -- [COVERAGE] =calendar-sync.el:1274= — fetch sentinel branches (curl failure, temp-file cleanup, signal exit) untested; dispatch tests stub above this layer. - -*** TODO Findings: mail group -From agents 2026-06-12; spot-verified sample (cmail trash gap, no refile folders, gmail-first contexts confirmed). Beyond the standalone [#A] task: -- [BUG] =mail-config.el:392-407= — C-; e account nav lambdas call =mu4e-search=, not autoloaded — void-function before first mu4e launch. Add to :commands or require first. -- [BUG] =mail-config.el:481-484= — unconditional =org-msg-edit-mode= :after advice on replies defeats the =(reply-to-text . (text))= alternative at :459 and re-runs a major mode org-msg already set up. Gate or remove. -- [BUG] =mu4e-attachments.el:222= — the *mu4e attachments* selection buffer saves through stale MIME handles if the view changed before s — errors or saves the wrong message's parts. Check =buffer-live-p= per handle at save. -- [BUG] =mail-config.el:329= — "save attachment" in =mu4e-headers-actions= can't work from headers (MIME vars are view-buffer-local, nil in headers-mode). Drop it there. -- [BUG] =mail-config.el:282-305= — HTML view block sets variables obsolete since mu4e 1.7 (installed 1.14.1): =mu4e-view-prefer-html=, =mu4e-html2text-command= (also set twice: 186, 285), =mu4e-view-show-images=, =mu4e-view-image-max-width=. The pandoc/w3m selection never runs; shr renders regardless. Delete the dead block (image/privacy reconciliation already filed separately). -- [BUG] =mail-config.el:45-49,80-89= — top-level =(defvar message-send-mail-function nil)= pre-empts message.el's defcustom default; with msmtp absent the fallback leaves it nil → "invalid function: nil" on first send. Explicit =smtpmail-send-it= fallback or descriptive user-error. -- [UX] =mail-config.el:171,196-199= — =pick-first= + gmail listed first makes gmail the startup context though cmail reads as primary everywhere else — quiet wrong-account hazard for the first compose. Reorder contexts. -- [REMOVE] =mu4e-org-contacts-setup.el= — unreachable (nothing requires it; mail-config calls activation directly) and its featurep gate would be nil at init anyway. Delete or fold its two setqs into mail-config. -- [REMOVE] =mail-config.el:208,232= — =mu4e-starred-folder= isn't a mu4e variable (invented, no effect); =:174= =mu4e-maildir= is the obsolete alias of root-maildir set on the previous line. Drop all three. -- [REMOVE] =mu4e-org-contacts-integration.el:158,171-172= — hook surgery on =mu4e--compose-setup-completion= is a no-op on mu4e 1.14 (called directly, not via hook; already gated by the var activation sets). Delete both hook calls. -- [COVERAGE] =mu4e-attachments.el:101-105= — mid-batch save-failure path and stale-handle scenario untested. - -*** TODO Findings: messengers group -From agents 2026-06-12. Beyond the standalone tasks; several feed the messenger-unification spec: -- [BUG] =signal-config.el:201= — contact cache docstring claims "cleared on signel-stop/restart"; nothing clears it (grep: fork never references it). Stale list after relink/reconnect. Advise =signel-stop= or clear on start. -- [BUG] =signal-config.el:298= — fetched-and-empty contact list is indistinguishable from cold cache (nil), so a zero-contact account re-runs the blocking fetch (up to fetch-timeout) on every C-; M m. Cache a sentinel. -- [UX] =slack-config.el:208= — =cj/slack-notify= lacks signel's hardening: no truncation (giant toasts), no sound gating, no notifications-notify fallback when the script is absent. Unification-relevant: extract a shared =cj/messenger-notify= (title prefix, truncation, sound flag, script-with-fallback) — noted in the unification spec. -- [ENHANCE] =telega-config.el:52= — telega has NO notification path (=telega-notifications-mode= not enabled); incoming Telegram messages invisible unless the buffer is on screen. Enable, or route through the shared notifier. Unification-relevant. -- [COVERAGE] — =cj/erc-join-channel-with-completion= (erc:148, four-way reconnect branching), =cj/erc-connected-servers= (would have caught the tautology), =cj/slack-notify= predicates, =cj/signel--ensure-started= branches — all untested. - -*** TODO Findings: programming group -From agents 2026-06-12; spot-verified sample (prog-lsp unreachable confirmed by grep). Beyond the standalone tasks: -- [BUG→FOLD] =prog-lsp.el= — the module is UNREACHABLE: nothing requires it, so its entire LSP policy (TRAMP guard, file-watch ignores, read-process-output-max, idle-delay 0.5) is dead while prog-general.el:388-416's older conflicting block wins (idle 0.1, lsp-ui-doc on). Fold this fact into the filed "Make prog-lsp.el the single owner of generic LSP policy" task — it doesn't currently record that prog-lsp never loads. -- [BUG] =flycheck-config.el:68-70= — =checkdoc-arguments= isn't a real variable (invented name + invented format); the intended checkdoc suppression has never worked. Use =flycheck-emacs-lisp-checkdoc-variables= or drop. -- [BUG] =prog-json.el:87-90= — C-c C-q → jq-interactively binding defers to eval-after-load of jq-mode, which nothing loads — dead key. Bind in =cj/json-setup= via local-set-key (jq-interactively IS autoloaded). -- [BUG] =prog-python.el:129-132= — lsp-pyright's :hook lambda calls =lsp-deferred= unguarded on the same hook as the guarded =cj/python-setup= — pyright-absent machines still get the LSP attach prompt the guard exists to prevent. Move the require into the guarded branch; delete the hook. -- [BUG] =prog-lisp.el:122-125= — =:after (flycheck package-lint)= waits for a manual M-x to load package-lint, so =flycheck-package-setup= effectively never runs. Hook on flycheck load + require inside. -- [UX] =prog-python.el:111-115=, =prog-go.el:111-114=, =prog-webdev.el:128-147= — setup hooks attach to ts-modes only (C/shell hook both variants); grammar-unavailable fallback to classic modes silently loses indent/keys/formatter/LSP. Add classic-mode hooks. -- [UX] =prog-webdev.el:165-173= — web-mode gets the format key but none of the promised setup (no company/flyspell/LSP in HTML buffers). Add to the setup hook or fix the Commentary. -- [ENHANCE] gopls, clangd, bash-language-server, shfmt, shellcheck lack the =cj/executable-find-or-warn= load-time warnings pyright/prettier have; prog-shell's =:if (executable-find ...)= evaluates once at startup and silently disables shfmt/flycheck setup forever. -- [REMOVE] =prog-training.el:36-37= — =(url-debug t)= turns on GLOBAL url.el debug logging once leetcode loads. Debugging leftover; delete. -- [REMOVE] =prog-webdev.el:85=, =prog-json.el:44=, =prog-yaml.el:39= — three byte-identical format-region helpers. Extract one shared tested helper (system-lib). - -*** TODO Findings: dev tooling group -From agents 2026-06-12; spot-verified sample. Beyond the standalone F7 task: -- [BUG] =vc-config.el:138-144= — =cj/goto-git-gutter-diff-hunks= (C-; v d) never did what it claims: consult-line over "^[+\\-]" matches source text, not gutter hunks. Build candidates from =git-gutter:diffinfos= or drop the binding (C-; v n/p covers it). -- [BUG] =dev-fkeys.el:116-122= — F4 compile+run one-shot hook installs on GLOBAL =compilation-finish-functions= before the prompt; C-g leaves it armed and the next unrelated compile triggers projectile-run-project. Use the buffer-local pattern the module already uses for cache-revert (same in =--f4-clean-rebuild-impl=:143). -- [BUG] =test-runner.el:84,222= — documented ~/.emacs.d/tests fallback doesn't exist (=cj/test-global-directory= defvar'd nil, never set); outside a project =(file-directory-p nil)= crashes in three commands. Initialize the defvar or guard with user-error. (Adds specifics to the open "Fix up test runner" task — fold.) -- [BUG] =test-runner.el:288= — focus-add prefix check lacks the trailing slash so =tests-scratch/= passes the "inside tests/" check; the correct helper =cj/test--file-in-directory-p= exists at :168 — use it. -- [BUG] =vc-config.el:217-219= — difftastic blame map binds D and S to the same command (show); D should be diff per the transient four lines down. -- [UX] =diff-config.el:37= — =ediff-diff-options "-w"= ignores ALL whitespace in every ediff session — indentation-only Python changes compare as identical. Drop the default; toggle per-session. -- [UX] =restclient-config.el:64-65= — raw global-set-key "C-; R n" hides a load-order dependency (header claims "Runtime requires: none"); use defvar-keymap + =cj/register-prefix-map= like siblings (same class as org-reveal, slack). -- [UX] =vc-config.el:196= — clipboard clone via synchronous =call-process= freezes every emacsclient frame for the whole clone. make-process + sentinel. -- [REMOVE] =vc-config.el:80-82= — phantom autoload =git-timemachine-show-selected-revision= (no such function in the package) appears in M-x and errors. Drop from :commands. -- [REMOVE] =httpd-config.el:19-30= — pointless =:defer 1= (impatient-mode loads simple-httpd on demand) + unprefixed eager globals =wwwdir=/=check-or-create-wwwdir= creating www/ on every startup. =:defer t=, prefix, or fold into markdown-config. -- [COVERAGE] — intersect/parse unit tests hand-build matching keys (the F7 bug's escape route); =--coverage-elisp-run='s compilation-finish wiring, goto-git-gutter-diff-hunks, timemachine candidate round-trip untested. F-key sweep clean: no collisions; F5 free for the debug-backend task. - -*** TODO Findings: shell/term/files group -From agents 2026-06-12; spot-verified sample (eshell nested list confirmed). Beyond the standalone tasks: -- [BUG] =dirvish-config.el:37= — =cj/xdg-open= attributed to system-utils in the require-comment but defined in external-open.el; neither dirvish-config nor dwim-shell-config (caller at :876) requires it — "Direct test load: yes" headers are false. Require external-open (or move the fn into external-open-lib) + fix comment. -- [UX] =tramp-config.el:73= — =revert-without-query '(".*")= kills revert confirmation for EVERY file in Emacs, buried in the TRAMP module. Scope to =tramp-file-name-regexp= or move deliberately to an editing module. -- [UX] =dirvish-config.el:403= — quick-access entries lx (~/archive/lectures), phl (~/projects/homelab), pn (~/projects/nextjob) point at directories that don't exist on this machine. Prune or create. -- [REMOVE] =dwim-shell-config.el:474,507= — open-externally (raw xdg-open) and open-file-manager (thunar/nautilus probe chain) duplicate cj/xdg-open (dirvish o) and cj/dirvish-open-file-manager-here (f); ascii-art references jp2a, the module's only absent binary. Delete the two duplicates; install jp2a or drop ascii-art. -- [REMOVE] =tramp-config.el:115= — custom =sshfast= method referenced nowhere (everything uses sshx); =tramp-own-remote-path= added twice (:39,:128); =dirtrack-list= and =magit-git-executable "/usr/bin/git"= are unrelated globals hiding here. Prune/relocate. -- [COVERAGE] — eshell visual-commands/xterm-color wiring and the dirvish mark-all loop had no load-and-assert tests (both standalone bugs above); TRAMP perf settings look sound for the DUET latency concern (attr caching, no remote VC, direct-async + controlmaster). - -*** TODO Findings: AI group -From agents 2026-06-12; spot-verified sample (string-model setq confirmed). Beyond the standalone tasks: -- [BUG] =ai-term.el:875= — close derives the tmux session name from =default-directory=, which ghostel retargets via OSC 7; after a cd the kill-session misses (orphaned agent session) or name-collides with a different aiv- session. Derive from the buffer name's immutable basename. -- [UX] =ai-term.el:827= — multi-window F9 toggle-off unconditionally delete-windows, never restoring the displaced edge-window buffer the Commentary (:24) and reuse-edge docstring (:521) promise. Restore when quit-restore still matches, or fix the docs to describe delete-window reality. -- [UX] =ai-conversations-browser.el:191= — browser load stubs =y-or-n-p= to nil, silently discarding an unsaved in-progress conversation (the direct C-; a l path offers to save). Give ai-conversations a file-arg internal instead of puppeting the interactive command via cl-letf; also the =(caar cands)= fallback loads the newest conversation on a filename mismatch — fail loudly. -- [ENHANCE] =ai-quick-ask.el:103= — dismiss mid-stream kills the buffer without =gptel-abort= — request keeps streaming to a dead buffer (wasted tokens). -- [NOTE] =ai-mcp.el= — unreachable from init, consistent with the paused Phase 1.5; add a one-line Commentary note ("not wired until Phase 2") so future audits don't re-flag, and revisit =cj/mcp-enabled-servers= defaulting to all nine servers before wiring. -- [COVERAGE] — load/autosave lifecycle untested (fresh-session load, timer self-cancel, close-buffer session-name derivation). - -*** TODO Findings: media/reading group -From agents 2026-06-12; spot-verified sample (M-S- bindings, eww store split confirmed). Beyond the standalone tasks: -- [BUG] =music-config.el:585= — =cj/music-add-dired-selection= gates =dired-get-marked-files= on =(use-region-p)= — but dired marks aren't a region; marked files are ignored, + adds only file-at-point. Drop the conditional (the function already falls back correctly). Note for the EMMS-free rewrite: dirvish + shadows =dired-create-directory= — deliberate decision needed before carrying it over. -- [UX] =media-utils.el:195-204= — =cj/yt-dl-it= watches tsp (which enqueues and exits), so "Finished downloading" fires immediately while yt-dlp may fail later, silently; also affects elfeed d. Message "queued" honestly or watch the real job (tsp -f). -- [UX] =browser-config.el:34-47,171= — first-run fallback picks EWW (first, "always available") over installed real browsers; fresh machines get org links in a text browser until cj/choose-browser runs. Prefer the first external match. -- [REMOVE] =video-audio-recording.el:442-488= — =cj/recording-group-devices-by-hardware= is dead code (nothing calls it) carrying a hardcoded "Jabra SPEAK 510 USB" branch. Delete + its test file. -- [REMOVE] =calibredb-epub-config.el:198-212= — =set-auto-mode= :around advice for .epub is redundant with nov's :mode registration (auto-mode-alist wins before magic-fallback); overhead + failure surface on every file visit. Remove and verify. -- [COVERAGE] — eww interactive commands (switch-search-engine, bookmark-quick-add, copy-url) and =cj/nov-center-images= untested. - -*** TODO Findings: apps/misc group -From agents 2026-06-12. Beyond the standalone tasks: -- [BUG] =hugo-config.el:49= — =cj/hugo-new-post= void-functions on =org-hugo-slug= in a fresh session (ox-hugo is :after ox, which loads on first export); =cj/hugo-export-post= already requires ox-hugo — do the same here. -- [BUG] =help-utils.el:73= — arch-wiki search signals raw file-missing when the docs dir is absent; the friendly install hint at :81 is unreachable. Guard with =file-directory-p= + user-error up front. -- [UX] =hugo-config.el:244= — eight raw global-set-key C-; h calls + hand-rolled which-key mutate cj/custom-keymap directly, against keybindings.el's own instruction. Convert to defvar-keymap + =cj/register-prefix-map= (same class as org-reveal, restclient, slack). -- [ENHANCE] =games-config.el:25= — =:defer 1= pulls malyon + 2048 into every session for nothing; use =:commands=. Also :config references =org-dir= without requiring user-constants (free-variable warning at byte-compile). -- [REMOVE] =wrap-up.el:29= — =elisp-compile-mode= doesn't exist (real mode emacs-lisp-compilation-mode derives from compilation-mode, already covered at :27); dead line. (The prior unguarded-timer fix is intact.) -- [REMOVE] =help-config.el:99-106= — stray empty :preface + dead commented Info-directory-list block. Delete. -- [NOTE] =duet-config.el= — orphaned BY DESIGN (Commentary documents pre-alpha staging; Stage 1 is the wire-in trigger). Audit record only. -- [COVERAGE] — help-config and help-utils have zero test files; the two broken paths above are exactly the untested branches. - -*** TODO Findings: holistic — startup & performance -From the 2026-06-12 holistic pass; daemon init measured at 1.11s (healthy). Beyond the standalone [#A] native-comp/GC task: -- [BUG→FOLD] the eager-org chain: =org-config.el:352= org-appear has no defer trigger (only :custom) → requires all of org at init; org-agenda (=:after org :demand t=) cascades; chime's =:demand t= pulls it anyway. org-config is the most expensive require (0.229s of 1.11s). Decide fully-eager vs fully-deferred — and =init.el:146='s "calendar-sync must come after org-agenda" contract exists only as a comment (three uncoordinated writers of =org-agenda-files=). Both facts belong in the filed defer-modules task before that refactor starts. -- [PERF] =dirvish-config.el:385-387= — =:defer 0.5= defeated by :init calling autoloaded =dirvish-override-dired-mode= → dirvish fully loads at init (0.072s, third most expensive; trace-confirmed). Own the eager load or defer the override to a dired-mode-hook shim. -- [PERF] timed =:defer N= loads unused packages into every start: simple-httpd (:1s + startup mkdir despite the defer), malyon, 2048-game, emojify (may hit network), ligature. Convert to :commands/mode hooks. -- [UX] =early-init.el:235-256= — synchronous =package-refresh-contents= on the startup path when any archive cache is >7 days old (MELPA ~6MB) — multi-second network-bound start, fires in batch too. Make async post-startup or push into the localrepo update script (distinct from the filed bootstrap-relocation task). -- [PERF] =early-init.el:228= — no =package-quickstart= with 184 packages; activation walks every package dir each start (~0.3s of early-init). Free win; regenerate after package ops. -- [PERF] =prog-general.el:298= — =yas-reload-all= immediately before =yas-global-mode= scans snippet dirs twice per start (doubled "[yas] Prepared..." message). Delete the line. -- [REMOVE] cross-ref: the all-the-icons stack (already in UI core findings) is 2 of the :demand t packages plus a per-frame install-check hook. - -*** TODO Findings: holistic — daemon stability -From the 2026-06-12 holistic pass. Architecture-level verdict good (timers cancelled/guarded, calendar-sync async well-contained, advice mostly named + guarded). Residual: -- [STABILITY] =transcription-config.el:293= — sentinel chain has no unwind-protect; =--append-to-log='s =insert-file-contents= signals if the log is missing → process buffer leaks, entry stuck 'running in the modeline forever, no notification. Extends the filed transcription standalone — fix together. -- [STABILITY] =calendar-sync.el:1646= — hourly timer body: fetch/parse guarded but the timezone check and =--require-calendars= run bare — any signal repeats hourly forever (the exact class fixed in four modules once). Condition-case the body; demote the hourly echo-area message to the silent log. -- [STABILITY] =music-config.el:865= — four anonymous-lambda advice in :config stack per live reload (verified: lambdas don't dedupe) and can't be advice-removed. Name the function. -- [STABILITY] =system-defaults.el:69= — =display-warning= advice appends to comp-warnings-log with no condition-case (unwritable path → every async comp warning signals from inside display-warning) and the log grows unbounded. Guard + cap. -- [STABILITY] =media-utils.el:164= — playback sentinel assumes the process buffer is alive (user killed *player:...* → sentinel error, diagnostics lost); sibling yt-dl sentinel shares the kill-buffer gap. buffer-live-p guards. -- [ENHANCE] =system-commands.el:86= — =#'ignore= sentinel + output to /dev/null makes failing lock/suspend indistinguishable from success — the user walks away from an unlocked machine. Message on nonzero exit. (Compounds the [#A] slock task: the broken lock currently fails through exactly this silent path.) -- [ENHANCE] =ui-config.el:153= — post-command cursor hook unguarded: any future signal self-removes it silently (cursor stops signaling modified/read-only until restart); frame-hook lambda also accumulates per reload. with-demoted-errors + name it. -- (kill-emacs-hook y-or-n-p prompt independently re-found here — already filed in the text/prose child; convergence noted.) - -*** TODO Findings: holistic — UX consistency -From the 2026-06-12 holistic pass. Verdict: more coherent than most 120-module configs (~85% prefix-helper adoption, M-S translation fully covers its 18 bindings, F-keys collision-free, DEF-arg prompts dominate). Beyond the standalone [#A] fset task: -- [BUG] notification env gate: =transcription-config.el:169-171= gates desktop notifications on =(getenv "DISPLAY")= — an X11 predicate that works only because XWayland exports it. Use =env-gui-p= (host-environment.el provides it). -- [UX] four notification stacks beyond the messenger split (notify script ± fallback, alert.el, raw notifications-notify, echo-only for calendar-sync/recording completions). Proposed: one cj/notify facade (transcription's =cj/--notify= is the right shape) — config-wide companion to the messenger-notify addendum in the unification spec. -- [UX] five more C-; entries bypass the register helpers or lack labels: =browser-config.el:182= (C-; B, no label), =org-babel-config.el:51= (C-; k, no label), =flycheck-config.el:62-64= (:bind into cj/custom-keymap), =pearl-config.el:43= (:bind-keymap C-; L, no label), =dev-fkeys.el:533= (helper but no label). Sweep onto cj/register-prefix-map with labels. -- [UX] user-error vs message inconsistent for "nothing to act on" config-wide (examples: =custom-whitespace.el:190=, =jumper.el:202=, =chrono-tools.el:99= message; =mu4e-attachments.el:112=, =ai-rewrite.el:79= user-error; =test-runner.el:392/394= mixes both 2 lines apart). Convention: user-error when the command can't proceed; message when it ran and found nothing. -- [ENHANCE] M-S translation layer: complete for GUI (18/18) but installs only on env-gui-p paths — terminal frames have no M-uppercase route; and =dwim-shell-config.el:932/934= binds M-S-d (dired) vs raw M-D (dirvish) asymmetrically. Feeds the filed M-S review task with the concrete map. -- [ENHANCE] which-key labels: register-helper's LABEL arg used by exactly 1 of 23 registrants (rest use separate with-eval-after-load blocks); label style drifts ("X menu" vs bare nouns). Adopt LABEL arg + one style. -- [ENHANCE] "?" curated-menu candidates (for the filed convention task): elfeed search/show, dirvish, signel chat/dashboard, music playlist, ai-conversations-browser, mu4e-attachments, transcription status, pearl. calibredb remains the model. -- [UX] ="(Cancel)"= pseudo-candidate in =music-config.el:253-256= vs C-g everywhere else (90+ prompts). Drop it. -- [UX] buffer-naming drifts across three conventions (*AI-Assistant* / *Kill Ring* / *dashboard*); pick Title Case + "*Name: param*", lowercase for process logs. -- [ENHANCE] C-; f formatter shadowing implemented 3 ways (:bind :map vs local-set-key in hooks); unify on :bind. Also =keybindings.el:21= commentary still says "C-c j" for the jump prefix the code binds at C-; j. -- [ENHANCE] initial-input anti-pattern at =dwim-shell-config.el:661,680= and =erc-config.el:176-177= against the config's DEF-arg norm. - -*** TODO Findings: holistic — package strategy -From the 2026-06-12 holistic pass (184 elpa dirs). Core stack modern (vertico/consult/embark/orderless, treesit-auto, built-in which-key, current magit/forge/telega/slack). Beyond the standalone gptel/prescient tasks: -- [REMOVE] true orphans, nothing references them: js2-mode, tide, json-mode (pre-treesit JS stack). package-delete + drop from .localrepo. -- [REMOVE] emojify: 2021 snapshot, dormant upstream, crashes in lui (slack disabled it), Emacs 30 renders emoji natively. Drop the use-package + hooks (=font-config.el:253=, =erc-config.el:211=); it stays on disk only as slack's declared dep. -- [BUG] legacy-mode hooks miss the ts modes: =prog-general.el:91-92= hooks =yaml-mode-hook=/=toml-mode-hook= but the config runs yaml-ts/toml-ts — general prog settings silently don't apply in YAML/TOML buffers. Rehook; delete toml-mode + eldoc-toml + yaml-mode packages (superseded by treesit). -- [RISK→FOLD] localrepo priority 200 is absolute, so package-upgrade silently no-ops on everything mirrored — the engine that fossilized emojify@2021/toml-mode@2016/js2@2023. The filed refresh-script task at [#D] deserves [#B] + a quarterly cadence, else every orphan finding regrows. -- [RISK] fork fleet sync-back stories: org-drill flip back to :vc when done (filed dev-checkout finding); auto-dim-other-buffers local checkout with :vc commented — decide its home; org-msg pins =:rev :newest= (unpinned moving target) — pin a known rev. signel/duet/pearl/wttrin/gloss/chime self-owned remotes are fine. -- [UPGRADE] wiki-summary (2018, dead upstream, predates Wikipedia's REST API; sole caller help-utils) — the audit's one write-your-own: ~30-line url-retrieve against the REST summary endpoint. Delete the package, inline the helper. -- [UPGRADE] xterm-color droppable in eshell on Emacs 30's native ansi-color (its only use; also doubly-broken per the eshell standalone task — fixing by deletion is an option). -- [ENHANCE] Python tier: poetry.el (sluggish) + pyvenv (2021) keep only if Poetry projects are still real; blacken fine until ruff-format (reformatter.el already installed). lsp-pyright current. -- [DECIDED] projectile, lsp-mode, dirvish: keep (wired into 10/7/many modules, maintained, migration cost > benefit). On the record so future audits don't relitigate. - -*** TODO Findings: spin-off repos (pearl, chime, emacs-wttrin) -Full findings delivered as handoffs to each repo's inbox/ (2026-06-12-0057-from-.emacs.d-handoff-*.org); each repo's next session files them through its own value gate. Highlights: -- pearl (10 findings; suite green, 66 ERT files): auth-source negative-cache trap in pearl-clear-cache (the 2026-06-01 incident class, unfixed); sync wrapper ignores pearl-request-timeout + async has no timeout; mutation errors discard Linear's GraphQL reason; no RATELIMITED handling; dead legacy API layer (~150 lines). -- chime (10 findings; suite green; the 2026-06-11 watchdog handoff VERIFIED landed in full): lookahead vars never injected into the async child (documented feature silently capped at 8 days — one-line fix); days-until-event nil crash on mixed timed/all-day events; stale-callback race after watchdog interrupt (generation counter needed); default test run prints green integration banner over "Ran 0 tests". -- emacs-wttrin (10 findings; ~56 ERT files, CI; the face-flood reminder VERIFIED resolved — test 8f3c770 + fix c5e5e1d, reminder cleared from notes.org): no network timeouts (wttr.in stalls hang the loading buffer); error-path response-buffer leak; non-favorite cache never expires; 17 unreleased commits incl. two features — tag v0.4.0. +*** VERIFY [#C] Dedup gptel model-switch commands — keep switch-backend or fold into change-model :bug: +=cj/gptel-change-model= (C-; a m) already does backend+model switching and interns correctly, so =cj/gptel-switch-backend= (C-; a B) is arguably redundant now that its crash is fixed. Decision for Craig: keep both, or delete =cj/gptel-switch-backend= plus its C-; a B binding and keep one model-switch command. From the 2026-06 config-audit follow-up. ** PROJECT [#B] Architecture review follow-up from 2026-05-03 :refactor: @@ -1174,10 +587,10 @@ recommends grouping and naming, explains how the helpers fit into existing library modules, defines migration phases, and identifies testing/rollback rules. -Spec: [[file:docs/design/utility-consolidation.org][docs/design/utility-consolidation.org]] +Spec: [[id:fc2e3926-b4a1-4b45-92eb-20841e13f655][docs/specs/utility-consolidation-spec-doing.org]] Verify 2026-05-04: -- Added [[file:docs/design/utility-consolidation.org][docs/design/utility-consolidation.org]]. +- Added [[id:fc2e3926-b4a1-4b45-92eb-20841e13f655][docs/specs/utility-consolidation-spec-doing.org]]. - Spec includes framing questions, existing library fit, proposed grouping, concrete pull/rename table, migration phases, test strategy, acceptance criteria, risks, open questions, and recommended first commits. @@ -1358,14 +771,14 @@ Done 2026-05-15: - Focused tests passed for the new architecture smoke file and the affected agenda/refile helpers. -*** PROJECT [#A] Un tangle the eager =init.el= load graph :refactor: +*** TODO [#A] Un tangle the eager =init.el= load graph :refactor: =init.el= currently functions as the dependency graph by eagerly requiring almost every module in a fixed order. That makes modules harder to test in isolation and hides real dependencies behind "loaded earlier in init.el" assumptions. -Spec: [[file:docs/design/init-load-graph.org][docs/design/init-load-graph.org]] +Spec: [[id:e1fd137e-e164-42f4-a658-f4d32fbe3228][docs/specs/init-load-graph-spec-doing.org]] **** 2026-05-25 Mon @ 07:59:20 -0500 Wrote full design spec for the =init.el= load-graph refactor :refactor: @@ -1380,7 +793,7 @@ Review incorporation: has a clear rule for duplicated helpers found along the way. Verify 2026-05-04: -- Added [[file:docs/design/init-load-graph.org][docs/design/init-load-graph.org]]. +- Added [[id:e1fd137e-e164-42f4-a658-f4d32fbe3228][docs/specs/init-load-graph-spec-doing.org]]. - Incorporated review feedback by making utility consolidation an explicit sibling project with guardrails and candidate helper families. - Parsed the spec and =todo.org= with =org-element=. @@ -1399,7 +812,7 @@ No init.el load-order change — keybindings and the foundation modules already Verified each fix with a fresh =emacs --batch (require 'X)=, then swept all ~100 modules standalone: every one loads or fails only with a clear missing-package message (the spec's Phase 2 exit bar). Full =make test=, =make validate-modules=, and an init smoke all pass. Module headers and the inventory's hidden-dependency section updated to mark the seven resolved. -**** TODO [#B] Defer feature modules behind autoloads, hooks, and commands :refactor: +**** DOING [#A] Defer feature modules behind autoloads, hooks, and commands :refactor: Once dependencies are explicit, reduce the number of modules required at startup. Start with lower-risk feature modules: @@ -1414,6 +827,9 @@ Do this incrementally. After each batch: - Run =make test= or at least targeted tests. - Check that keybindings still resolve and which-key labels still appear. +***** 2026-06-21 Sun @ 01:53:55 -0400 Deferred games-config (batch 1, module 1) +Replaced =(require 'games-config)= in init.el with explicit autoloads for =malyon= and =2048-game= → games-config; the module now loads on first game-command use instead of at startup. games-config.el: =:defer 1= → =:defer t :commands=, header Load shape eager→command. package.el already autoloads both commands, so routing through games-config only preserves the one setting it owns (=malyon-stories-directory=), applied via use-package =:config= when malyon loads. Verified the autoload→module→package→config chain in batch. Test: =tests/test-init-defer-games.el= (commands resolve with the module unloaded; config applies on load). Inventory row eager→command; header-contract 4/4 (still allowlisted), full =make test= green. Shipped as 03d8b587. Daemon keeps it loaded until restart — interactive restart smoke pending (see Manual testing). + **** 2026-05-24 Sun @ 19:59:01 -0500 Centralized custom keymap registration Added cj/register-prefix-map and cj/register-command to keybindings.el (commit 47f222f6) with test-init-keymap-registration.el, then migrated all 31 cj/custom-keymap registration sites across 24 modules onto the API. Consumers no longer reference cj/custom-keymap directly — keybindings.el is the sole owner of the prefix, and modules require keybindings to reach the API. @@ -1421,13 +837,13 @@ Verified behavior-preserving by dumping every C-; binding before and after: iden Related existing task: [#B] "Review and rebind M-S- keybindings". -*** PROJECT [#A] Move package bootstrap out of =early-init.el= where possible :refactor: +*** TODO [#A] Move package bootstrap out of =early-init.el= where possible :refactor: =early-init.el= currently handles package archives, package refresh, installing =use-package=, and =use-package-always-ensure=. That is more than early startup needs and can make startup network-sensitive. -**** TODO [#B] Split early startup from package bootstrap :refactor: +**** TODO [#A] Split early startup from package bootstrap :refactor: Keep =early-init.el= focused on things that must happen before package and UI startup: @@ -1457,106 +873,35 @@ Expected outcome: - Add a note to the local repository docs so future package failures do not lead to permanent insecure defaults. -** DONE [#B] Signel Client Open Work -CLOSED: [2026-06-12 Fri] -:PROPERTIES: -:LAST_REVIEWED: 2026-06-12 -:END: -Parent task for the Emacs Signal client bring-up. Engine: signal-cli (linked secondary device). Front end: a fork of signel at =~/code/signel=, wired through =modules/signal-config.el=. Design: [[file:docs/design/signal-client.org][docs/design/signal-client.org]]. - -Closed 2026-06-12: the bring-up shipped (dated history below). The signel project now has its own =.ai/= scope, so all open signel/signal-cli issues moved to [[file:~/code/signel/todo.org][the signel todo]] and are tracked there flat (the three open children here — handle-error leak, link-with-QR, groups in picker — moved in that pass). Work on =modules/signal-config.el= stays in this file. - -*** 2026-06-12 Fri @ 07:34:05 -0500 Signel notify-only-for-unviewed-conversation shipped -Wire =cj/signal--should-notify-p= (done) into signel's =signel--handle-receive= notify block (signel.el:277), route through Craig's notify script instead of bare =notifications-notify=, and gate sound behind a defcustom that defaults off. Spec addendum (the four notify details + wiring architecture) accepted 2026-06-11 — see [[file:docs/design/signal-client.org][signal-client.org]] "Notification slice". - -Built 2026-06-11 (TDD; fork commit e263367, dotemacs 9afc6128): =signel-notify-function= customization point in the fork; =cj/signel--notify= + =cj/signal--format-notify-body= + =cj/signel-notify-sound= in signal-config.el, wired in =:config= with a load-time =cj/executable-find-or-warn=. 17 new ERT tests green; full launch smoke clean; live-reloaded into the daemon and a synthetic toast fired through the script path. The two manual checks moved to the Manual testing and validation parent. - -*** 2026-05-26 Tue @ 20:06:58 -0500 Decided: fork signel rather than depend on it -signel is on MELPA but stale (one-author v0.1, all commits in a Jan-2026 burst, unattended tracker, no PRs). The spec needs internal edits (notify behavior, input-clobber fix), which are clean in a fork and hacky via advice, and a dead upstream means no divergence cost. Rejected: adopt-from-MELPA + advice, build-from-scratch, signal-cli-rest-api (Docker), MCP-tool, ERC bridge. Full rationale in the design doc. - -*** 2026-05-26 Tue @ 20:06:58 -0500 Linked as secondary device; contact parser verified against live shape -Installed signal-cli 0.14.4.1 (AUR; imported AsamK's signing key FA10826A... to clear the makepkg verification). Linked the account via QR. Built and unit-tested the pure helper layer in =modules/signal-config.el= (contact-list parsing, notify-when-not-viewing predicate) with =tests/test-signal-config.el=. Confirmed the live =listContacts= shape: givenName/familyName are top-level in 0.14, not under profile as first assumed; corrected the parser and verified it produces a picker entry for all 94 real contacts. Sent a request to archsetup to add signal-cli to the standard install. - -*** 2026-05-27 Wed @ 22:08:40 -0500 Shipped initiate-message workflow: picker + Note-to-Self + keymap -=cj/signel-message= (=C-; M m=) names contacts via =completing-read= over the cj-owned =cj/signel--contact-cache=, with "Note to Self" pinned first. =cj/signel-message-self= (=C-; M s=) sends straight to =signel-account=. Daemon guard =cj/signel--ensure-started= auto-starts the daemon when =signel-account= is set and =user-error='s with the remedy when it isn't; on start it pre-warms the cache. =cj/signel--fetch-contacts= rides the new RPC callback contract (=signel--send-rpc= with success-callback), the result feeds =cj/signal--parse-contacts=, and =cj/signel-refresh-contacts= (=C-; M no leaf=) clears + refetches. Cold-cache invocations =accept-process-output= up to =cj/signel-fetch-timeout= seconds (3s default) and =user-error= on timeout so a wedged daemon can't hang Emacs. Prefix keymap =cj/signel-prefix-map= bound under =C-; M= via =keybindings.el='s =cj/custom-keymap=: m / s / d / q / SPC. 15 new ERT tests in =tests/test-signal-config.el= cover ensure-started branches, fetch contract, cache empty-vs-failure, refresh, picker happy-path + cold-cache resolves + cold-cache timeout, message-self, and the prefix map bindings. - -*** 2026-05-27 Wed @ 21:55:57 -0500 Added JSON-RPC success-result dispatch in the signel fork -Fork commit 4740d97 added =signel--request-handler-map= (id → success callback), extended =signel--send-rpc= with an optional =success-callback= that registers under the new request id, and gave =signel--dispatch= a result branch that invokes the callback and removes the handler. Error responses also remhash the handler entry, and =signel-start= / =signel-stop= both =clrhash= the map so reconnect is reliably empty. Backward-compatible: existing callers that don't pass a callback hit the same code path as before. Five ERT tests in this project (=tests/test-signel-rpc-dispatch.el=, dotemacs commit bfec0eab) lock the contract: Normal (result invokes callback + cleanup, send-rpc registers), Boundary (unknown id is a no-op), Error (error response cleans up handler), reconnect (=signel-stop= empties the map). Refactor audit surfaced a separate pre-existing leak in =signel--handle-error= (request-buffer-map entries aren't removed on error); filed as the [#C] follow-up below. - -*** 2026-05-27 Wed @ 22:08:40 -0500 Shipped clobber fix for both insert paths -Fork commit 5ec56c0 added =signel--pending-input= (capture from input-marker to point-max) and =signel--restore-input= (re-insert after the redrawn prompt; nil-safe), and wired both into =signel--insert-msg= (the receive path) and =signel--insert-system-msg= (the error path). A mid-type send now survives both an incoming message and a system-error insertion. Four ERT tests in =tests/test-signel-input-preservation.el= cover the helpers (typed text, empty) and both insert paths via a temp =signel-chat-mode= buffer. - -*** 2026-05-27 Wed @ 22:08:40 -0500 use-package wired with C-; M keymap and local account config -=use-package signel :load-path "~/code/signel" :ensure nil= already wired earlier with =signel-auto-open-buffer nil=. Account source is =signel-account= set from =cj/signal-private-config-file= (=signal-config.local.el=, gitignored) loaded in =:config=, decided in the workflow spec. Keymap prefix =C-; M= attached via =with-eval-after-load 'keybindings= so the binding survives load-order. - -*** 2026-06-06 Sat @ 12:29:24 -0500 Fixed C-; M load-order bug via canonical register-prefix-map -Root cause: signal-config.el was the only feature module that violated the prefix-registration contract documented in =keybindings.el:41-45=. Every other prefix map uses =(require 'keybindings)= + a top-level =(cj/register-prefix-map "X" map)=; signal-config had neither, mutating =cj/custom-keymap= directly through a =(with-eval-after-load 'keybindings (when (boundp 'cj/custom-keymap) ...))= form. The =boundp= guard turned a load-order miss into a SILENT no-op — no error, the binding just never happened — which is why a live-reload (keybindings definitely loaded by then) papered over it. -Fix: added =(require 'keybindings)= at the top of signal-config.el and replaced the guarded form with =(cj/register-prefix-map "M" cj/signel-prefix-map "signal messages")=, matching the 25+ other prefix maps. -Verified: (1) new contract test =test-signal-config-prefix-map-registered-under-c-semi-m= asserts =C-; M= resolves to =cj/signel-prefix-map= (35/35 green); (2) full =emacs --batch= init.el launch — the exact failing scenario — now shows =C-; M= bound; (3) clean byte-compile; (4) live-reloaded into the daemon, binding confirmed. No unit-level red was possible: the =boundp= guard is robust under all standard test timings, which is the CLAUDE.md launch-only-failure class. - -*** 2026-05-28 Thu @ 03:09:18 -0500 Chat buffer docks bottom 30% and C-c C-k cancels -=display-buffer-alist= entry in =modules/signal-config.el= matches =^\*Signel: = chat buffers and routes them through =display-buffer-at-bottom= with =window-height . 0.3=, so the chat docks to the bottom 30% of the frame. The signel fork's =signel-chat= switched from =switch-to-buffer= to =pop-to-buffer= so the rule can apply (=switch-to-buffer= ignores =display-buffer-alist=). =C-c C-c= was already bound to =signel--send-input= in the mode; =C-c C-k= now binds =signel--cancel-input=, a new fork helper that clears the editable region between =signel--input-marker= and =point-max= and then calls =quit-window=. Buffer stays alive so chat history above the marker survives revisits; cleared input means the next visit lands on a fresh prompt. Five ERT tests in =tests/test-signel-cancel-input.el= (clears pending, empty-area no-op, quit-window called, buffer preserved, keymap binding) and two new tests in =tests/test-signal-config.el= (entry shape + regex match set). Dotemacs commit 998e9c7a, fork commit df02d79. - -** DOING [#B] Migrate All Terminals From Vterm to Ghostel +** PROJECT [#B] F-key Completion :feature: :PROPERTIES: -:LAST_REVIEWED: 2026-06-04 +:LAST_REVIEWED: 2026-06-02 :END: -Replace vterm with ghostel (libghostty-vt) as the single terminal engine across every workflow, and rename ai-vterm → ai-term. References: [[file:docs/2026-05-25-emacs-terminal-comparison.org][docs/2026-05-25-emacs-terminal-comparison.org]] (vterm vs eat vs ghostel research); migration spec [[file:docs/design/vterm-to-ghostel-migration-spec.org][docs/design/vterm-to-ghostel-migration-spec.org]] (READY; external review incorporated 2026-06-04, D1-D7 agreed). Build in 5 phases (0-4); see the spec's Implementation tasks block. - -Decisions D1-D7 are settled in the spec's Agreed-decisions section. Build order below; each phase stays green (suite + byte-compile) at every step. - -*** TODO [#B] Follow-up: theme ghostel ANSI faces in dupre -D2 — set the 16 ghostel-color-* + ghostel-default faces in dupre-faces/palette. - -*** TODO [#B] Follow-up: evaluate ghostel-eshell + ghostel-compile -D3 — ghostel-eshell as eshell visual backend; ghostel-compile against F4 dev-fkeys. - -*** TODO [#B] Investigate ghostel selection/highlight color -Look at how selected text is highlighted in a ghostel buffer — the region face in =ghostel-copy-mode= and any live selection — surfaced during the copy-mode debugging. Check whether the highlight is legible against the dupre background and consistent with the rest of the config; if it needs theming, fold it in with D2 (theming the ghostel faces in dupre). - -*** 2026-06-04 Thu @ 23:57:09 -0500 Phase 0 done: characterization baseline green -=make test= green except the 5 documented pre-existing failures (4 test-dupre-theme, 1 test-init-module-headers), none terminal-related. Characterization coverage already present + green for all six must-survive behaviors: vterm-toggle--dispatch/display/buffer-filter, vterm-tmux-history, ai-vterm--show-or-create/launch-command/f9-in-vterm, ui-config--buffer-cursor-state + vterm-copy-mode-cursor, dashboard-config-launchers. Add a characterization test before any behavior change in later phases if a gap appears. - -*** 2026-06-05 Fri @ 00:38:34 -0500 Phase 1 done: ghostel + term-config.el -=modules/term-config.el= written (full port of vterm-config: tmux history/copy-mode-dwim preserved via process-tty-name + ghostel-send-string; F12 toggle + display rule + geometry; cj/term-map C-; x menu → ghostel commands; which-key "terminal menu"; ghostel-max-scrollback 10MB; C-; added to ghostel-keymap-exceptions; F12 + C-; in ghostel-mode-map; use-package ghostel guarded per D6). Dropped: mouse-wheel SGR forwarding, vterm-timer-delay hacks, copy-mode cursor hook, goto-address hook. ghostel installed into elpa (MELPA + auto-downloaded native module). Tests: test-term-toggle--{dispatch,display,buffer-filter} + test-term-tmux-history (16) ported with a ghostel stub in testutil-ghostel-buffers; all green. - -*** 2026-06-05 Fri @ 00:38:34 -0500 Phase 2 done: ai-vterm→ai-term on ghostel -=modules/ai-vterm.el= → =modules/ai-term.el=: 6 vterm call sites swapped to ghostel (buffer named via let-bound ghostel-buffer-name + pinned ghostel-buffer-name-function so OSC titles don't rename agent buffers); F9/C-F9/M-F9 on global + ghostel-mode-map; refuse-in-terminal guard removed (D4 — F9 launches in TTY frames); tmux-suppression invariant preserved (cj/--ai-term-suppress-tmux). 23 ai-vterm tests renamed → test-ai-term--* (terminal-guard test deleted, obsolete); show-or-create + f9-in-term rewritten for ghostel; all green. ui-config cursor-state ported (ghostel-mode + ghostel--input-mode; copy/emacs = read-only, else writeable) + its test. init.el now requires term-config + ai-term; vterm-config.el + ai-vterm.el deleted. Full suite green except the 5 documented pre-existing failures (4 dupre-theme, 1 init-module-headers/popper-config-missing — both unrelated). validate-modules ✓; full early-init+init smoke clean (no ghostel/term/ai-term errors). vterm package still installed (Phase 4) — dashboard "Launch VTerm" + dormant auto-dim still reference it until Phase 3/4. Restart Emacs to pick up ghostel (load-order + use-package :config change). - -*** 2026-06-05 Fri @ 00:50:58 -0500 Phase 3 done: satellites ported to ghostel -Deleted auto-dim's vterm color-advice + redraw integration (~165 lines; D1 — terminals don't dim, ghostel bakes its palette per-terminal so there's no per-window color hook); dashboard launcher → =(ghostel)= + "Launch Terminal" label; cj-window-geometry/toggle-lib doc comments; module-inventory + init-load-graph doc refs. (ui-config cursor-state + init.el requires landed in Phase 2.) Trimmed test-auto-dim-config (dropped the 6 vterm tests) + updated the dashboard-launcher test stub. Incidental: removed the stale =popper-config= entry from the test-init-module-headers allowlist (the file doesn't exist + isn't required) — fixes the long-standing pre-existing test failure. - -*** 2026-06-05 Fri @ 00:50:58 -0500 Phase 4 done: vterm + vterm-toggle removed -=package-delete='d vterm + vterm-toggle from elpa. No vterm refs remain in modules/init except intentional historical comments. Suite green except the 4 pre-existing dupre-theme failures (the popper-config one is now fixed). validate-modules ✓; full early-init+init batch smoke = INIT-SMOKE-OK. The migration parent stays DOING until Craig restarts Emacs and walks the ghostel manual-verify matrix under "Emacs Manual Testing and Validation". -*** 2026-06-05 Fri @ 14:24:02 -0500 Auto-dim revisit cancelled — current no-dim behavior is fine -Craig confirmed the shipped auto-dim setup works fine as-is: terminal buffers don't participate in unfocused-window dimming (D1), and the rest of auto-dim behaves. That is the measured decision the original task asked for — option (a), keep no-dim — so no rework (the focus-loss palette-blend in option (b) or an upstream per-window hook in option (c)) is needed. Closing without further investigation. Context: [[file:docs/design/vterm-to-ghostel-migration-spec.org][migration spec]] D1. - -*** 2026-05-26 Tue @ 15:15:43 -0500 Direction confirmed; Claude Code in eat needs a caveat -Craig confirmed the consolidation: one terminal engine everywhere — eat for standalone terminal buffers (replacing vterm) plus =eat-eshell-mode= as eshell's visual backend, keeping eshell as the shell. Not dropping eshell for eat + zsh. +The L546 ticket "Rework dev F-keys" landed roughly 75% as of the 2026-05-27 audit. F4 (compile+run dispatcher, project-type detection, clean-rebuild, projectile cache revert), F7 (coverage), and the format-key migration off F6 are all shipped with ERT coverage. F6 ships Phase 2a only — "All tests" and "Current file's tests" via plain F6 and C-F6. -Researched whether Claude Code runs cleanly in eat (Craig runs it in his Emacs terminal). Verdict: mostly, with caveats. eat is the default backend for claude-code.el and renders the TUI with color and full key handling, but there is an eat-specific bug where Claude Code's input handling makes the buffer scroll-pop to the top on window-buffer changes and the input box can get stuck mid-buffer (recoverable, but it does not happen in vterm or ghostel), and eat runs about 1.5x slower than vterm on heavy streaming output. claude-code.el's own docs name ghostel as the most faithful Claude TUI renderer. +Phase 2b remains: per-language test discovery, the "Run a test..." menu entry, M-F6 fast path, buffer-local last-test memory, and the spec-mandated "No tests found for <buffer>" error. The =dev-fkeys.el= header (L35–46) already sketches the tree-sitter capture-then-filter pattern needed to work around Emacs bug #79687 on the emacs-30 branch. -Recommendation: consolidate everyday terminals onto eat, but keep ghostel (or vterm) for the Claude Code workflow specifically — the scroll-pop / stuck-input bug and the slower heavy-stream handling are exactly what bites a long Claude session. Sources: [[https://github.com/cpoile/claudemacs][claudemacs]], [[https://github.com/stevemolitor/claude-code.el][claude-code.el]], [[https://codeberg.org/akib/emacs-eat][emacs-eat]]. +Two smaller cleanups also fall out: the header comment claims TS/JS is "punted for v1" while the cmd-builder at =dev-fkeys.el:384= actually emits a vitest/jest command, and the cmd-builder is a likely home for =cj/--tests-in-buffer= once it lands. -Eval plan (from the research doc): install EAT alongside vterm, run the same workloads through both, decide. Test matrix: Claude Code TUI, lazygit, htop/btop, yazi, a heavy-output build, ssh to a remote, and eshell with =eat-eshell-mode=. Assess rendering fidelity, stability under heavy output, and Emacs-native line editing. Switch only if it covers every workflow without regression. +Open: helper home — keep =cj/--tests-in-buffer= in =dev-fkeys.el= (per L546 spec) or push it into =test-runner.el= (per the parallel "Fix up test runner" thread). Elisp "Run a test..." — drill into individual =ert-deftest= names, or keep the current regex-aggregate (=make test-name TEST=^test-<stem>-=). -*** 2026-06-02 Tue @ 14:12:48 -0500 Audit: eval plan not yet run; back to TODO -Task audit found no eval work recorded since the 2026-05-26 direction-confirmed note. The test matrix above is unrun, so the task isn't actively in progress — moved DOING back to TODO until the eval starts. +*** TODO [#B] Per-language test discovery helper :feature:test: +Build =cj/--tests-in-buffer= returning a list of test names; tree-sitter capture-then-filter for python/go/ts/js per the bug #79687 workaround in =dev-fkeys.el= L35–46; sexp scan for elisp =ert-deftest= forms. -*** 2026-06-04 Thu @ 22:40:27 -0500 Pivot: ghostel as the single engine (not eat) -Direction changed from eat-everyday + ghostel-for-Claude to ghostel-for-everything, and the task is now a migration rather than an eval. Rationale: ghostel is claude-code.el's most-faithful Claude TUI renderer and the fastest engine (81 vs vterm 34 vs eat 4.9 MB/s), and an audit confirmed it exposes an analog for every vterm primitive this config uses (=ghostel-send-string=, =ghostel-keymap-exceptions=, =ghostel-copy-mode=, =ghostel-clear-scrollback=, =ghostel-send-next-key=, =ghostel-next-prompt= / =ghostel-previous-prompt=, =ghostel-max-scrollback=, =ghostel-kill-buffer-on-exit=). eat's washed colors, the scroll-pop / stuck-input bug under Claude Code, and slowest throughput made it the weaker single-engine pick; one engine beats running two. Surface audited: 2 main modules (=vterm-config.el=, =ai-vterm.el=) + 4 satellites (=auto-dim-config.el= is the heavy one) + ~35 test files + init.el. Next: spike ghostel read-only to answer the open migration questions (auto-dim rework — ARCHITECTURE.md forbids the around-redraw color advice vterm uses; tmux pane-id via =process-tty-name= on a ghostel process; buffer naming; TTY-frame behavior; copy-mode keybinding parity), then write the migration spec under =docs/design/= and review it. +*** TODO [#B] F6 Run-a-test menu entry :feature:test: +Add "Run a test..." to =cj/f6-test-runner= candidates; pre-select =cj/--last-test-run=; signal =user-error= "No tests found for <buffer>" when discovery returns nil. -*** 2026-06-04 Thu @ 23:17:54 -0500 Spec review: not ready until decisions and handoff shape are closed -Ran the spec-review workflow against [[file:docs/design/vterm-to-ghostel-migration-spec.org][docs/design/vterm-to-ghostel-migration-spec.org]] and wrote a companion review file (incorporated and deleted 2026-06-04). Verdict: =Not ready=. Direction is sound, but the draft still has open D1-D5 decisions, lacks the workflow-required =Implementation phases= section and acceptance criteria, and needs explicit ghostel package/native-module failure behavior before implementation tasks can be emitted. +*** TODO [#B] M-F6 fast path :feature:test: +Bind =M-<f6>= to a thin wrapper that calls the same "Run a test..." path directly; release the reservation comment at =dev-fkeys.el:541=. -*** 2026-06-04 Thu @ 23:24:28 -0500 Spec-response: review incorporated, raised to READY -Folded the external review via spec-response. Craig accepted D1-D5; baked them plus D6 (module-failure = degrade-with-warning, modifying the reviewer's fail-loud) and D7 (=ghostel-max-scrollback= 10 MB) into a new Agreed-decisions section. Added Implementation phases (0-4), Acceptance criteria, Dependency/module-failure behavior, Test strategy, per-phase key/menu ownership, the tmux-suppression contract, and an Implementation-tasks drop-in block. Status DRAFT → READY; review file deleted. Build is now unblocked. +*** TODO [#B] Buffer-local cj/--last-test-run :feature:test: +Add the buffer-local var, set it on each "Run a test..." selection, use it as the completing-read default so a bare RET re-runs the last test. -*** 2026-06-04 Thu @ 23:30:18 -0500 External re-review: ready -Re-reviewed [[file:docs/design/vterm-to-ghostel-migration-spec.org][docs/design/vterm-to-ghostel-migration-spec.org]] after incorporation. Verdict: =Ready=. No further blocking review notes; implementation can start from the phase plan and acceptance criteria in the spec. +*** TODO [#B] TS/JS coverage status sync +Update the =dev-fkeys.el= header comment (L33) — TS/JS is no longer punted; the cmd-builder at L384 emits vitest/jest. Document the prefer-vitest fallback. -** DOING [#B] Module-by-module hardening +** PROJECT [#B] Module-by-module hardening :PROPERTIES: :LAST_REVIEWED: 2026-06-05 :END: @@ -2156,7 +1501,7 @@ Completion review 2026-05-15: All three children landed: shared cache helper extracted, idle timers gated, and directory-scan failures surfaced instead of hidden. ***** 2026-05-23 Sat @ 04:18:44 -0500 Extracted a shared cache helper -=cj-cache-lib.el= now provides =cj/cache-valid-p=, =cj/cache-building-p=, and =cj/cache-value-or-rebuild=, consumed by both =org-agenda-config.el= and =org-refile-config.el=; the contract is documented in =docs/design/cache-helper-design.org=. The agenda and refile public commands are unchanged. +=cj-cache-lib.el= now provides =cj/cache-valid-p=, =cj/cache-building-p=, and =cj/cache-value-or-rebuild=, consumed by both =org-agenda-config.el= and =org-refile-config.el=; the contract is documented in =docs/specs/cache-helper-design-spec-implemented.org=. The agenda and refile public commands are unchanged. ***** 2026-05-24 Sun @ 07:26:31 -0500 Surfaced directory-scan failures instead of hiding/crashing @@ -2419,7 +1764,7 @@ Expected outcome: - Keep the current "interpreted markers win" behavior only if that remains the intentional UX after trying it in mixed Python/Node projects. -**** PROJECT [#B] Consolidate LSP ownership across programming modules :refactor: +**** TODO [#B] Consolidate LSP ownership across programming modules :refactor: LSP setup is currently split across =prog-general.el=, =prog-lsp.el=, and each language module. There are multiple =use-package lsp-mode= forms and some @@ -2895,221 +2240,16 @@ configuration (=text-config=, =diff-config=, =ledger-config=, =games-config=, =mu4e-org-contacts-setup=, =telega-config=, =httpd-config=, =org-agenda-config-debug=). -** TODO [#C] theme-studio picker panel blends into the page :bug:quick:solo: -:PROPERTIES: -:LAST_REVIEWED: 2026-06-11 -:END: -Craig, 2026-06-11 manual-test walk: the color picker's background is hard to distinguish from the page background. Give the picker panel a visibly distinct background or a highlighted border so it stands out. Pin with a gate asserting the picker element carries the distinct style. - -** TODO [#C] theme-studio Rust + Zig language previews :feature: -:PROPERTIES: -:LAST_REVIEWED: 2026-06-11 -:END: -Requested by Craig 2026-06-11: add Rust and Zig code samples to the language previews (samples.py currently carries Elisp, Go, Python, TypeScript, Java, C, C++, Shell). Each sample should exercise the treesit token categories distinctive to its language (Rust: lifetimes, macros, attributes, traits; Zig: comptime, builtins, error unions), then regenerate theme-studio.html and extend the test surface. - -** TODO [#C] theme-studio face-consistency check :feature: -:PROPERTIES: -:LAST_REVIEWED: 2026-06-10 -:END: -Rule taxonomy captured in [[file:docs/design/theme-studio-face-rules.org][docs/design/theme-studio-face-rules.org]] (Design Rules vs Fidelity Rules). The two checks below map to those two rule kinds. Both surface structural-attribute (weight/slant/underline/box/overline/height) issues; color is the theme's design and out of scope. - -1. Theme cross-cutting consistency (primary, per Craig 2026-06-09): the theme has deliberate cross-cutting rules — e.g. headings/titles are bold, links are underlined, errors/warnings/success are bold. Flag where the theme BREAKS ITS OWN rule (a heading that isn't bold, a link that isn't underlined). The designer declares the rules; the check finds the violators. This is the "tell me where I broke the rule" guardrail. - -2. defface-baseline divergence (secondary): flag where a face's structural attrs differ from its package =defface= so each divergence is deliberate, not an accidental drop. Would have caught the dropped underline/bold defaults and the contradictions (shr-h3 bold-vs-italic, erc-action italic-vs-bold) from the package-face audit as they were introduced. - -Bake into the tool (a lint surfaced in the UI) or run as a build-time check (seeds vs live deffaces via emacsclient). - -** TODO [#C] Color-family per-hex hint override :feature: -:PROPERTIES: -:LAST_REVIEWED: 2026-06-11 -:END: -For the ~1 color per palette that sits on a ramp-collision point (e.g. yellow+2 on the distinguished palette, which by every hex signal belongs to the olive ramp though its name says gold), automatic grouping cannot recover the designer's intent. Add a per-hex family override: drag a swatch to a different column, store the override keyed by hex (never the name, so renaming is still free), consult it after the LCCL clustering, and drop/mark-stale it when the hex changes substantially. Export stays mostly flat; only overrides are extra metadata. Both reviews recommend this exact shape; details in =~/color-sorting-fable.org= (§ "The irreducible case") and =~/color-sorting-codex.org= (§ "What to store"). - -** TODO [#C] Internet radio now-playing song :feature: -:PROPERTIES: -:LAST_REVIEWED: 2026-06-11 -:END: -Show the currently-playing song while streaming an internet radio station. Lives in =modules/music-config.el= (EMMS + MPV backend, M3U radio stations). The track title comes from the stream's ICY metadata — EMMS exposes it via =emms-track-description= / =emms-playing-time= and updates it on the metadata-change hook; MPV reports the ICY title too. Add an option to show the song in the minibuffer (e.g. echo on track change, or an on-demand command). Consider also a mode-line indicator as a second surface. - -** TODO [#C] Evaluate jamescherti essential-emacs-packages list :quick: -:PROPERTIES: -:LAST_REVIEWED: 2026-06-11 -:END: -Review [[https://www.jamescherti.com/essential-emacs-packages/][James Cherti's essential Emacs packages]] for anything worth installing. Cross-check each candidate against what is already in the config (=modules/= + =init.el=), skip the ones already present, and shortlist the genuinely new ones with a one-line rationale. Future-installation research, not a commitment to install. - -** TODO [#C] dupre-clear theme — contrast-first AAA sibling :feature: -Build a new theme (working name "dupre-clear", final name TBD) that takes dupre's color identity and rebuilds it Prot's way: contrast-first, targeting WCAG AAA (~7:1 on the ground), where the in-progress dupre revision is mood/depth-first and lands at AA. Same hues (dupre blue, emerald, gold, terracotta, regal violet, mint) brightened to clear the AAA floor; same modus-style role mapping (blue keywords bold, gold functions, violet types, emerald strings, terracotta constants, silver default, warm-grey comments, metallic greys, navy + regal fills). Build the dupre revision first; this reuses its hue choices as the starting point. - -Full design + methodology + starting palette + open questions in the spec: [[file:docs/design/dupre-clear-theme.org][docs/design/dupre-clear-theme.org]]. Key prerequisite/context: the dupre-redesign entry in =.ai/session-context.org= (the AA palette this brightens). Hardest slot: blue keywords (a deep dupre blue can't be AAA on near-black — decide brighten vs keep-AA-exception vs lift-the-ground). -** TODO [#C] theme-studio terminal/ANSI colors :feature: -theme-studio represents GUI faces only; terminal colors aren't surfaced at all. Scope decided 2026-06-09: GUI-first faces, NOT full per-face display-class fallback. Two pieces: - -1. ANSI-16 panel. Map the 16 ANSI slots (black/red/green/yellow/blue/magenta/cyan/white + bright variants) to palette colors, with a preview, and export them so =build-theme.el= emits the =ansi-color-*= / =term-color-*= faces. This matters even in pure-GUI Emacs: colored shell output, compilation buffers, eshell, and vterm/eat all draw from these. Signals must line up with their ANSI slot (error red→ansi red, success→green, warning→yellow, info/link→blue) so a signal reads the same in a terminal. - -2. Core-face 16-color fallback. Only the ~10 faces that decide console legibility get a =(((class color) (min-colors 16)) ...)= clause plus a =(t ...)= floor: default/fg, bg, keyword, string, comment, constant, error, warning, region, mode-line, line-number. Tune these for contrast — push it UP, legibility over fidelity, because the only 16-color target is the bare Linux virtual console (an occasional emergency context). The long tail stays GUI-first and auto-approximates. - -Why this scope: the GUI and the normal terminal (foot + tmux, truecolor / ≥256-color) both render the GUI hexes fine; GUI-first is correct there. Only the Linux VT is 16-color, and a low-contrast palette approximates badly down to 16 — so a few core faces get a deliberately higher-contrast 16-color fallback rather than every face carrying a multi-spec. Tool work: the ANSI-16 panel + a flag on the core faces to also capture a 16-color value; =build-theme.el= emits multi-spec only for those. Full per-face fallback is revisited only if console work becomes regular. -** TODO [#C] Consider consolidating/harmonizing the UI in all Message Clients -:PROPERTIES: -:LAST_REVIEWED: 2026-06-06 -:END: -They should have the same UI paradigms and patters for consistency. -** TODO [#C] Slack message buffers in a reused popup window :quick: -:PROPERTIES: -:LAST_REVIEWED: 2026-06-05 -:END: -Display slack.el message and thread buffers in a dedicated popup window (side or bottom) and reuse that one window instead of spawning a new window per buffer. Likely a =display-buffer-alist= rule (or popper integration) in =modules/slack-config.el=. - -** TODO [#C] Implement EMMS-free music-config architecture :refactor: -:PROPERTIES: -:LAST_REVIEWED: 2026-06-01 -:END: -*** 2026-05-15 Fri @ 19:17:01 -0500 Specification -Implement the design in [[file:docs/design/music-config-without-emms.org][Design: music-config Without EMMS]]. - -The implementation should make =music-config.el= load without EMMS, introduce -package-owned playlist and track state, add a =cj/music-playlist-mode= view, -and route playback through a small backend protocol with an initial =mpv= -backend. Preserve the current F10 and =C-; m= user workflows where practical, -and keep M3U load/save/edit/reload plus radio station creation working. - -Complexity estimate: high. This is a module rewrite with a new internal data -model, package-owned playlist mode, backend protocol, mpv process management, -and migration of existing EMMS-backed commands/tests. - -Time estimate: 2-4 focused days for an EMMS-free v1 with play/stop/next/previous, -M3U persistence, playlist UI, and focused tests. Add another 1-2 days if v1 -must include full mpv IPC support for pause, seek, and volume parity. - -Acceptance checks: -- =music-config.el= can be required in batch with no EMMS package installed. -- Existing focused music tests pass without EMMS preload or EMMS stubs except - where a compatibility adapter is explicitly under test. -- New tests cover playlist state, backend command dispatch, M3U persistence, - and the EMMS-free load smoke path. - -*** TODO [#B] Pure helpers + state structs extraction :refactor: -Lift EMMS-free pure code into standalone form: file validation, recursive -collection, M3U parse/write, safe filenames, radio-station content, and -URL/file track typing. Introduce =cj/music-track= and =cj/music-playlist= -cl-structs plus state-mutation helpers (=cj/music-playlist-*= predicates and -setters). Files: =modules/music-config.el=, possibly a new -=modules/music-state.el= split. Existing pure-helper tests should pass -unchanged. - -Acceptance: structs defined, helpers callable in batch without EMMS loaded. - -Depends on: none (start here). - -*** TODO [#B] Backend protocol + fake test backend :refactor:test: -Define the backend plist contract (=:available-p :play :pause :resume :stop -:seek :volume :status :metadata=) and =cj/music-current-backend=. Add -=cj/music-state-change-functions= abnormal hook with the v1 event set -(=started=, =paused=, =resumed=, =stopped=, =finished=, =error=, -=playlist-changed=, =mode-changed=). Create =tests/testutil-music-backend.el= -exposing =cj/test-music-fake-backend= with an event ledger. - -Acceptance: fake backend installable in tests; ordered-event assertions work -against a no-op playback flow. - -Depends on: pure helpers + state structs. - -*** TODO [#B] Read-side state API + characterization tests :test:refactor: -Implement =cj/music-playing-p=, =cj/music-paused-p=, =cj/music-current-track=, -=cj/music-playlist-state=, =cj/music-track-description=. Before rewriting -command bodies, add characterization tests against current behavior for -=cj/music-next=, =cj/music-previous=, =cj/music-toggle-consume=, -=cj/music-playlist-toggle=, =cj/music-playlist-load=, =cj/music-playlist-clear= -so the migration has a safety net. - -Acceptance: read-side helpers covered; characterization tests green against -the current EMMS-backed implementation. - -Depends on: backend protocol + fake test backend. - -*** TODO [#B] Playlist major mode + render-from-state :feature: -Add =cj/music-playlist-mode= rendering the buffer as a view over -=cj/music-current-playlist=. Selected-track overlay + face, header reads -package state, full keymap from design Section "Playlist Buffer" (RET/p, SPC, -s, >/<, f/b, +/=/-, a, A, c/C, L/S/E/g, r/t/z/x, Z, i, o, q, S-up/down). -Preserve the active-window background highlight. - -Acceptance: opening the playlist renders package state; reorder/shuffle/clear -go through state mutations and re-render; tests cover header + overlay -positioning. - -Depends on: read-side state API. - -*** TODO [#B] mpv backend implementation :feature: -Implement =cj/music-mpv-*= backend functions. Phase the work per migration -plan §5: (a) process spawn, UID/PID-stamped socket under -=temporary-file-directory=, stale-socket sweep, IPC connect via -=make-network-process :family 'local=, state-hook plumbing. (b) play/stop/ -next/previous + finished-track auto-advance with deliberate-stop tracking. -(c) pause/resume, seek, volume over JSON IPC. (d) metadata read on track -start. Add =cj/music-doctor= reporting platform capabilities; ship Windows -degraded mode (play/stop/next/previous only via stdin/=call-process=). - -Acceptance: integration tests tagged =:slow= and skipped when =mpv= not on -PATH; on Linux/macOS pause/seek/volume parity works; clean socket lifecycle -across Emacs restart and exit. - -Depends on: backend protocol + fake test backend. - -*** TODO [#B] Command + Dired/Dirvish rewire :refactor: -Migrate user-facing commands (=cj/music-play=, =cj/music-pause=, -=cj/music-stop=, =cj/music-next=, =cj/music-previous=, seek/volume, -random/repeat/consume/shuffle toggles) to operate on package state and call -=cj/music-current-backend=. Update Dired/Dirvish =+= add routing, -M3U load/save/edit/reload, radio-station creation, F10 toggle, and =C-; m= -keymap entries to drop EMMS symbols. Migrate command-flow tests to the fake -backend. - -Acceptance: full keymap functional end-to-end against the fake backend; -characterization tests still green; Dirvish =+= add path covered. - -Depends on: playlist major mode + mpv backend. - -*** TODO [#B] EMMS removal + parity walk :test: -Remove =cj/emms--setup=, the on-demand EMMS loader, and the =use-package emms= -block. Add the EMMS-free batch-load smoke test (=music-config.el= requires -clean without EMMS installed). Run the 22-step parity walk from design -§"Parity Walk" against the new implementation; record measurements against -the performance budget (1000-track load <500ms, reorder <50ms, IPC dispatch -<100ms, header refresh <16ms) and note any deviations. - -Acceptance: =init.el= loads cleanly without EMMS; =make test= passes; parity -walk recorded as a completion log entry under the parent task. - -Depends on: command + Dired/Dirvish rewire. - -** TODO [#C] music-config option-combination audit + tests :test: -:PROPERTIES: -:LAST_REVIEWED: 2026-06-06 -:END: - -Two-part task surfaced 2026-05-28 during the Signel verify walk — generalized from the "are there combinations of options that we'd want to disallow together" question. - -Part 1 — enumerate the configurable option surface of =modules/music-config.el=: every =defcustom=, every behavior toggle, every backend-selection variable, every cross-cutting flag (auto-play, repeat, shuffle, follow-cursor, side-window-height-fraction, etc.). Audit each option for valid value ranges. Capture the matrix in =docs/design/music-config-options.org= (or inline in the test file's header — judgment call when the matrix lands). - -Part 2 — combinatorial test coverage. Use the =/pairwise-tests= skill: identify parameters, value partitions, and inter-parameter constraints, build a PICT model, generate the minimal test matrix that hits every 2-way combination. For each problematic combination the matrix surfaces, decide: (a) validate at config-load time with a =user-error= that names the conflict, (b) runtime guard in the affected command, or (c) doc-only warning in the option's docstring. Disallow only the genuinely-broken pairs; doc-warn the merely-confusing ones. - -The recent F10 side-window-height-fraction work and the EMMS-free refactor candidate ("Implement EMMS-free music-config architecture" above) are both natural near-term touchpoints — best to land this audit before the EMMS swap so the new architecture inherits a clean option spec. - -** TODO [#C] gptel-magit activation fails on velox :bug:quick: +** PROJECT [#B] theme-studio guide-support features :feature:studio: :PROPERTIES: -:LAST_REVIEWED: 2026-06-01 +:LAST_REVIEWED: 2026-06-13 :END: -Surfaced 2026-05-25 while diagnosing an unrelated load failure over SSH. velox-specific — the workstation has a current gptel and does not show it. - -At startup (and reproducibly in batch) velox logs: "Unable to activate package `gptel-magit'. Required package `gptel-0.9.8' is unavailable." gptel-magit depends on gptel >= 0.9.8 and velox's installed gptel is older or missing, so it can't activate. A startup warning, not a blocker. - -Reproduce: -: emacs --batch --no-site-file -L . -L modules --eval "(package-initialize)" --eval "(message \"done\")" 2>&1 | grep -i gptel - -Next step: check the installed gptel version (=(assq 'gptel package-alist)= or =M-x package-list-packages=), update gptel to >= 0.9.8, then re-evaluate gptel-magit activation. If gptel was pinned/held on velox, reconcile the pin against the gptel-magit dependency. - -** TODO [#C] GPTel Work :feature: +From the color-assignment guide work (2026-06-08): make the tool support the guide without mandating it — everything a seed, an advisory, or a view, never a gate. Two specs to write, both deriving from the rewritten guide and its seed table ([[file:scripts/theme-studio/theme-coloring-guide.org][theme-coloring-guide.org]]). +*** 2026-06-08 Mon @ 19:08:00 -0500 Seeding-engine spec written and Ready +[[id:b70b37f2-37df-4c8e-ac2f-1f20d12e33dd][theme-studio-seeding-engine-spec-doing.org]] — role table + face→role maps for syntax/UI/org, OKLCH shade generation, reseed dupre-revised to the compact mapping. Codex-reviewed, Ready. Implementation tracked under the seeding-engine parent below. +*** TODO Guide-support views and advisories spec +Five optional surfaces, all dismissible and non-blocking, in one collapsible panel where they advise: (1) CVD-simulation toggle on previews (deuteranopia/protanopia/tritanopia); (2) squint/blur preview toggle; (3) lightness-ramp view + palette advisories (accent count over 6-8, roles separated only by red/green) — depends on the OKLCH/ΔE core; (4) definition-vs-call / weight advisories; (5) state-over-syntax preview (region/search/diff tint over real syntax-colored text). Sequence: rewritten guide reviewed → seeding-engine spec → this. Advisories (3, 4) layer on the perceptual-metrics feature. +** PROJECT [#C] GPTel Feature Extension Brainstorm :feature: :PROPERTIES: :LAST_REVIEWED: 2026-06-01 :END: @@ -3124,13 +2264,13 @@ structured workspace, not a text terminal. Per-theme spec lives in the task body once written; implementation tasks land as siblings of the spec heading once the spec is approved. The magit-backend reimplementation of the shipped git tools is tracked separately in -[[file:docs/design/gptel-git-tools-magit-backend.org][gptel-git-tools-magit-backend.org]]. +[[id:bd47c9a8-aae1-4a3d-ad5b-b8767f2fd580][gptel-git-tools-magit-backend-spec.org]]. *** TODO [#C] Wire Up MCP.el so That GPTel Has Access to MCP Servers via GPTel Tools **** 2026-05-16 Sat @ 15:44:36 -0500 Spec -Design doc: [[file:docs/design/mcp-el-gptel-integration.org][docs/design/mcp-el-gptel-integration.org]] +Design doc: [[id:b4c274c5-8572-4a7b-b657-d315712bd6af][docs/specs/mcp-el-gptel-integration-spec-doing.org]] **** 2026-05-17 Sun @ 14:14:34 -0500 Landed ai-mcp.el pure-helper foundation @@ -3258,7 +2398,7 @@ Commit =54d231be=. Sections 1 (constants + defcustoms) and 3 (pure helpers) of **** 2026-05-16 Sat @ 16:20:00 -0500 Spec -Design doc: [[file:docs/design/gptel-gh-tool.org][docs/design/gptel-gh-tool.org]] +Design doc: [[id:a124dd0f-1f40-4533-aeb8-595d93e20865][docs/specs/gptel-gh-tool-spec.org]] *** TODO [#C] GPTel should autosave regularly after a conversation is saved *** TODO [#B] Org Workflow Related Tools @@ -3375,74 +2515,74 @@ Even when the agent can't run the whole bisect, it keeps the investigation structured and preserves why each commit was judged good or bad. -*** TODO [#B] Messaging Related Tools +**** TODO [#B] Messaging Related Tools Affordances over mu4e, Slack, Telegram, and ERC. Same shape across protocols: read recent threads, search by sender / topic, compose a draft from a prompt + thread context, leave the send under explicit user control. -**** TODO [#B] Mu4e thread and compose tools :feature: +***** TODO [#B] Mu4e thread and compose tools :feature: Read the message at point and surrounding thread (with attachments summarized); query the inbox by =from:= / =subject:= / date range; compose a draft from a prompt + thread context using =org-msg=. Pairs with the existing =mu4e-org-contacts-integration.el=. -**** TODO [#B] Slack thread and compose tools :feature: +***** TODO [#B] Slack thread and compose tools :feature: Read channel / DM / thread history through =emacs-slack=; search by user or channel; compose a draft message but leave sending to me. Mirrors the mu4e shape so the agent's interface is uniform across messaging protocols. -**** TODO [#B] Telegram and IRC read tools :feature: +***** TODO [#B] Telegram and IRC read tools :feature: Same shape as Slack for =telega= (Telegram) and =erc= (IRC): recent-message reads, search, and draft compose. Bundled because the API shape is identical even if the underlying clients differ. -**** TODO [#B] Contact resolution tools :feature: +***** TODO [#B] Contact resolution tools :feature: Resolve a name to email / Slack ID / Telegram handle via =org-contacts= and the configured address books. Removes the "who's this person again" friction from the compose flows above. -*** TODO [#B] File and Buffer Related Tools +**** TODO [#B] File and Buffer Related Tools Affordances that expose the user's actual workspace -- open buffers, narrowed regions, marked files, vterm / eshell sessions -- as structured context. Stops the model from asking "what file are you looking at" or "what region is selected." -**** TODO [#B] Buffer state tools :feature: +***** TODO [#B] Buffer state tools :feature: List visible buffers with major-mode + file (when any); read the narrowed region instead of the whole buffer; report point + mark positions and the active region's text. The single most-asked question between turns becomes a tool call. -**** TODO [#B] Dirvish / Dired tools :feature: +***** TODO [#B] Dirvish / Dired tools :feature: Read marked files, sort state, and filter state from a Dired or Dirvish buffer. Lets the agent operate on "the files I just marked" rather than "files in this directory" -- a real distinction in any review or refactor workflow. -**** TODO [#B] Vterm session tools :feature: +***** TODO [#B] Vterm session tools :feature: Recent command output from a named vterm session; scroll-history search. Pairs naturally with the =ai-vterm= design: the agent running in one project's vterm can read another project's vterm without leaving the chat. -**** TODO [#B] Eshell session tools :feature: +***** TODO [#B] Eshell session tools :feature: Same shape as the vterm tools for =eshell= sessions -- last-command output, history search, current directory. Most useful for agent-driven inspection of long-running pipelines. -*** TODO [#B] Filesystem Related Tools +**** TODO [#B] Filesystem Related Tools Affordances that let the agent operate on actual files on disk and run common CLI utilities -- pandoc, ffmpeg, imagemagick, ripgrep, @@ -3485,7 +2625,7 @@ Adjacent categories: the existing =gptel-tools/= file CRUD =list_directory_files=, =move_to_trash=) is the foundation this category extends. =web_fetch= is the network-fetch counterpart. -**** TODO [#B] Document conversion (pandoc) :feature: +***** TODO [#B] Document conversion (pandoc) :feature: Convert between markdown, org, html, pdf, docx, latex, epub, plain text. Most common use: "extract this docx to markdown so I can @@ -3494,7 +2634,7 @@ output path. Reject =--filter= and =--lua-filter= (arbitrary code execution). Output written to a sandbox dir unless explicit override. -**** TODO [#B] Image manipulation (imagemagick) :feature: +***** TODO [#B] Image manipulation (imagemagick) :feature: Resize, format-convert, get-metadata (=identify=), optionally crop / rotate / annotate. Common use: "resize this PNG to a thumbnail" or @@ -3504,7 +2644,7 @@ MVG CVE surface) unless explicitly enabled. ImageMagick's =policy.xml= is the underlying defense; the wrapper enforces it at the tool boundary too. -**** TODO [#B] Audio / video processing (ffmpeg) :feature: +***** TODO [#B] Audio / video processing (ffmpeg) :feature: Trim, transcode, extract audio, get-metadata (=ffprobe=). Paths under HOME only; reject network-protocol inputs (=http:= / =rtmp:= @@ -3512,7 +2652,7 @@ under HOME only; reject network-protocol inputs (=http:= / =rtmp:= with the existing transcription module -- the same "extract audio from video" path =cj/transcribe-media= uses internally. -**** TODO [#B] Content search (ripgrep) :feature: +***** TODO [#B] Content search (ripgrep) :feature: =rg= wrapper with path / glob filtering, result-count cap, optional literal-vs-regex mode. Pure read. Was in the shortlist's ADOPT @@ -3520,21 +2660,21 @@ bucket as =search_in_files=. Highest-leverage filesystem tool by expected call frequency -- "where in this repo is X" is the question I paste agent output for most often. -**** TODO [#B] File discovery (fd) :feature: +***** TODO [#B] File discovery (fd) :feature: =fd= (or =find= fallback) wrapper, capped result count. Pure read, lower stakes than =search_in_files= (filenames only, no content). Common pairing: =find_file_by_name= then =read_text_file=. -**** TODO [#B] Metadata extraction (file / exiftool) :feature: +***** TODO [#B] Metadata extraction (file / exiftool) :feature: =file= for MIME-type detection; =exiftool= for image / video / audio metadata. Lets the agent answer "what is this file" or "when was this photo taken" without me opening external tools. Pure read. -**** TODO [#B] Structured data processing (jq / yq) :feature: +***** TODO [#B] Structured data processing (jq / yq) :feature: =jq= for JSON, =yq= for YAML / TOML. Filter / project / transform structured data into a smaller, more focused view before reading. @@ -3542,7 +2682,7 @@ Strictly read-only -- output goes to the chat, not to disk. The agent often wants "the third element of .results" from a JSON file and this is much cheaper than pasting the whole thing. -**** TODO [#B] Eshell command submission :feature: +***** TODO [#B] Eshell command submission :feature: Submit a single eshell command line, return output (capped). =:confirm t= always -- this is the escape hatch where the @@ -3551,90 +2691,494 @@ my eyeball. Eshell parses in-process (no /bin/sh fork) so the security surface is narrower than a shell command runner, but it's still effectively arbitrary execution -- treat it as such. -*** TODO [#B] Media and Reading Related Tools +**** TODO [#B] Media and Reading Related Tools Affordances over non-code content: feeds, PDFs, EPUBs, music. The agent's job here is summarize / extract / queue, not produce. -**** TODO [#B] Elfeed entry tools :feature: +***** TODO [#B] Elfeed entry tools :feature: Read entry body; list unread by feed or tag; mark read after a summary lands in a roam node or inbox. Enables "give me the non-noise headlines from this week's feeds" flows. -**** TODO [#B] PDF and EPUB text tools :feature: +***** TODO [#B] PDF and EPUB text tools :feature: Extract plain text from a PDF page or page range (via =pdftotext=) and from an EPUB (via the existing nov-mode pipeline). Lets the agent summarize / quote a research paper or book chapter without me pasting passages. -**** TODO [#B] EMMS playback and queue tools :feature: +***** TODO [#B] EMMS playback and queue tools :feature: Current track, queue contents, playback state; queue or play a path; compose a playlist from a prompt ("play something focusing that's not Nick Cave"). Light tools, but a frequent friction point. -*** TODO [#B] Development Workflow Related Tools +**** TODO [#B] Development Workflow Related Tools Affordances over the dev loop: compilation output, test invocation, coverage / profile data, flycheck / flymake diagnostics. -**** TODO [#B] Compilation buffer tools :feature: +***** TODO [#B] Compilation buffer tools :feature: Read the most recent =compile= buffer output; parse error locations to =file:line=; summarize what broke. Pairs with the F6 test-runner flow -- "tell me what's failing" becomes a single agent turn instead of paste + parse. -**** TODO [#B] Project test invocation tools :feature: +***** TODO [#B] Project test invocation tools :feature: Run =make test-file FILE=X= / =make test-name TEST=Y= / project-equivalent and return results. Currently each agent guesses the project convention; expose the canonical invocation explicitly per project so the agent can run focused tests itself. -**** TODO [#B] Coverage and profile tools :feature: +***** TODO [#B] Coverage and profile tools :feature: Read the most recent SimpleCov JSON or profile dump. Lets the agent answer "what's still uncovered after this push" or "what function dominates startup time" against real measured data. -**** TODO [#B] Diagnostic tools (flycheck / flymake) :feature: +***** TODO [#B] Diagnostic tools (flycheck / flymake) :feature: Surface current-buffer or project-wide errors and warnings. Useful both as a "what's broken right now" check and as input to the patch-narrative buffer / commit-intent workbench above. -** TODO [#C] Review and rebind M-S- keybindings :refactor: +**** TODO [#B] gptel-magit activation fails on velox :bug:quick: :PROPERTIES: :LAST_REVIEWED: 2026-06-01 :END: +Surfaced 2026-05-25 while diagnosing an unrelated load failure over SSH. velox-specific — the workstation has a current gptel and does not show it. -Changed from M-uppercase to M-S-lowercase for terminal compatibility. -These may override useful defaults - review and pick better bindings: -- M-S-b calibredb (was overriding backward-word) -- M-S-c time-zones (was overriding capitalize-word) -- M-S-d dwim-shell-menu (was overriding kill-word) -- M-S-e eww (was overriding forward-sentence) -- M-S-f fontaine (was overriding forward-word) -- M-S-h split-below -- M-S-i edit-indirect -- M-S-k show-kill-ring (was overriding kill-sentence) -- M-S-l switch-themes (was overriding downcase-word) -- M-S-m kill-all-buffers -- M-S-o kill-other-window -- M-S-r elfeed -- M-S-s window-swap -- M-S-t toggle-split (was overriding transpose-words) -- M-S-u winner-undo (was overriding upcase-word) -- M-S-v split-right (was overriding scroll-down) -- M-S-w wttrin (was overriding kill-ring-save) -- M-S-y yank-media (was overriding yank-pop) -- M-S-z undo-kill-buffer (was overriding zap-to-char) +At startup (and reproducibly in batch) velox logs: "Unable to activate package `gptel-magit'. Required package `gptel-0.9.8' is unavailable." gptel-magit depends on gptel >= 0.9.8 and velox's installed gptel is older or missing, so it can't activate. A startup warning, not a blocker. + +Reproduce: +: emacs --batch --no-site-file -L . -L modules --eval "(package-initialize)" --eval "(message \"done\")" 2>&1 | grep -i gptel + +Next step: check the installed gptel version (=(assq 'gptel package-alist)= or =M-x package-list-packages=), update gptel to >= 0.9.8, then re-evaluate gptel-magit activation. If gptel was pinned/held on velox, reconcile the pin against the gptel-magit dependency. + +** PROJECT [#C] Music Open Work +Parent grouping the open music / EMMS issues; close each child independently. +*** VERIFY [#C] music: extract faces for music config :refactor:quick:solo:next: +Needs from Craig: this is theme-side work, not a config edit — the music-config faces were already stripped (2026-06-14), so "extracting" them means DEFINING them in the theme (theme-studio JSON / build-theme) for playlist name, status, the per-button on/off pair, per-key symbol+text, and other labels. That needs the actual color choices and which theme(s) to add them to. Give me the palette intent (or say "pick sensible defaults in WIP") and I'll add the face definitions. +Pull the music-config faces out to the theme (the config no longer defines faces directly): playlist name, status (paused, etc.), two mode colors per "button" (on vs off), a per-key symbol+text color, and a color for all other labels. Pairs with the 2026-06-14 face-stripping work (music-config faces were removed there and are currently undefined until the theme defines them). From the roam inbox 2026-06-15. +*** TODO [#C] music: show song information in the modeline :feature: +Show basic song information in the modeline, with streaming-source support too. Write a spec for this one first. From the roam inbox 2026-06-15. +*** TODO [#C] Internet radio now-playing song :feature: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-11 +:END: +Show the currently-playing song while streaming an internet radio station. Lives in =modules/music-config.el= (EMMS + MPV backend, M3U radio stations). The track title comes from the stream's ICY metadata — EMMS exposes it via =emms-track-description= / =emms-playing-time= and updates it on the metadata-change hook; MPV reports the ICY title too. Add an option to show the song in the minibuffer (e.g. echo on track change, or an on-demand command). Consider also a mode-line indicator as a second surface. + +*** VERIFY [#C] music-config option-combination audit + tests :test:next: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-06 +:END: +Deferred from the batch — this is a sizable test-writing audit (pairwise option combinations + new ERT coverage for music-config), better as its own focused /add-tests or /pairwise-tests session than crammed into a bug-fix sweep. No blocker; say the word and I'll run /pairwise-tests over the option space. + +Two-part task surfaced 2026-05-28 during the Signel verify walk — generalized from the "are there combinations of options that we'd want to disallow together" question. + +Part 1 — enumerate the configurable option surface of =modules/music-config.el=: every =defcustom=, every behavior toggle, every backend-selection variable, every cross-cutting flag (auto-play, repeat, shuffle, follow-cursor, side-window-height-fraction, etc.). Audit each option for valid value ranges. Capture the matrix in =docs/design/music-config-options.org= (or inline in the test file's header — judgment call when the matrix lands). + +Part 2 — combinatorial test coverage. Use the =/pairwise-tests= skill: identify parameters, value partitions, and inter-parameter constraints, build a PICT model, generate the minimal test matrix that hits every 2-way combination. For each problematic combination the matrix surfaces, decide: (a) validate at config-load time with a =user-error= that names the conflict, (b) runtime guard in the affected command, or (c) doc-only warning in the option's docstring. Disallow only the genuinely-broken pairs; doc-warn the merely-confusing ones. + +The recent F10 side-window-height-fraction work and the EMMS-free refactor candidate ("Implement EMMS-free music-config architecture" above) are both natural near-term touchpoints — best to land this audit before the EMMS swap so the new architecture inherits a clean option spec. -** TODO [#C] Build cj/dev-setup-project helper (per docs/design/dev-setup-project.org) :feature: +*** TODO [#C] Implement EMMS-free music-config architecture :refactor: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-01 +:END: +**** 2026-05-15 Fri @ 19:17:01 -0500 Specification +Implement the design in [[id:423bc355-18d3-4e39-9e7a-f768b865d95b][Design: music-config Without EMMS]]. + +The implementation should make =music-config.el= load without EMMS, introduce +package-owned playlist and track state, add a =cj/music-playlist-mode= view, +and route playback through a small backend protocol with an initial =mpv= +backend. Preserve the current F10 and =C-; m= user workflows where practical, +and keep M3U load/save/edit/reload plus radio station creation working. + +Complexity estimate: high. This is a module rewrite with a new internal data +model, package-owned playlist mode, backend protocol, mpv process management, +and migration of existing EMMS-backed commands/tests. + +Time estimate: 2-4 focused days for an EMMS-free v1 with play/stop/next/previous, +M3U persistence, playlist UI, and focused tests. Add another 1-2 days if v1 +must include full mpv IPC support for pause, seek, and volume parity. + +Acceptance checks: +- =music-config.el= can be required in batch with no EMMS package installed. +- Existing focused music tests pass without EMMS preload or EMMS stubs except + where a compatibility adapter is explicitly under test. +- New tests cover playlist state, backend command dispatch, M3U persistence, + and the EMMS-free load smoke path. + +**** TODO [#B] Pure helpers + state structs extraction :refactor: +Lift EMMS-free pure code into standalone form: file validation, recursive +collection, M3U parse/write, safe filenames, radio-station content, and +URL/file track typing. Introduce =cj/music-track= and =cj/music-playlist= +cl-structs plus state-mutation helpers (=cj/music-playlist-*= predicates and +setters). Files: =modules/music-config.el=, possibly a new +=modules/music-state.el= split. Existing pure-helper tests should pass +unchanged. + +Acceptance: structs defined, helpers callable in batch without EMMS loaded. + +Depends on: none (start here). + +**** TODO [#B] Backend protocol + fake test backend :refactor:test: +Define the backend plist contract (=:available-p :play :pause :resume :stop +:seek :volume :status :metadata=) and =cj/music-current-backend=. Add +=cj/music-state-change-functions= abnormal hook with the v1 event set +(=started=, =paused=, =resumed=, =stopped=, =finished=, =error=, +=playlist-changed=, =mode-changed=). Create =tests/testutil-music-backend.el= +exposing =cj/test-music-fake-backend= with an event ledger. + +Acceptance: fake backend installable in tests; ordered-event assertions work +against a no-op playback flow. + +Depends on: pure helpers + state structs. + +**** TODO [#B] Read-side state API + characterization tests :test:refactor: +Implement =cj/music-playing-p=, =cj/music-paused-p=, =cj/music-current-track=, +=cj/music-playlist-state=, =cj/music-track-description=. Before rewriting +command bodies, add characterization tests against current behavior for +=cj/music-next=, =cj/music-previous=, =cj/music-toggle-consume=, +=cj/music-playlist-toggle=, =cj/music-playlist-load=, =cj/music-playlist-clear= +so the migration has a safety net. + +Acceptance: read-side helpers covered; characterization tests green against +the current EMMS-backed implementation. + +Depends on: backend protocol + fake test backend. + +**** TODO [#B] Playlist major mode + render-from-state :feature: +Add =cj/music-playlist-mode= rendering the buffer as a view over +=cj/music-current-playlist=. Selected-track overlay + face, header reads +package state, full keymap from design Section "Playlist Buffer" (RET/p, SPC, +s, >/<, f/b, +/=/-, a, A, c/C, L/S/E/g, r/t/z/x, Z, i, o, q, S-up/down). +Preserve the active-window background highlight. + +Acceptance: opening the playlist renders package state; reorder/shuffle/clear +go through state mutations and re-render; tests cover header + overlay +positioning. + +Depends on: read-side state API. + +**** TODO [#B] mpv backend implementation :feature: +Implement =cj/music-mpv-*= backend functions. Phase the work per migration +plan §5: (a) process spawn, UID/PID-stamped socket under +=temporary-file-directory=, stale-socket sweep, IPC connect via +=make-network-process :family 'local=, state-hook plumbing. (b) play/stop/ +next/previous + finished-track auto-advance with deliberate-stop tracking. +(c) pause/resume, seek, volume over JSON IPC. (d) metadata read on track +start. Add =cj/music-doctor= reporting platform capabilities; ship Windows +degraded mode (play/stop/next/previous only via stdin/=call-process=). + +Acceptance: integration tests tagged =:slow= and skipped when =mpv= not on +PATH; on Linux/macOS pause/seek/volume parity works; clean socket lifecycle +across Emacs restart and exit. + +Depends on: backend protocol + fake test backend. + +**** TODO [#B] Command + Dired/Dirvish rewire :refactor: +Migrate user-facing commands (=cj/music-play=, =cj/music-pause=, +=cj/music-stop=, =cj/music-next=, =cj/music-previous=, seek/volume, +random/repeat/consume/shuffle toggles) to operate on package state and call +=cj/music-current-backend=. Update Dired/Dirvish =+= add routing, +M3U load/save/edit/reload, radio-station creation, F10 toggle, and =C-; m= +keymap entries to drop EMMS symbols. Migrate command-flow tests to the fake +backend. + +Acceptance: full keymap functional end-to-end against the fake backend; +characterization tests still green; Dirvish =+= add path covered. + +Depends on: playlist major mode + mpv backend. + +**** TODO [#B] EMMS removal + parity walk :test: +Remove =cj/emms--setup=, the on-demand EMMS loader, and the =use-package emms= +block. Add the EMMS-free batch-load smoke test (=music-config.el= requires +clean without EMMS installed). Run the 22-step parity walk from design +§"Parity Walk" against the new implementation; record measurements against +the performance budget (1000-track load <500ms, reorder <50ms, IPC dispatch +<100ms, header refresh <16ms) and note any deviations. + +Acceptance: =init.el= loads cleanly without EMMS; =make test= passes; parity +walk recorded as a completion log entry under the parent task. + +Depends on: command + Dired/Dirvish rewire. + +** PROJECT [#C] Calibre Open Work +:PROPERTIES: +:LAST_REVIEWED: 2026-06-06 +:END: +Parent grouping the open Calibre / ebook-workflow issues; close each child independently. The EPUB reading-width tasks were already resolved (2026-05-12/14). + +*** 2026-06-12 Fri @ 07:34:05 -0500 Calibre bookmark naming ships "Author, Title" from the filename +When I hit m in calibre, I'm making my place in the book with a bookmark. +While sometimes, the books look fine: "The A.B.C. Murders - Agatha Christie.epub" +Sometimes they look not so good: Engines of Logic_ Mathematicians and the O - Martin Davis.pdf or Software Architecture_ The Hard Parts _ Mo - Neal Ford.pdf + +What I would like to do is to have the bookmarks be saved in the following format: + +Author, Title [no extension]. Underscores should be stripped. + +Root cause: in a nov buffer =m= is =bookmark-set= (rebound at calibredb-epub-config.el:311); nov's =nov-bookmark-make-record= names the record =(buffer-name)= -- the EPUB filename. + +Implemented 2026-06-06. Source decision: parse the *filename*, not the embedded EPUB metadata -- under Calibre's "<Title> - <Author>.epub" naming the filename is more complete (the embedded metadata had truncated titles, author-sort "Last, First" forms, and lost punctuation; see the separate metadata-cleanup task). A =:filter-return= advice on =nov-bookmark-make-record= rebuilds the name from the record's filename: split on the last " - " into title/author, restore the colon Calibre sanitized to "_ " (-> ": "), reorder to "Author, Title". Pure helpers =cj/--nov-clean-title= + =cj/--nov-bookmark-name-from-file= in =modules/calibredb-epub-config.el=; 10 ERT tests in =tests/test-calibredb-epub-config--bookmark-name.el=. Live in the daemon. + +Existing bookmarks: the 3 nov bookmarks in =~/sync/org/emacs_bookmarks= were renamed by hand (one-pass, in the daemon + saved; backup at =emacs_bookmarks.bak-2026-06-06=): "Edward Kanterian, Frege: A Guide for the Perplexed", "Agatha Christie, The A.B.C. Murders", "Edward Abbey, The Fool's Progress: An Honest Novel". + +Manual verify filed under the Manual testing and validation parent. + +*** 2026-06-12 Fri @ 07:34:05 -0500 Curated Calibre keybinding menu + docked description shipped +Relocated from the global capture inbox 2026-06-06. Want a discoverable set of keybindings (visible in which-key) for the most frequent calibredb workflows: +- Switch to a library (e.g. Literature), sort by last name, scroll the list. +- Scope/filter the list in place, keeping the current library scope: + - by format (e.g. epubs only) + - by author last name (exact == or ^begins-with some text) + - sort by title, publication date, or group by format +- One key pops up the selected book's description in a bottom-30% buffer, dismissed with q (same display pattern as the signel chat dock). +- RET opens the book in the appropriate viewer. +Survey finding 2026-06-06: calibredb already binds almost all of this in calibredb-search-mode-map (S/L library, g filter [f format, a author, t tag, d date], o sort [t title, a author, p pubdate, f format], RET open) and even ships transient menus (? = calibredb-dispatch, g, o). The real problem was discoverability -- they are top-level single keys (which-key never pops up) and Craig didn't know ? opened a menu. calibredb-quick-look is macOS-only; the detail view (v -> *calibredb-entry*, q quits) is the description but opens full-window. + +Implemented 2026-06-06 in =modules/calibredb-epub-config.el=: +- A curated transient =cj/calibredb-menu= (library switch; filter format/author/reset; sort author/title/pubdate/format; open; describe; H = full calibredb-dispatch) bound to =?= in calibredb-search-mode-map. calibredb's own full dispatch moved to =H=. Defined in the use-package =:config= (needs the elpa transient, which batch doesn't load) -- the "? brings up a curated help menu" convention. +- Bottom-30% description dock: =calibredb-show-entry-switch= -> =pop-to-buffer= + a =display-buffer-alist= rule for =*calibredb-entry*= (display-buffer-at-bottom, height 0.3); =cj/calibredb-describe-at-point= shows the entry without switching focus so q dismisses it. Same pattern as the signel chat dock. +1 ERT test (the describe command; the transient/bindings/dock need the elpa transient + live calibredb, verified in the daemon). Author "begins-with" is covered well enough by g a's completing-read over "Last, First"; a true regex filter was not built. Manual verify filed under the Manual testing and validation parent. + +*** TODO Embed Calibre DB metadata into the EPUB files +Surfaced 2026-06-06 while building the bookmark naming: the metadata embedded in the EPUB files' OPF is worse than Calibre's database metadata. nov reads the embedded OPF and got truncated titles ("Frege" vs the filename's "Frege: A Guide for the Perplexed"), author-sort "Last, First" forms ("Christie, Agatha"), and lost punctuation ("A.B.C." -> "A B C"). The filenames (from Calibre's curated DB) are the good copy. Fix on the Calibre side: select all (or by library), run "Edit metadata -> Embed metadata into book files" so the DB metadata is written into each EPUB's OPF. Consider auditing author vs author_sort first. After embedding, the in-file metadata matches the library and any tool reading the files (nov, other readers, re-imports) gets the good data. Not an Emacs task; Calibre-side bulk maintenance. + +** PROJECT [#C] 2026-06 full config audit — findings backlog :refactor: +Module-by-module review of all 121 modules + init/early-init, holistic passes (startup/perf, stability, UX consistency, package strategy), and spin-offs into pearl, chime, emacs-wttrin. Method: parallel read-only review agents per module group; key claims spot-verified (incl. against the live daemon) before filing. Run 2026-06-11/12, COMPLETE. Tally: ~165 module findings + ~40 holistic + 30 spin-off ≈ 235 total; 40 high-impact bugs filed as standalone tasks above this parent; the rest live in the group children below. Spin-off findings delivered as inbox handoffs to pearl, chime, and emacs-wttrin (2026-06-12-0057). Start with the synthesis child below for the recommended attack order. + +*** Synthesis: the overall picture and attack order +Six cross-cutting themes, then the order I'd work them. + +Themes: +1. Performance has one systemic lever, not many small ones: native-comp is accidentally OFF config-wide and GC sits at the stock 800KB ([#A] task). Daemon init itself is healthy (1.11s measured). Fix the lever before any micro-deferral work, and before burning time on the org-capture-perf debug. +2. A "dangerous defaults" safety cluster: yes-or-no-p fset (single-keystroke shutdown/file-destruction), the silently-failing Wayland lock screen, erc-yank's public gists, mu4e's broken trash/refile on the primary account. All four are [#A]/[#B] standalones; do these first — they're where the config can actually hurt you. +3. Calendar/agenda data correctness: calendar-sync's RFC trio (vanishing final occurrences, resurrected cancelled meetings, collapsed multi-day events) + agenda sources missing roam Projects. Meetings are missed over this. +4. Recurring mechanical defect classes worth sweeping as one commit each, config-wide: use-package :hook "-hook" suffix trap (org-babel, eshell, latex); eval-when-compile-only requires read at runtime (auth-config, keyboard-macros, erc-config); M-S-<letter> bindings vs uppercase events (4 dead keys + 1 asymmetry); raw C-; entries bypassing cj/register-prefix-map (8 modules); unreachable modules (prog-lsp, ledger-config, show-kill-ring, mu4e-org-contacts-setup); config for package versions long gone (mu4e 1.7 block, dashboard override, org timeline, checkdoc-arguments). +5. The test suite has a blind-spot class: characterization tests asserting BROKEN output (reverse-lines, heavy-box, undo-kill's explicit 0), unit tests hand-building data that hides integration mismatches (F7 coverage paths), and an integration gate that prints green over "Ran 0 tests" (chime). When fixing any standalone bug above, fix its test to assert correct behavior — and consider extending the architecture smoke test to mechanically pin the class-4 sweeps (hooks must be bound after load, no raw C-; binds, no M-S-<letter> specs, no eval-when-compile requires of runtime vars). +6. Consistency wants conventions, not patches: one notification facade (cj/notify — messenger spec addendum already covers the messenger half), one confirmation tier (the fset fix), one prefix-registration mechanism with labels, one buffer-naming shape. The messenger-unification registry mindset generalizes. + +Attack order: (a) the three [#A]s + gptel-shadow (it's blocking the filed gptel-magit investigation); (b) the daily-data pair — mail trash/refile + calendar RFC trio; (c) the :quick:solo: standalone sweep — roughly 20 one-to-five-line fixes, a satisfying solo batch; (d) the class-4 mechanical sweeps, one commit per class, each with its smoke-test guard; (e) the consistency conventions, opportunistically as those modules get touched. + +*** TODO Findings: foundation/system group +From agents 2026-06-11; spot-verified sample. Remaining findings beyond the standalone bug tasks: +- [BUG] =keyboard-compat.el:121= — terminal arrow-key fix runs once on emacs-startup-hook; =input-decode-map= is terminal-local, so =emacsclient -t= frames under the daemon never get it. Register on =tty-setup-hook= (GUI half already uses =server-after-make-frame-hook=). +- [BUG] =config-utilities.el:142= — =cj/recompile-emacs-home=: =(boundp 'native-compile-async)= is always nil (it's a function — needs =fboundp=), so native compilation is never selected; and the helper deletes =<dir>/eln= when the real cache is =eln-cache/= (derive from =native-comp-eln-load-path=). Extend the existing test. +- [BUG] =system-utils.el:94= — success message args swapped: prints "Running notes.txt on mpv...". Trivial; wired into dirvish (O) and calibredb so it shows regularly. +- [REMOVE] =local-repository.el:51= — =localrepo-initialize=, its three defcustoms, and unprefixed =car-member= are dead; early-init owns archive setup with its own divergent path constant. Shrink to =cj/update-localrepo-repository= pointed at early-init's =localrepo-location=. +- [REMOVE] =keybindings.el:146-147= — C-x C-f unset/reset is a no-op (already find-file); comment wrong. Delete or retarget. +- [COVERAGE] =local-repository.el= — only module in the group with no test file. + +*** TODO Findings: UI core group +From agents 2026-06-11; spot-verified sample. Remaining findings beyond the standalone bug tasks: +- [BUG] =font-config.el:262= — emojify =:defer 1= means :config runs before any daemon GUI frame exists; =env-gui-p= picks ='unicode= permanently, GUI frames never get image emojis. Compute per-frame (=server-after-make-frame-hook=) or test =(daemonp)=. +- [BUG] =font-config.el:283= — =cj/display-available-fonts= errors on second invocation: first call's =special-mode= sets read-only; next call's erase/insert signals. Wrap in =inhibit-read-only=. (Also [COVERAGE]: untested — a call-twice test catches it.) +- [UX] =undead-buffers.el:82= — =cj/kill-other-window= in a single-window frame kills the buffer you're looking at (other-window no-ops; only delete-window is guarded). Add the sibling's =(user-error "No other window")= guard. +- [UX] =undead-buffers.el:48= — C-u C-x k silently marks a buffer undead (then it refuses to die with no explanation later). Undocumented mode-switch inside a core-command remap; document or split into its own command. +- [ENHANCE] =ui-theme.el:87= — theme persistence silently fails on a fresh machine until =persist/= exists; =make-directory= before the writability check. +- [REMOVE] =dashboard-config.el:32-58= — =dashboard-insert-bookmarks= override is dead code: the :demand t require lets upstream dashboard-widgets.el redefine it; behavior survives only because upstream natively honors the settings now. Delete. +- [REMOVE] =font-config.el:199-220= — all-the-icons stack (2 =:demand t= packages + unprompted network font install on fresh machines) likely redundant with nerd-icons everywhere; verify keyboard-compat's reference then drop. +- [REMOVE] =ui-config.el:185= — duplicate =(use-package nerd-icons :defer t)= stanza; nerd-icons-config owns it. Delete stanza + stale Commentary bullet. + +*** TODO Findings: buffer/window libs group +From agents 2026-06-11; spot-verified sample. Remaining findings beyond the standalone bug tasks: +- [REMOVE] =show-kill-ring.el= — loaded by nothing (init require deliberately removed in b785a19d), so its M-S-k binding is dead; =keyboard-compat.el:177= still installs the M-K → M-S-k translation whose only purpose was this module. Re-add or delete module + stale translation/comment (consult-yank-pop largely supersedes it). +- [UX] =selection-framework.el:38= — =vertico-sort-function= custom is dead config: =vertico-prescient-mode= (line 250) replaces sorting when it activates. Pick one policy (drop the custom, or =vertico-prescient-enable-sorting nil=). +- [BUG] =custom-buffer-file.el:486= — =cj/view-email-in-buffer= leaks MIME handles when no displayable part: =user-error= fires before =mm-destroy-parts=. unwind-protect. +- [ENHANCE] =custom-buffer-file.el:49= — eager =(require 'mm-decode)= at startup only for macro expansion; runtime require already exists at line 481. Make it =eval-when-compile=. +- [UX] =custom-buffer-file.el:221= — =cj/copy-link-to-buffer-file= is a silent no-op in non-file buffers while siblings signal =user-error=. Match them. + +*** TODO Findings: editing helpers group +From agents 2026-06-11; spot-verified sample (jump-paren, sortable-time confirmed). Beyond the standalone heavy-box task: +- [BUG] =custom-misc.el:48= — jump-to-matching-paren with point ON a closer lands at the last inner sexp, not the opener (batch-verified). =(forward-char)= before =(backward-sexp)= in the char-after-closer case; the test only covers the after-closer position. +- [BUG] =custom-datetime.el:71= — "sortable" time format is 12-hour ="%I:%M:%S %p %Z"= — "01:00:00 PM" sorts before "09:00:00 AM". Should be ="%H:%M:%S"=. +- [BUG] =custom-comments.el:82= — =cj/comment-reformat= prints "No region was selected" even on success (message outside the if-else), and the fill-column shrink/restore isn't unwind-protected — an error leaves fill-column permanently -3. Use let-binding + =user-error=; also =mark-active= vs the config's usual =use-region-p=. +- [BUG] =custom-line-paragraph.el:52= — join-line-or-region without region inserts a spurious blank line mid-buffer (verified); only insert the newline at eobp. +- [BUG] =custom-line-paragraph.el:77= — duplicate-line-or-region splits a mid-line-ending region via open-line and duplicates an extra empty line when the region ends at bol. Normalize bounds to whole lines. +- [BUG] =custom-ordering.el:158= — reverse-lines and number-lines mishandle the trailing newline ("a\nb\n" → "\nb\na"); the trailing-newline test asserts the broken output. =cj/--arrayify= (line 43) has the correct pattern — apply it; fix the characterization test. +- [BUG] =custom-comments.el:152= — inline-border lines come out 2 chars short for even-length or empty text (parity computed from text length instead of remaining width); stacked dividers misalign. +- [UX] =custom-text-enclose.el:216= — indent-lines =(interactive "p\nP")= couples COUNT and USE-TABS to one prefix arg — multi-column space indent is impossible interactively; docstrings claim "default 4" but "p" defaults to 1 (same in dedent :256). +- [REMOVE] =custom-ordering.el:90= — =cj/arrayify-python= is byte-identical to =cj/arrayify-json= (two bindings, same output). Delete one or differentiate (single quotes for Python). +- [UX] =custom-case.el:66= — title-case contradicts its docstring: "is" is in word-skip despite "linking verbs are major words"; no sentence-restart capitalization after periods; no capitalize-last-word rule. Align list + docstring. + +*** TODO Findings: text/prose tools group +From agents 2026-06-11. Beyond the standalone markdown/latex tasks: +- [BUG] =text-config.el:72= — "M-S-i" for edit-indirect-region is unreachable: Meta+Shift+i generates the event M-I, not M-S-i, so the keypress falls back to M-i tab-to-tab-stop. Rebind as "M-I" (the "was M-I" comment thought the rename was a no-op; it wasn't). +- [BUG] =keyboard-macros.el:46= — user-constants required only =eval-when-compile= but =macros-file= is read at runtime; works only because init.el loads user-constants first. Plain require (same trap as auth-config). +- [BUG] =keyboard-macros.el:137= — kill-emacs-hook fires =y-or-n-p= + an interactive name prompt whenever any last-kbd-macro exists — hazardous for daemon/systemd shutdown (no one to answer) and noisy for throwaway macros. Guard =(and last-kbd-macro (not noninteractive))= minimum; consider dropping the prompt (M-F3 already persists named macros). +- [BUG] =lorem-optimum.el:221= — empty Markov chain (missing assets/liber-primus.txt) makes =cj/lipsum-insert= do =(insert nil)= — cryptic wrong-type error far from cause. Signal =user-error= naming the fix; also Commentary advertises "M-x cj/lipsum" but it has no interactive spec. +- [UX] =flyspell-and-abbrev.el:230= — every C-' press re-runs =flyspell-buffer= over the whole buffer while flyspell-mode is off (the documented word-by-word workflow = O(buffer) per keypress in large files). Call =cj/flyspell-on-for-buffer-type= so the mode sticks and the scan runs once. +- [ENHANCE] =text-config.el:121= — accent is wired to the company backend (=accent-company=); the filed Company→Corfu migration task doesn't list it, so C-` breaks silently post-migration. Add to the migration scope or switch to =accent-menu= now. + +*** TODO Findings: org core group +From agents 2026-06-11; spot-verified sample (dailies head, babel hook, void bindings confirmed). Beyond the standalone tasks: +- [BUG] =org-babel-config.el:27= — =:hook (org-babel-after-execute-hook . org-redisplay-inline-images)= gets a second "-hook" appended (symbol unbound at expansion, doesn't end in -mode) → registers on nonexistent =org-babel-after-execute-hook-hook=; inline dot-graph images never refresh after C-c C-c. Write =(org-babel-after-execute . ...)= or add-hook in :config. +- [BUG] =org-roam-config.el:67,71= — C-c n p / C-c n w bound (and which-key-labeled) to =cj/org-roam-find-node-project= / =-webclip=, defined nowhere — keypress errors "autoloading failed to define function". Define via =cj/org-roam-find-node= (a project template exists) or drop bindings + labels. +- [BUG] =org-export-config.el:74-81= — ox-texinfo block can never run (=:defer t=, no trigger, excluded from line-47 dolist and =org-export-backends=); commentary still advertises Texinfo. Add to the dolist or delete; also commentary says "subtree default scope" vs actual ='buffer= (line 61). +- [UX] =org-roam-config.el:50-63= — two parallel template dirs drift: :custom templates read =~/.emacs.d/org-roam-templates/= while find-node-topic/recipe read =roam-dir/templates/= — overlapping recipe/topic/v2mom files, edits don't propagate. Pick one canonical dir. +- [REMOVE] =org-agenda-config.el:84= — dead =timeline= entry in org-agenda-prefix-format (removed in org 9.1). Also =org-config.el:47-48= — the TASK note claiming =org-indent-indentation-per-level= "doesn't exist" is wrong (real org-indent defcustom); restore the setq or fix the comment. +- [REMOVE] =org-babel-config.el:161= — =org-html-footnote-separator= is an ox-html setting parked in the babel module with a wrong comment; =org-roam-config.el:76= similarly hides =org-agenda-timegrid-use-ampm= in roam's :config (only takes effect after roam loads). Move both to their owning modules. +- [REMOVE] =org-roam-config.el:363-390= — 28-line commented consult-org-roam block on a TASK comment; its proposed C-c n l / C-c n r now collide with live bindings, so it can't ship as written. Decide + delete (git keeps the draft). +- [COVERAGE] =org-agenda-config.el:423= cj/add-timestamp-to-org-entry (defvar-inside-defun smell), =org-roam-config.el:115,185= node-insert-immediate + finalize-hook — untested. + +*** TODO Findings: org apps + calendar-sync group +From agents 2026-06-11/12; spot-verified sample (UNTIL comparisons, EXDATE regex, drill setq confirmed). Beyond the standalone tasks: +- [BUG] =org-reveal-config.el:241= — seven raw =global-set-key= "C-; p ..." calls carry a hidden load-order dependency on keybindings.el (signals "non-prefix key" otherwise); every sibling uses =defvar-keymap= + =cj/register-prefix-map=. Convert. +- [BUG] =org-drill-config.el:131= — =:load-path "~/code/org-drill"= dev checkout breaks drill on machines without it (velox already diverges per the gptel-magit task). Guard with =file-directory-p= fallback to :vc. +- [UX] =org-contacts-config.el:146= — =cj/org-contacts-find= visits the file BEFORE prompting (C-g strands you at point-min) and plain =search-forward= can match body text in another entry. Collect heading positions in org-map-entries, goto after prompt. +- [REMOVE] =calendar-sync.el:1240= — =calendar-sync--fetch-ics= (buffer-string variant) is dead; the sync path uses the temp-file variant exclusively. 30 lines of duplicate curl/sentinel logic that will drift. +- [REMOVE] =org-webclipper.el:216-241= dead commented keymap blocks; =org-contacts-config.el:118-124= commented duplicate capture template flagged "TASK: duplicate?!?". Delete both (git keeps drafts). +- [COVERAGE] =calendar-sync.el:1274= — fetch sentinel branches (curl failure, temp-file cleanup, signal exit) untested; dispatch tests stub above this layer. + +*** TODO Findings: mail group +From agents 2026-06-12; spot-verified sample (cmail trash gap, no refile folders, gmail-first contexts confirmed). Beyond the standalone [#A] task: +- [BUG] =mail-config.el:392-407= — C-; e account nav lambdas call =mu4e-search=, not autoloaded — void-function before first mu4e launch. Add to :commands or require first. +- [BUG] =mail-config.el:481-484= — unconditional =org-msg-edit-mode= :after advice on replies defeats the =(reply-to-text . (text))= alternative at :459 and re-runs a major mode org-msg already set up. Gate or remove. +- [BUG] =mu4e-attachments.el:222= — the *mu4e attachments* selection buffer saves through stale MIME handles if the view changed before s — errors or saves the wrong message's parts. Check =buffer-live-p= per handle at save. +- [BUG] =mail-config.el:329= — "save attachment" in =mu4e-headers-actions= can't work from headers (MIME vars are view-buffer-local, nil in headers-mode). Drop it there. +- [BUG] =mail-config.el:282-305= — HTML view block sets variables obsolete since mu4e 1.7 (installed 1.14.1): =mu4e-view-prefer-html=, =mu4e-html2text-command= (also set twice: 186, 285), =mu4e-view-show-images=, =mu4e-view-image-max-width=. The pandoc/w3m selection never runs; shr renders regardless. Delete the dead block (image/privacy reconciliation already filed separately). +- [BUG] =mail-config.el:45-49,80-89= — top-level =(defvar message-send-mail-function nil)= pre-empts message.el's defcustom default; with msmtp absent the fallback leaves it nil → "invalid function: nil" on first send. Explicit =smtpmail-send-it= fallback or descriptive user-error. +- [UX] =mail-config.el:171,196-199= — =pick-first= + gmail listed first makes gmail the startup context though cmail reads as primary everywhere else — quiet wrong-account hazard for the first compose. Reorder contexts. +- [REMOVE] =mu4e-org-contacts-setup.el= — unreachable (nothing requires it; mail-config calls activation directly) and its featurep gate would be nil at init anyway. Delete or fold its two setqs into mail-config. +- [REMOVE] =mail-config.el:208,232= — =mu4e-starred-folder= isn't a mu4e variable (invented, no effect); =:174= =mu4e-maildir= is the obsolete alias of root-maildir set on the previous line. Drop all three. +- [REMOVE] =mu4e-org-contacts-integration.el:158,171-172= — hook surgery on =mu4e--compose-setup-completion= is a no-op on mu4e 1.14 (called directly, not via hook; already gated by the var activation sets). Delete both hook calls. +- [COVERAGE] =mu4e-attachments.el:101-105= — mid-batch save-failure path and stale-handle scenario untested. + +*** TODO Findings: messengers group +From agents 2026-06-12. Beyond the standalone tasks; several feed the messenger-unification spec: +- [BUG] =signal-config.el:201= — contact cache docstring claims "cleared on signel-stop/restart"; nothing clears it (grep: fork never references it). Stale list after relink/reconnect. Advise =signel-stop= or clear on start. +- [BUG] =signal-config.el:298= — fetched-and-empty contact list is indistinguishable from cold cache (nil), so a zero-contact account re-runs the blocking fetch (up to fetch-timeout) on every C-; M m. Cache a sentinel. +- [UX] =slack-config.el:208= — =cj/slack-notify= lacks signel's hardening: no truncation (giant toasts), no sound gating, no notifications-notify fallback when the script is absent. Unification-relevant: extract a shared =cj/messenger-notify= (title prefix, truncation, sound flag, script-with-fallback) — noted in the unification spec. +- [ENHANCE] =telega-config.el:52= — telega has NO notification path (=telega-notifications-mode= not enabled); incoming Telegram messages invisible unless the buffer is on screen. Enable, or route through the shared notifier. Unification-relevant. +- [COVERAGE] — =cj/erc-join-channel-with-completion= (erc:148, four-way reconnect branching), =cj/erc-connected-servers= (would have caught the tautology), =cj/slack-notify= predicates, =cj/signel--ensure-started= branches — all untested. + +*** TODO Findings: programming group +From agents 2026-06-12; spot-verified sample (prog-lsp unreachable confirmed by grep). Beyond the standalone tasks: +- [BUG→FOLD] =prog-lsp.el= — the module is UNREACHABLE: nothing requires it, so its entire LSP policy (TRAMP guard, file-watch ignores, read-process-output-max, idle-delay 0.5) is dead while prog-general.el:388-416's older conflicting block wins (idle 0.1, lsp-ui-doc on). Fold this fact into the filed "Make prog-lsp.el the single owner of generic LSP policy" task — it doesn't currently record that prog-lsp never loads. +- [BUG] =flycheck-config.el:68-70= — =checkdoc-arguments= isn't a real variable (invented name + invented format); the intended checkdoc suppression has never worked. Use =flycheck-emacs-lisp-checkdoc-variables= or drop. +- [BUG] =prog-json.el:87-90= — C-c C-q → jq-interactively binding defers to eval-after-load of jq-mode, which nothing loads — dead key. Bind in =cj/json-setup= via local-set-key (jq-interactively IS autoloaded). +- [BUG] =prog-python.el:129-132= — lsp-pyright's :hook lambda calls =lsp-deferred= unguarded on the same hook as the guarded =cj/python-setup= — pyright-absent machines still get the LSP attach prompt the guard exists to prevent. Move the require into the guarded branch; delete the hook. +- [BUG] =prog-lisp.el:122-125= — =:after (flycheck package-lint)= waits for a manual M-x to load package-lint, so =flycheck-package-setup= effectively never runs. Hook on flycheck load + require inside. +- [UX] =prog-python.el:111-115=, =prog-go.el:111-114=, =prog-webdev.el:128-147= — setup hooks attach to ts-modes only (C/shell hook both variants); grammar-unavailable fallback to classic modes silently loses indent/keys/formatter/LSP. Add classic-mode hooks. +- [UX] =prog-webdev.el:165-173= — web-mode gets the format key but none of the promised setup (no company/flyspell/LSP in HTML buffers). Add to the setup hook or fix the Commentary. +- [ENHANCE] gopls, clangd, bash-language-server, shfmt, shellcheck lack the =cj/executable-find-or-warn= load-time warnings pyright/prettier have; prog-shell's =:if (executable-find ...)= evaluates once at startup and silently disables shfmt/flycheck setup forever. +- [REMOVE] =prog-training.el:36-37= — =(url-debug t)= turns on GLOBAL url.el debug logging once leetcode loads. Debugging leftover; delete. +- [REMOVE] =prog-webdev.el:85=, =prog-json.el:44=, =prog-yaml.el:39= — three byte-identical format-region helpers. Extract one shared tested helper (system-lib). + +*** TODO Findings: dev tooling group +From agents 2026-06-12; spot-verified sample. Beyond the standalone F7 task: +- [BUG] =vc-config.el:138-144= — =cj/goto-git-gutter-diff-hunks= (C-; v d) never did what it claims: consult-line over "^[+\\-]" matches source text, not gutter hunks. Build candidates from =git-gutter:diffinfos= or drop the binding (C-; v n/p covers it). +- [BUG] =dev-fkeys.el:116-122= — F4 compile+run one-shot hook installs on GLOBAL =compilation-finish-functions= before the prompt; C-g leaves it armed and the next unrelated compile triggers projectile-run-project. Use the buffer-local pattern the module already uses for cache-revert (same in =--f4-clean-rebuild-impl=:143). +- [BUG] =test-runner.el:84,222= — documented ~/.emacs.d/tests fallback doesn't exist (=cj/test-global-directory= defvar'd nil, never set); outside a project =(file-directory-p nil)= crashes in three commands. Initialize the defvar or guard with user-error. (Adds specifics to the open "Fix up test runner" task — fold.) +- [BUG] =test-runner.el:288= — focus-add prefix check lacks the trailing slash so =tests-scratch/= passes the "inside tests/" check; the correct helper =cj/test--file-in-directory-p= exists at :168 — use it. +- [BUG] =vc-config.el:217-219= — difftastic blame map binds D and S to the same command (show); D should be diff per the transient four lines down. +- [UX] =diff-config.el:37= — =ediff-diff-options "-w"= ignores ALL whitespace in every ediff session — indentation-only Python changes compare as identical. Drop the default; toggle per-session. +- [UX] =restclient-config.el:64-65= — raw global-set-key "C-; R n" hides a load-order dependency (header claims "Runtime requires: none"); use defvar-keymap + =cj/register-prefix-map= like siblings (same class as org-reveal, slack). +- [UX] =vc-config.el:196= — clipboard clone via synchronous =call-process= freezes every emacsclient frame for the whole clone. make-process + sentinel. +- [REMOVE] =vc-config.el:80-82= — phantom autoload =git-timemachine-show-selected-revision= (no such function in the package) appears in M-x and errors. Drop from :commands. +- [REMOVE] =httpd-config.el:19-30= — pointless =:defer 1= (impatient-mode loads simple-httpd on demand) + unprefixed eager globals =wwwdir=/=check-or-create-wwwdir= creating www/ on every startup. =:defer t=, prefix, or fold into markdown-config. +- [COVERAGE] — intersect/parse unit tests hand-build matching keys (the F7 bug's escape route); =--coverage-elisp-run='s compilation-finish wiring, goto-git-gutter-diff-hunks, timemachine candidate round-trip untested. F-key sweep clean: no collisions; F5 free for the debug-backend task. + +*** TODO Findings: shell/term/files group +From agents 2026-06-12; spot-verified sample (eshell nested list confirmed). Beyond the standalone tasks: +- [BUG] =dirvish-config.el:37= — =cj/xdg-open= attributed to system-utils in the require-comment but defined in external-open.el; neither dirvish-config nor dwim-shell-config (caller at :876) requires it — "Direct test load: yes" headers are false. Require external-open (or move the fn into external-open-lib) + fix comment. +- [UX] =tramp-config.el:73= — =revert-without-query '(".*")= kills revert confirmation for EVERY file in Emacs, buried in the TRAMP module. Scope to =tramp-file-name-regexp= or move deliberately to an editing module. +- [UX] =dirvish-config.el:403= — quick-access entries lx (~/archive/lectures), phl (~/projects/homelab), pn (~/projects/nextjob) point at directories that don't exist on this machine. Prune or create. +- [REMOVE] =dwim-shell-config.el:474,507= — open-externally (raw xdg-open) and open-file-manager (thunar/nautilus probe chain) duplicate cj/xdg-open (dirvish o) and cj/dirvish-open-file-manager-here (f); ascii-art references jp2a, the module's only absent binary. Delete the two duplicates; install jp2a or drop ascii-art. +- [REMOVE] =tramp-config.el:115= — custom =sshfast= method referenced nowhere (everything uses sshx); =tramp-own-remote-path= added twice (:39,:128); =dirtrack-list= and =magit-git-executable "/usr/bin/git"= are unrelated globals hiding here. Prune/relocate. +- [COVERAGE] — eshell visual-commands/xterm-color wiring and the dirvish mark-all loop had no load-and-assert tests (both standalone bugs above); TRAMP perf settings look sound for the DUET latency concern (attr caching, no remote VC, direct-async + controlmaster). + +*** TODO Findings: AI group +From agents 2026-06-12; spot-verified sample (string-model setq confirmed). Beyond the standalone tasks: +- [BUG] =ai-term.el:875= — close derives the tmux session name from =default-directory=, which ghostel retargets via OSC 7; after a cd the kill-session misses (orphaned agent session) or name-collides with a different aiv- session. Derive from the buffer name's immutable basename. +- [UX] =ai-term.el:827= — multi-window F9 toggle-off unconditionally delete-windows, never restoring the displaced edge-window buffer the Commentary (:24) and reuse-edge docstring (:521) promise. Restore when quit-restore still matches, or fix the docs to describe delete-window reality. +- [UX] =ai-conversations-browser.el:191= — browser load stubs =y-or-n-p= to nil, silently discarding an unsaved in-progress conversation (the direct C-; a l path offers to save). Give ai-conversations a file-arg internal instead of puppeting the interactive command via cl-letf; also the =(caar cands)= fallback loads the newest conversation on a filename mismatch — fail loudly. +- [ENHANCE] =ai-quick-ask.el:103= — dismiss mid-stream kills the buffer without =gptel-abort= — request keeps streaming to a dead buffer (wasted tokens). +- [NOTE] =ai-mcp.el= — unreachable from init, consistent with the paused Phase 1.5; add a one-line Commentary note ("not wired until Phase 2") so future audits don't re-flag, and revisit =cj/mcp-enabled-servers= defaulting to all nine servers before wiring. +- [COVERAGE] — load/autosave lifecycle untested (fresh-session load, timer self-cancel, close-buffer session-name derivation). + +*** TODO Findings: media/reading group +From agents 2026-06-12; spot-verified sample (M-S- bindings, eww store split confirmed). Beyond the standalone tasks: +- [BUG] =music-config.el:585= — =cj/music-add-dired-selection= gates =dired-get-marked-files= on =(use-region-p)= — but dired marks aren't a region; marked files are ignored, + adds only file-at-point. Drop the conditional (the function already falls back correctly). Note for the EMMS-free rewrite: dirvish + shadows =dired-create-directory= — deliberate decision needed before carrying it over. +- [UX] =media-utils.el:195-204= — =cj/yt-dl-it= watches tsp (which enqueues and exits), so "Finished downloading" fires immediately while yt-dlp may fail later, silently; also affects elfeed d. Message "queued" honestly or watch the real job (tsp -f). +- [UX] =browser-config.el:34-47,171= — first-run fallback picks EWW (first, "always available") over installed real browsers; fresh machines get org links in a text browser until cj/choose-browser runs. Prefer the first external match. +- [REMOVE] =video-audio-recording.el:442-488= — =cj/recording-group-devices-by-hardware= is dead code (nothing calls it) carrying a hardcoded "Jabra SPEAK 510 USB" branch. Delete + its test file. +- [REMOVE] =calibredb-epub-config.el:198-212= — =set-auto-mode= :around advice for .epub is redundant with nov's :mode registration (auto-mode-alist wins before magic-fallback); overhead + failure surface on every file visit. Remove and verify. +- [COVERAGE] — eww interactive commands (switch-search-engine, bookmark-quick-add, copy-url) and =cj/nov-center-images= untested. + +*** TODO Findings: apps/misc group +From agents 2026-06-12. Beyond the standalone tasks: +- [BUG] =hugo-config.el:49= — =cj/hugo-new-post= void-functions on =org-hugo-slug= in a fresh session (ox-hugo is :after ox, which loads on first export); =cj/hugo-export-post= already requires ox-hugo — do the same here. +- [BUG] =help-utils.el:73= — arch-wiki search signals raw file-missing when the docs dir is absent; the friendly install hint at :81 is unreachable. Guard with =file-directory-p= + user-error up front. +- [UX] =hugo-config.el:244= — eight raw global-set-key C-; h calls + hand-rolled which-key mutate cj/custom-keymap directly, against keybindings.el's own instruction. Convert to defvar-keymap + =cj/register-prefix-map= (same class as org-reveal, restclient, slack). +- [ENHANCE] =games-config.el:25= — =:defer 1= pulls malyon + 2048 into every session for nothing; use =:commands=. Also :config references =org-dir= without requiring user-constants (free-variable warning at byte-compile). +- [REMOVE] =wrap-up.el:29= — =elisp-compile-mode= doesn't exist (real mode emacs-lisp-compilation-mode derives from compilation-mode, already covered at :27); dead line. (The prior unguarded-timer fix is intact.) +- [REMOVE] =help-config.el:99-106= — stray empty :preface + dead commented Info-directory-list block. Delete. +- [NOTE] =duet-config.el= — orphaned BY DESIGN (Commentary documents pre-alpha staging; Stage 1 is the wire-in trigger). Audit record only. +- [COVERAGE] — help-config and help-utils have zero test files; the two broken paths above are exactly the untested branches. + +*** TODO Findings: holistic — startup & performance +From the 2026-06-12 holistic pass; daemon init measured at 1.11s (healthy). Beyond the standalone [#A] native-comp/GC task: +- [BUG→FOLD] the eager-org chain: =org-config.el:352= org-appear has no defer trigger (only :custom) → requires all of org at init; org-agenda (=:after org :demand t=) cascades; chime's =:demand t= pulls it anyway. org-config is the most expensive require (0.229s of 1.11s). Decide fully-eager vs fully-deferred — and =init.el:146='s "calendar-sync must come after org-agenda" contract exists only as a comment (three uncoordinated writers of =org-agenda-files=). Both facts belong in the filed defer-modules task before that refactor starts. +- [PERF] =dirvish-config.el:385-387= — =:defer 0.5= defeated by :init calling autoloaded =dirvish-override-dired-mode= → dirvish fully loads at init (0.072s, third most expensive; trace-confirmed). Own the eager load or defer the override to a dired-mode-hook shim. +- [PERF] timed =:defer N= loads unused packages into every start: simple-httpd (:1s + startup mkdir despite the defer), malyon, 2048-game, emojify (may hit network), ligature. Convert to :commands/mode hooks. +- [UX] =early-init.el:235-256= — synchronous =package-refresh-contents= on the startup path when any archive cache is >7 days old (MELPA ~6MB) — multi-second network-bound start, fires in batch too. Make async post-startup or push into the localrepo update script (distinct from the filed bootstrap-relocation task). +- [PERF] =early-init.el:228= — no =package-quickstart= with 184 packages; activation walks every package dir each start (~0.3s of early-init). Free win; regenerate after package ops. +- [PERF] =prog-general.el:298= — =yas-reload-all= immediately before =yas-global-mode= scans snippet dirs twice per start (doubled "[yas] Prepared..." message). Delete the line. +- [REMOVE] cross-ref: the all-the-icons stack (already in UI core findings) is 2 of the :demand t packages plus a per-frame install-check hook. + +*** TODO Findings: holistic — daemon stability +From the 2026-06-12 holistic pass. Architecture-level verdict good (timers cancelled/guarded, calendar-sync async well-contained, advice mostly named + guarded). Residual: +- [STABILITY] =transcription-config.el:293= — sentinel chain has no unwind-protect; =--append-to-log='s =insert-file-contents= signals if the log is missing → process buffer leaks, entry stuck 'running in the modeline forever, no notification. Extends the filed transcription standalone — fix together. +- [STABILITY] =calendar-sync.el:1646= — hourly timer body: fetch/parse guarded but the timezone check and =--require-calendars= run bare — any signal repeats hourly forever (the exact class fixed in four modules once). Condition-case the body; demote the hourly echo-area message to the silent log. +- [STABILITY] =music-config.el:865= — four anonymous-lambda advice in :config stack per live reload (verified: lambdas don't dedupe) and can't be advice-removed. Name the function. +- [STABILITY] =system-defaults.el:69= — =display-warning= advice appends to comp-warnings-log with no condition-case (unwritable path → every async comp warning signals from inside display-warning) and the log grows unbounded. Guard + cap. +- [STABILITY] =media-utils.el:164= — playback sentinel assumes the process buffer is alive (user killed *player:...* → sentinel error, diagnostics lost); sibling yt-dl sentinel shares the kill-buffer gap. buffer-live-p guards. +- [ENHANCE] =system-commands.el:86= — =#'ignore= sentinel + output to /dev/null makes failing lock/suspend indistinguishable from success — the user walks away from an unlocked machine. Message on nonzero exit. (Compounds the [#A] slock task: the broken lock currently fails through exactly this silent path.) +- [ENHANCE] =ui-config.el:153= — post-command cursor hook unguarded: any future signal self-removes it silently (cursor stops signaling modified/read-only until restart); frame-hook lambda also accumulates per reload. with-demoted-errors + name it. +- (kill-emacs-hook y-or-n-p prompt independently re-found here — already filed in the text/prose child; convergence noted.) + +*** TODO Findings: holistic — UX consistency +From the 2026-06-12 holistic pass. Verdict: more coherent than most 120-module configs (~85% prefix-helper adoption, M-S translation fully covers its 18 bindings, F-keys collision-free, DEF-arg prompts dominate). Beyond the standalone [#A] fset task: +- [BUG] notification env gate: =transcription-config.el:169-171= gates desktop notifications on =(getenv "DISPLAY")= — an X11 predicate that works only because XWayland exports it. Use =env-gui-p= (host-environment.el provides it). +- [UX] four notification stacks beyond the messenger split (notify script ± fallback, alert.el, raw notifications-notify, echo-only for calendar-sync/recording completions). Proposed: one cj/notify facade (transcription's =cj/--notify= is the right shape) — config-wide companion to the messenger-notify addendum in the unification spec. +- [UX] five more C-; entries bypass the register helpers or lack labels: =browser-config.el:182= (C-; B, no label), =org-babel-config.el:51= (C-; k, no label), =flycheck-config.el:62-64= (:bind into cj/custom-keymap), =pearl-config.el:43= (:bind-keymap C-; L, no label), =dev-fkeys.el:533= (helper but no label). Sweep onto cj/register-prefix-map with labels. +- [UX] user-error vs message inconsistent for "nothing to act on" config-wide (examples: =custom-whitespace.el:190=, =jumper.el:202=, =chrono-tools.el:99= message; =mu4e-attachments.el:112=, =ai-rewrite.el:79= user-error; =test-runner.el:392/394= mixes both 2 lines apart). Convention: user-error when the command can't proceed; message when it ran and found nothing. +- [ENHANCE] M-S translation layer: complete for GUI (18/18) but installs only on env-gui-p paths — terminal frames have no M-uppercase route; and =dwim-shell-config.el:932/934= binds M-S-d (dired) vs raw M-D (dirvish) asymmetrically. Feeds the filed M-S review task with the concrete map. +- [ENHANCE] which-key labels: register-helper's LABEL arg used by exactly 1 of 23 registrants (rest use separate with-eval-after-load blocks); label style drifts ("X menu" vs bare nouns). Adopt LABEL arg + one style. +- [ENHANCE] "?" curated-menu candidates (for the filed convention task): elfeed search/show, dirvish, signel chat/dashboard, music playlist, ai-conversations-browser, mu4e-attachments, transcription status, pearl. calibredb remains the model. +- [UX] ="(Cancel)"= pseudo-candidate in =music-config.el:253-256= vs C-g everywhere else (90+ prompts). Drop it. +- [UX] buffer-naming drifts across three conventions (*AI-Assistant* / *Kill Ring* / *dashboard*); pick Title Case + "*Name: param*", lowercase for process logs. +- [ENHANCE] C-; f formatter shadowing implemented 3 ways (:bind :map vs local-set-key in hooks); unify on :bind. Also =keybindings.el:21= commentary still says "C-c j" for the jump prefix the code binds at C-; j. +- [ENHANCE] initial-input anti-pattern at =dwim-shell-config.el:661,680= and =erc-config.el:176-177= against the config's DEF-arg norm. + +*** TODO Findings: holistic — package strategy +From the 2026-06-12 holistic pass (184 elpa dirs). Core stack modern (vertico/consult/embark/orderless, treesit-auto, built-in which-key, current magit/forge/telega/slack). Beyond the standalone gptel/prescient tasks: +- [REMOVE] true orphans, nothing references them: js2-mode, tide, json-mode (pre-treesit JS stack). package-delete + drop from .localrepo. +- [REMOVE] emojify: 2021 snapshot, dormant upstream, crashes in lui (slack disabled it), Emacs 30 renders emoji natively. Drop the use-package + hooks (=font-config.el:253=, =erc-config.el:211=); it stays on disk only as slack's declared dep. +- [BUG] legacy-mode hooks miss the ts modes: =prog-general.el:91-92= hooks =yaml-mode-hook=/=toml-mode-hook= but the config runs yaml-ts/toml-ts — general prog settings silently don't apply in YAML/TOML buffers. Rehook; delete toml-mode + eldoc-toml + yaml-mode packages (superseded by treesit). +- [RISK→FOLD] localrepo priority 200 is absolute, so package-upgrade silently no-ops on everything mirrored — the engine that fossilized emojify@2021/toml-mode@2016/js2@2023. The filed refresh-script task at [#D] deserves [#B] + a quarterly cadence, else every orphan finding regrows. +- [RISK] fork fleet sync-back stories: org-drill flip back to :vc when done (filed dev-checkout finding); auto-dim-other-buffers local checkout with :vc commented — decide its home; org-msg pins =:rev :newest= (unpinned moving target) — pin a known rev. signel/duet/pearl/wttrin/gloss/chime self-owned remotes are fine. +- [UPGRADE] wiki-summary (2018, dead upstream, predates Wikipedia's REST API; sole caller help-utils) — the audit's one write-your-own: ~30-line url-retrieve against the REST summary endpoint. Delete the package, inline the helper. +- [UPGRADE] xterm-color droppable in eshell on Emacs 30's native ansi-color (its only use; also doubly-broken per the eshell standalone task — fixing by deletion is an option). +- [ENHANCE] Python tier: poetry.el (sluggish) + pyvenv (2021) keep only if Poetry projects are still real; blacken fine until ruff-format (reformatter.el already installed). lsp-pyright current. +- [DECIDED] projectile, lsp-mode, dirvish: keep (wired into 10/7/many modules, maintained, migration cost > benefit). On the record so future audits don't relitigate. + +*** TODO Findings: spin-off repos (pearl, chime, emacs-wttrin) +Full findings delivered as handoffs to each repo's inbox/ (2026-06-12-0057-from-.emacs.d-handoff-*.org); each repo's next session files them through its own value gate. Highlights: +- pearl (10 findings; suite green, 66 ERT files): auth-source negative-cache trap in pearl-clear-cache (the 2026-06-01 incident class, unfixed); sync wrapper ignores pearl-request-timeout + async has no timeout; mutation errors discard Linear's GraphQL reason; no RATELIMITED handling; dead legacy API layer (~150 lines). +- chime (10 findings; suite green; the 2026-06-11 watchdog handoff VERIFIED landed in full): lookahead vars never injected into the async child (documented feature silently capped at 8 days — one-line fix); days-until-event nil crash on mixed timed/all-day events; stale-callback race after watchdog interrupt (generation counter needed); default test run prints green integration banner over "Ran 0 tests". +- emacs-wttrin (10 findings; ~56 ERT files, CI; the face-flood reminder VERIFIED resolved — test 8f3c770 + fix c5e5e1d, reminder cleared from notes.org): no network timeouts (wttr.in stalls hang the loading buffer); error-path response-buffer leak; non-favorite cache never expires; 17 unreleased commits incl. two features — tag v0.4.0. + +** PROJECT [#C] Build cj/dev-setup-project helper (per docs/specs/dev-setup-project-spec.org) :feature: :PROPERTIES: :LAST_REVIEWED: 2026-06-01 :END: @@ -3642,7 +3186,7 @@ These may override useful defaults - review and pick better bindings: Interactive command that opens a review buffer with proposed per-subdirectory .dir-locals.el contents (projectile compile/run/test + cj/coverage-backend), optional starter Makefile when none exists, and gitignore updates. User edits inline, C-c C-c writes all files. -Design: [[file:docs/design/dev-setup-project.org][docs/design/dev-setup-project.org]] +Design: [[id:596fce5d-1bab-46e7-8567-d4a2e0923091][docs/specs/dev-setup-project-spec.org]] Scope of v1: - modules/dev-setup-config.el (command + review-buffer major mode) @@ -3759,90 +3303,700 @@ turn out load-bearing. Depends on: none, but easiest after the writer sub-task surfaces real friction. -** TODO [#C] Pick and wire a debug backend for F5 :feature: +** PROJECT [#C] Localrepo Documentation :feature: :PROPERTIES: -:LAST_REVIEWED: 2026-06-01 +:LAST_REVIEWED: 2026-06-05 :END: -#+begin_src emacs-lisp - Give me an idea of the amount of work and complexity and what allows for a consistent UX across languages. -#+end_src +Audit on 2026-05-27 found the localrepo build half is shipped (=.localrepo/= holds 185 entries; =early-init.el= L135–165 wires the priority-200 pin above the local ELPA-mirror tier at 120–125 and the online fallback). The remaining "document limitations" half splits into one docs-set plus four gap-fix follow-ups that the docs cross-reference. -*** 2026-05-15 Fri @ 19:19:21 -0500 Inital Goals -Bind F5 globally to a debug entry point. Backend choice is the hard part: +Docs land in three artifacts. =docs/design/localrepo.org= carries the full architecture (tier model, install path, refresh story, all four limitations with pointers to the follow-up tasks). =.localrepo/README.org= sits next to the artifact as the user-facing entry — a short summary that survives even if =early-init.el= moves. =early-init.el= grows a commentary header that points at the README, not at the design doc — the README is what future-Craig hits first. -- dape (Debug Adapter Protocol for Emacs) — modern, multi-language via DAP. Single UX across Python, Go, TS, Rust, etc. Less mature than DAP clients in other editors. -- realgud — wraps multiple debuggers (pdb, gdb, node --inspect, etc.). More mature; UX varies by backend. -- Language-specific stacks — dap-mode (python-mode + dap), delve for go, ts-node --inspect, etc. Best per-language UX; most config work. +The four limitations the docs cover (each spun out below as its own task): +- Treesitter grammars (downloaded by =treesit-auto= on first use; not in the localrepo) +- Native-comp =.eln= cache (Emacs-version-specific; invalidated by version bumps) +- System-tool deps (=ripgrep=, =fd=, =pandoc=, =prettier=, =pyright=, etc.; flagged at load by =cj/executable-find-or-warn=, not packageable via =package.el=) +- Refresh / update story (no dedicated script today; ad-hoc =cp= from the elpa mirrors) +*** TODO [#C] Design doc — docs/design/localrepo.org +Write the design doc: tier model, priorities, install path, refresh story, all four limitations with cross-links to the follow-up tasks below. +*** TODO [#C] README — .localrepo/README.org +Write the README at the artifact: short prose entry point summarizing the tier model, pointing at =docs/design/localrepo.org= for full detail. This is what =early-init.el='s commentary header links to. +*** TODO [#C] Commentary header in early-init.el +Add a Commentary-section header in =early-init.el= pointing at =.localrepo/README.org= for usage and =docs/design/localrepo.org= for architecture. Sits at the top of the localrepo block (around L130). +** PROJECT [#C] Migrate from Company to Corfu (with prescient integration) :feature: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-02 +:END: -F5 itself will be simple (start/resume debug). Likely modifier variants once the backend is picked: -- C-F5 toggle breakpoint at point -- M-F5 eval expression in debug context (or step-over shortcut) +Spec: [[id:68733ba2-37a7-4a7b-bfaa-b845d82ff1e7][docs/specs/company-to-corfu-migration-spec.org]] -Evaluate against these projects' languages: elisp (edebug already works), Python, Go, TS, shell. Shell debug is usually print-based; skip. +*** TODO [#C] Install corfu-side packages +Add corfu, cape, kind-icon, corfu-prescient to the package list. corfu-popupinfo ships inside corfu. Spec step 1. -Do this after the F-key rework ticket ships so F5 is the only hole left. +*** TODO [#C] Rewrite selection-framework.el company block as corfu/cape stack +Replace the three company-* use-package blocks (lines 192-226) and company-prescient (240-243) with corfu / cape / corfu-popupinfo / kind-icon / corfu-prescient. Rename the section header Company → Corfu in the same change. Spec steps 2 + 8. -** TODO [#C] Build debug-profiling.el module :feature: +*** TODO [#C] Swap mail-compose completion disable to corfu +Rewrite cj/disable-company-in-mu4e-compose to (corfu-mode -1) across mu4e-compose, org-msg-edit, and message modes (mail-config.el:319-333). Spec step 3. + +*** TODO [#C] Drop company-ledger for ledger's built-in capf +ledger-config.el: remove company-ledger; verify ledger-complete-at-point registers on completion-at-point-functions, add a ledger-mode-hook capf push only if it doesn't. Spec step 4. + +*** TODO [#C] Drop company-auctex for AUCTeX capf + cape-tex +latex-config.el: remove company-auctex and (company-auctex-init); add cape-tex on TeX-mode-hook. Spec step 5. + +*** TODO [#C] Rewire eshell completion to pcomplete capf +eshell-config.el:163-171: drop company-shell and the company-mode activation; add cape-capf-buster around pcomplete-completions-at-point + corfu-mode. Spec step 6. + +*** TODO [#C] Remove company-mode calls from prog-go/python/webdev +Delete (declare-function company-mode ...) and (company-mode) from the three mode hooks; global-corfu-mode covers them. Spec step 7. + +*** TODO [#C] Uninstall company packages + recompile +After the rewrite is green: package-delete company, -quickhelp, -box, -prescient, -ledger, -auctex, -shell; make clean && make compile. Spec step 9. + +*** TODO [#C] Tests: corfu activation, mail-disable, capf registration +New tests/test-selection-framework-corfu.el and tests/test-mail-config-corfu-disable.el; update ledger/latex tests to assert their capf registers. Spec Testing section. + +*** 2026-05-16 Sat @ 11:07:24 -0500 Goals +Drop-in replacement for the in-buffer completion stack: =company= → +=corfu=, =company-quickhelp= → =corfu-popupinfo=, =company-box= → +=kind-icon=, =company-prescient= → =corfu-prescient=, plus =cape= for +the file/keyword/dabbrev capfs that =company-files= / =company-keywords= +used to handle. Per-module fixups for ledger, AUCTeX, eshell, mu4e +compose, and the three =prog-*= modules. See the design doc for the +full translation table, migration steps, tests, and risks. + +** PROJECT [#C] Terminal GPG pinentry Completion :feature: :PROPERTIES: -:LAST_REVIEWED: 2026-06-02 +:LAST_REVIEWED: 2026-06-05 :END: -Reusable profiling infrastructure for targeted slow-command investigation. Consolidates scattered profiler bindings (currently in =modules/config-utilities.el=) and adds two pure-helper-backed entry points: "profile next command" and "time region or sexp." Designed via =/brainstorm= 2026-04-26. +Audit on 2026-05-27 found no trace of the =terminal-pinentry= branch on this machine: no local or remote ref, no reflog entry across 732 entries reaching back through January, no stash, no dangling commit, no sibling worktree. The 2026-01-24 session log says the branch was created that day, but the work either lived on another machine or was deleted before reaching here. The original task above (=Finish terminal GPG pinentry configuration=) is superseded by this one. -Design: [[file:docs/design/debug-profiling.org][docs/design/debug-profiling.org]] +Surviving footprint on this machine: one commented line at =modules/auth-config.el:83= (=;; (setq epa-pinentry-mode 'loopback)=). The hook point =env-terminal-p= exists in =modules/host-environment.el:97=. Everything else (terminal-vs-GUI branching in the epa =:config=, external pinentry wiring for GUI, =GPG_TTY= export, tests) is to be written fresh off main. -Implement via =/start-work= against the design — branch =feat/debug-profiling=, commits decomposed along the test-first split-for-testability boundary. Once shipped, use it as the v1 exercise on the queued [#B] org-capture target-building investigation. +Goal: in terminal Emacs, GPG passphrase prompts land in the minibuffer via loopback mode; in GUI Emacs, prompts go to the existing external pinentry. -** TODO [#C] Org-noter custom workflow — fix and finish :feature:bug: +Open: confirm the GUI pinentry tool (2026-01-24 notes named =pinentry-dmenu=; current =auth-config.el= names no pinentry program, leaving it to =gpg-agent='s config). Also worth checking whether the =terminal-pinentry= branch survives on the laptop and should be pulled here rather than rewritten. + +*** TODO [#C] env-terminal-p branch in epa :config :feature: +Inside the epa =use-package= =:config= in =modules/auth-config.el=, set =epa-pinentry-mode= to ='loopback= when =(env-terminal-p)=, else leave the external pinentry path active. Replace the lone commented line at =auth-config.el:83=. + +*** TODO [#C] GPG_TTY export for terminal sessions :feature: +When =(env-terminal-p)=, =(setenv "GPG_TTY" (shell-command-to-string "tty"))= so gpg-agent can target the controlling tty. Guard against a non-tty stdin. + +*** TODO [#C] gpg-agent updatestartuptty refresh in terminal :feature: +The current =call-process= to "gpg-connect-agent updatestartuptty /bye" runs unconditionally; keep it for GUI, and re-fire it on terminal entry so the agent re-binds to the current tty. + +*** TODO [#C] ERT tests for terminal vs GUI pinentry branching :test: +Test that with =env-terminal-p= stubbed t, =epa-pinentry-mode= resolves to ='loopback= after =auth-config= loads; with it stubbed nil, the loopback setting is not applied. Use =cl-letf= around =env-terminal-p=; cover normal, boundary (=epa= already loaded), error (=gpg-connect-agent= missing). + +*** TODO [#C] Minibuffer prompt in real terminal Emacs +=emacs -nw=, open an encrypted file or trigger an auth-source decrypt, confirm the passphrase prompt lands in the minibuffer rather than failing on missing pinentry. + +*** TODO [#C] External pinentry still fires in GUI Emacs +Restart the daemon, open a GUI frame, trigger an encrypted decrypt, confirm =pinentry-dmenu= (or whatever GUI pinentry is configured) still appears. + +*** TODO [#C] Archive the original L3813 task +After this work lands, mark the original "Finish terminal GPG pinentry configuration" task DONE with a =CLOSED:= stamp and a one-line note pointing at this parent task. + +** TODO [#A] Unified popup and messenger UX — placement, dismissal, one library :feature: :PROPERTIES: -:LAST_REVIEWED: 2026-06-02 +:LAST_REVIEWED: 2026-06-20 :END: +Merged 2026-06-20 from the config-wide popup-policy task and the messenger-unification +task — they're the same policy at two scopes (the messenger windows are the first +concrete application of the general popup rules). Two parts: -Continue debugging and testing the custom org-noter workflow from 2025-11-21 session. -This is partially implemented but has known issues that need fixing before it's usable. +(A) Config-wide popup policy. All transient popups follow one set of principles. +Placement: when the Emacs frame is wider than tall, the popup rises from the right; +when square or taller, from the bottom — settle the aspect-ratio threshold and the +pop-out percentage. Dismissal: C-c C-c when there's an accept action, C-c C-k when +there's a cancel, otherwise =q= closes the window. Generalizes ai-term adaptive +placement (the aspect-ratio docking) and the messenger window/key rules below into +one config-wide policy. From the roam inbox. -*Last worked on:* 2025-11-21 -*Current status:* Implementation complete but has bugs, needs testing +(B) Messenger unification (first application of the policy above). +Spec: [[file:docs/specs/messenger-unification-spec.org][messenger-unification-spec.org]] ([[id:4bfc2011-8ffc-4765-8886-91df12141171][by id]], Draft, 2026-06-11; keybinding-alphabet section + smoke-first parity added 2026-06-16). One library (=cj-messenger-lib.el=) gives every messenger the same shape: chat windows rise from the bottom (the signel rule, generalized), C-c C-c confirms, C-c C-k cancels, C-c C-a attaches — dispatched per backend through a registry + minor mode. Signel already conforms (reference backend); telega and slack join in phases 2-3; ERC later. All eight decisions settled 2026-06-11 (cancel closes an idle window; telega's filter-cancel shadow accepted; slack rooms join the bottom rule). Spec held open — Craig has more ideas to fold in before it's marked Ready. -*Known issues to fix:* +** TODO [#B] agenda sources: roam Projects missing, no existence filtering :bug:solo: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-20 +:END: +From the 2026-06 config audit, =modules/org-agenda-config.el=: +- =:182-191= — commentary and docstrings promise org-roam nodes tagged "Project" as agenda sources, but =cj/--org-agenda-scan-files= never scans them, and files added by the roam finalize-hook are wiped on the next =cj/build-org-agenda-list= cache rebuild (≤1h). Add a roam Project pass (mirror =org-refile-config.el:101-109=) or correct the docs. +- =:186,456= — agenda file list built unconditionally (inbox/calendars may not exist on a fresh machine) and =org-agenda-skip-unavailable-files= is unset — the exact interactive-prompt class that once hung the chime daemon. Filter with =file-exists-p= + set the var as backstop. -1. /Double notes buffer appearing when pressing 'i' to insert note/ - - When user presses 'i' in document to insert a note, two notes buffers appear - - Expected: single notes buffer appears - - Need to debug why the insert-note function is creating duplicate buffers +** TODO [#B] Auto-dim: org headings, links, and tags do not dim in unfocused windows :bug: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-20 +:END: +auto-dim-other-buffers-affected-faces (auto-dim-config.el) remaps font-lock and a few org faces to the flat dim face, but not org-level-1..8, org-link, or org-tag, so headings, links (seen in daily-prep.org), and tags like :solo: stay lit when the window loses focus. Decide the dim approach: a flat-dim remap like font-lock (quick) versus dedicated -dim variants surfaced through org-faces / theme-studio (richer, matches the keyword work; Craig flagged org-tags may want the org-faces treatment). Consolidates three roam-inbox captures. +** TODO [#B] "? = curated help menu" convention across modes :feature: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-20 +:END: +From the calibredb keybindings work 2026-06-06. The pattern that worked: in a modal/major-mode buffer (calibredb), bind =?= to a curated transient of the frequent workflows, and move the package's own full dispatch to =H=. It fixes the "I can't discover the keys" problem that which-key can't help with (which-key only pops up after a prefix, not for top-level single keys in a mode-map). -2. /Toggle behavior refinement needed/ - - The toggle between document and notes needs refinement - - May have edge cases with window management - - Need to test various scenarios +Task: survey the modes/modules Craig works in and identify where a =?= -> curated-help-menu (transient) makes sense. Candidates: any major-mode buffer with single-key bindings and no good discovery affordance -- calibredb (done), nov, dirvish, mu4e, ghostel/term, signel, pearl/linear, ELFeed, etc. For each, note whether =?= is free or already a help dispatch, and whether a curated menu (vs the package's own) adds value. Establish it as a convention (and maybe a small helper/macro to define a curated =?= menu consistently). -*Testing needed:* +** TODO [#B] Dupre diff-changed / diff-refine-changed legibility :bug: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-11 +:END: +Surfaced 2026-06-07 from a pearl session designing its modified-ticket indicator (pearl marks a changed field by inheriting =diff-changed=). dupre's =diff-refine-changed= is bright gold (#ffd700) under near-white text (#f0fef0) -- WCAG contrast ~1.35, unreadable as a plain background. It only looks fine inside diff-mode because diff-mode overlays its own dark foreground. =diff-changed= (#875f00 amber) is ~5.49, readable but off the modus model. Every modus variant keeps both faces legible (contrast 9-16) by pairing a dark low-saturation background with a hue-matched foreground. -1. /EPUB files/ - Test with EPUB documents (primary use case) -2. /Reopening existing notes/ - Verify it works when notes file already exists -3. /Starting from notes file/ - Test opening document from an existing notes file -4. /PDF files/ - Verify compatibility with PDF workflow -5. /Edge cases:/ - - Multiple windows open - - Splitting behavior - - Window focus after operations +Ask: +1. Rework dupre's =diff-changed= and =diff-refine-changed= on modus lines: dark low-saturation background, legible foreground (plain default fg for simplicity, or hue-tinted per modus -- decide), and keep refine slightly stronger than changed (refine is the word-level emphasis inside a changed region; modus keeps them distinct). +2. While there, audit dupre's broader diff/palette faces against modus conventions (background/foreground tinting, contrast targets) and flag where it diverges. -*Implementation files:* -- =modules/org-noter-config.el= - Custom workflow implementation -- Contains custom functions for document/notes toggling and insertion +Reference values -- modus-vivendi: refine-changed bg #4a4a00 fg #efef80, changed bg #363300 fg #efef80. modus-operandi: refine-changed bg #fac090 fg #553d00, changed bg #ffdfa9 fg #553d00. -*Context:* -This custom workflow is designed to make org-noter more ergonomic for Craig's reading/annotation -workflow. It simplifies the toggle between document and notes, and streamlines note insertion. -The core functionality is implemented but needs debugging before it's production-ready. +Side-by-side legibility render: [[file:assets/2026-06-07-dupre-diff-face-legibility-compare.png][assets/2026-06-07-dupre-diff-face-legibility-compare.png]]. +** TODO [#B] F7 diff-aware coverage classifies every changed file "not tracked" :bug:solo: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-20 +:END: +=modules/coverage-core.el:252= — =cj/--coverage-intersect= joins covered×changed by exact string key, but simplecov.json keys are ABSOLUTE paths while the git-diff parser returns repo-RELATIVE ones — zero matches ever, so working-tree/staged/branch scopes report ":tracked nil" for everything and F7's main feature is inert (whole-project scope works, same-source keys). Unit tests hand-build matching keys so they pass; add one integration test feeding a real undercover report + real diff. Normalize both sides to repo-relative. From the 2026-06 config audit. -**Next Steps:** -1. Debug the double buffer issue when pressing 'i' -2. Test all scenarios listed above -3. Refine toggle behavior based on testing -4. Document the final keybindings and workflow +** TODO [#C] Migrate tests off mocking primitives (native-comp robustness) :test:refactor: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-21 +:END: +Long-term test-quality work surfaced by re-enabling native-comp (2026-06-20). When a test redefines a C primitive or a native-compiled function (=cl-letf=/=fset=/=advice-add=), native-comp routes native callers through a trampoline, which interacts badly with mocks in three ways: trampoline-build failure under =--batch=, silent mock-bypass (native callers ignore the redefinition), and arity mismatch (the trampoline calls the mock with the primitive's max arity). + +Done 2026-06-21 (the immediate fix): swept every arity-narrow subr mock to =(lambda (&rest _) ...)= (188 sites) and added =tests/test-meta-subr-mock-arity.el=, which fails =make test= on any arity-narrow subr mock. That kills the arity mode (the only one we've hit) and enforces it going forward. + +This task is the durable fix the ecosystem and =elisp-testing.md= point to: restructure tests so they don't redefine primitives at all — inject dependencies, drive real state (temp-file fixtures, real buffers), or test pure helpers. That closes the two latent modes (build-failure, silent-bypass) the variadic sweep leaves open. Big, incremental, low-urgency. + +Full mechanism, the three failure modes, the research (Emacs bug#51140, bug#61880, buttercup #230, Debian #1021842, the emacs-29 redefine-primitive warning, the manual on =native-comp-enable-subr-trampolines=), and the decision: [[file:docs/native-comp-subr-mocking.org][docs/native-comp-subr-mocking.org]]. + +** TODO [#B] Fix up test runner :bug: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-06 +:END: +*** 2026-05-16 Sat @ 11:15:51 -0500 Ideas +**** Current State +=modules/test-runner.el= is a solid first pass for an Emacs-config-specific ERT +workflow: +- project-scoped focus lists +- run all vs focused mode +- run ERT test at point +- load all test files +- clear ERT tests from other project roots +- keybindings under =C-; t= + +The universal test-running direction is currently split across modules: +- =test-runner.el= owns ERT focus/state/UI. +- =dev-fkeys.el= owns F6 language detection and command generation for Elisp, + Python, Go, and partial TypeScript. + +That split is the biggest architectural pressure point. The test runner should +eventually own runner discovery, scopes, command construction, result handling, +and UI. F6 should become a thin entry point into the runner. + +**** Critical Design Issues +***** Too ERT-specific at the core +The current state model is named generically, but most operations assume: +- test files live in =test/= or =tests/= +- files match =test-*.el= +- tests are ERT forms +- individual tests can be selected by ERT selector regex +- loading tests into the current Emacs process is acceptable + +This makes the module hard to extend cleanly to pytest, Jest, Vitest, Go, Rust, +or shell test runners. The common abstraction should be "test run request" and +"test runner adapter", not "ERT file list". + +***** In-process ERT causes state contamination +=cj/test-load-all= and focused runs load test files into the current Emacs +session. This is fast and ergonomic, but it can leak: +- global variables +- advice +- loaded features +- overridden functions +- ERT test definitions +- load-path mutations + +The runner should support two ERT execution modes: +- =interactive= / in-process for fast local TDD +- =isolated= / batch Emacs for reliable verification + +The isolated path should be preferred for "before commit", CI parity, and +agent-driven verification. + +***** Test discovery is regex-based and fragile +=cj/test--extract-test-names= scans files with a regex for =ert-deftest=. +That misses or mishandles: +- macro-generated tests +- commented forms in unusual shapes +- multiline or reader-conditional forms +- non-ERT Elisp tests such as Buttercup +- stale ERT tests already loaded in the session + +Better approach: +- for ERT in isolated mode, let ERT discover tests after loading files +- for source navigation, use syntax-aware forms where possible +- store discovered tests as structured records with file, line, name, framework, + tags, and runner + +***** Path containment has at least one suspicious edge +=cj/test--do-focus-add-file= checks: + +#+begin_src elisp +(string-prefix-p (file-truename testdir) (file-truename filepath)) +#+end_src + +That should use =cj/test--file-in-directory-p= or ensure the directory has a +trailing slash. Otherwise sibling paths with a shared prefix are a recurring +class of bug. + +***** Runner commands are shell strings too early +=cj/--f6-test-runner-cmd-for= returns shell command strings. That makes it +harder to: +- inspect command parts +- safely quote arguments +- offer command editing +- run via =make-process= / =compilation-start= without shell ambiguity +- attach metadata +- rerun exact invocations +- convert commands into UI labels + +Prefer a structured command object: + +#+begin_src elisp +(:program "pytest" + :args ("tests/test_foo.py" "-q") + :default-directory "/project/" + :env (("PYTHONPATH" . "...")) + :runner pytest + :scope file) +#+end_src + +Render to a shell string only at the final compilation boundary. + +***** F6 and =C-; t= workflows duplicate the same domain +F6 already handles "all tests" and "current file's tests" for multiple +languages. =C-; t= handles ERT-only focus and run state. These should converge +on one runner service: +- F6: quick entry point +- =C-; t=: full runner menu +- both call the same scope/adapter engine + +***** Test directory discovery is too narrow +Current discovery prefers =test/= then =tests/=, with a global fallback. Real +projects often need: +- Python: =tests/=, package-local =test_*.py=, =pytest.ini=, =pyproject.toml= +- JS/TS: =package.json= scripts, =vitest.config.*=, =jest.config.*=, + =*.test.ts=, =*.spec.ts= +- Go: package directories, =go.mod= +- Rust: =Cargo.toml=, integration tests under =tests/= +- Elisp packages: =Makefile=, =Eask=, =ert-runner=, Buttercup, =tests/= + +Discovery should be adapter-specific and project-config-aware. + +***** No structured result model +=cj/test-last-results= exists but is not meaningfully populated. A powerful +runner needs a normalized result model: +- run id +- started/finished timestamps +- status: passed/failed/errored/cancelled/skipped/xfail/xpass +- command +- runner adapter +- scope +- exit code +- duration +- failed test records +- file/line locations +- raw output buffer +- coverage artifact paths + +This enables last-failed, failures-first, summaries, dashboards, and AI-assisted +failure explanation. + +***** No failure parser / navigation layer +Compilation buffers are useful, but the runner should parse common failure +formats and provide: +- next/previous failure +- jump to source line +- failure summary buffer +- copy failure context +- rerun failed test at point +- annotate failing tests in source buffers + +Adapters can provide regexes/parsers for ERT, pytest, Jest/Vitest, Go, Rust, +and shell. + +***** Missing watch/rerun modes +Modern test runners optimize the feedback loop: +- pytest supports selecting tests, markers, last-failed, failures-first, + stepwise, fixtures, xfail/skip, plugins, and cache state. +- Jest/Vitest support watch workflows, changed-file selection, coverage, + snapshots, and rich interactive filtering. Vitest also defaults to watch in + development and run mode in CI. +- Go and Rust runners commonly support package-level runs, regex selection, + race/coverage flags, and cached test behavior. + +The Emacs runner should expose the subset that maps well to editor workflows: +- current test +- current file +- related test file +- focused set +- last failed +- failed first +- changed since git base +- watch current scope +- full project +- coverage for current scope + +**** Proposed Architecture +***** Core Types +Use plain plists initially; promote to =cl-defstruct= only if helpful. + +#+begin_src elisp +;; Test runner adapter +(:id pytest + :name "pytest" + :languages (python) + :detect cj/test-pytest-detect + :discover cj/test-pytest-discover + :build-command cj/test-pytest-build-command + :parse-results cj/test-pytest-parse-results + :capabilities (:current-test :file :project :last-failed :coverage :watch)) + +;; Test run request +(:project-root "/repo/" + :language python + :framework pytest + :scope file + :file "/repo/tests/test_api.py" + :test-name "test_create_user" + :extra-args ("-q") + :profile default) + +;; Test run result +(:run-id "..." + :status failed + :exit-code 1 + :duration 2.14 + :failures (...) + :output-buffer "*test pytest*" + :artifacts (...)) +#+end_src + +***** Adapter Registry +Create a registry like: + +#+begin_src elisp +(defvar cj/test-runner-adapters nil) +(cj/test-register-adapter 'pytest ...) +(cj/test-register-adapter 'ert ...) +(cj/test-register-adapter 'vitest ...) +#+end_src + +Runner selection should consider: +- buffer file extension +- project files +- explicit user override +- available executables +- package manager scripts +- existing Makefile targets + +***** Scope Model +Make scopes explicit and shared across languages: +- =test-at-point= +- =current-file= +- =related-file= +- =focused-files= +- =last-failed= +- =changed= +- =package/module= +- =project= +- =coverage= +- =watch= + +Each adapter can say which scopes it supports. Unsupported scopes should produce +clear user-errors with suggestions. + +***** Command Builder Pipeline +1. Detect project. +2. Detect language/framework candidates. +3. Resolve user-requested scope. +4. Build structured command object. +5. Optionally let user edit command. +6. Run via =compilation-start= or =make-process=. +7. Parse output/result artifacts. +8. Store normalized result. +9. Update UI/modeline/messages/failure buffer. + +***** Keep Makefile Support But Do Not Require It +For this Emacs config, =make test-file= and =make test-name= are useful and +should remain the default Elisp isolated path. But adapter detection should +support: +- direct =emacs --batch= ERT invocation +- =make test= +- =make test-file= +- =make test-name= +- Eask +- Buttercup + +**** Elisp-Specific Improvements +***** Add isolated ERT runs +Support batch commands for: +- all project tests +- one test file +- one test name +- focused files +- last failed, once result parsing exists + +Use the same Makefile targets in this repo, but design the adapter so other +Elisp projects can run without this Makefile. + +***** Support Buttercup/Eask Later +Buttercup uses BDD-style =describe= / =it= suites and is common in Elisp +package testing. Eask is often used to run package tests. Add adapter slots +for these instead of hard-coding ERT forever. + +***** Avoid unnecessary global ERT deletion +=cj/ert-clear-tests= is a pragmatic fix for project contamination, but the +stronger long-term answer is isolated runs plus project-scoped discovery. Keep +the cleanup command, but do not make correctness depend on deleting global ERT +state. + +**** Python / pytest Ideas +- Detect pytest by =pyproject.toml=, =pytest.ini=, =tox.ini=, =setup.cfg=, or + presence of =tests/=. +- Build commands for: + - project: =pytest= + - file: =pytest path/to/test_file.py= + - test at point: =pytest path/to/test_file.py::test_name= + - class method: =pytest path::TestClass::test_method= + - marker: =pytest -m marker= + - last failed: =pytest --lf= + - failed first: =pytest --ff= + - stop after first: =pytest -x= + - coverage: =pytest --cov=...= +- Parse output for failing node ids and =file:line= references. +- Read pytest cache for last-failed where useful. +- Offer marker completion by parsing =pytest --markers= or config files. +- Surface xfail/skip separately from hard failures. + +**** TypeScript / JavaScript Ideas +***** Detection +Detect runner by project files and scripts: +- =vitest.config.ts/js/mts/mjs= +- =jest.config.ts/js/mjs/cjs= +- =package.json= scripts: =test=, =test:watch=, =vitest=, =jest= +- lockfile/package manager: =pnpm-lock.yaml=, =yarn.lock=, =package-lock.json=, + =bun.lockb= + +Prefer project scripts over raw =npx= when present: +- =pnpm test -- path= +- =npm test -- path= +- =yarn test path= +- =bun test path= + +***** Scopes +- current file: =vitest run path= or =jest path= +- test at point: use nearest =it= / =test= / =describe= string and pass =-t= +- watch current file +- changed tests where runner supports it +- coverage current file/project +- update snapshots + +***** Result Parsing +Parse: +- failing test names +- file paths and line numbers +- snapshot failures +- coverage summary + +Treat snapshot updates as an explicit command, not an automatic side effect. +**** Go Ideas +- Detect =go.mod=. +- Current file/source: run package =go test ./pkg=. +- Test at point: nearest =func TestXxx= and run =go test ./pkg -run '^TestXxx$'=. +- Bench at point: nearest =BenchmarkXxx= and run =go test -bench '^BenchmarkXxx$'=. +- Add toggles for =-race=, =-cover=, =-count=1=, =-v=. +- Parse =file.go:line:= output and package failure summaries. + +**** Rust Ideas +- Detect =Cargo.toml=. +- Use =cargo test= by default, optionally =cargo nextest run= when available. +- Current test at point: nearest =#[test]= function. +- Current file/module where possible. +- Integration test file: =cargo test --test name=. +- Support =-- --nocapture= toggle. +- Parse compiler/test failures and =file:line= links. + +**** Shell / Generic Ideas +- Adapter for Makefile targets: + - detect =make test=, =make check=, =make coverage= + - expose project-level commands even when language-specific detection fails +- Adapter for arbitrary project command configured in dir-locals or a project + config plist. +- Let users register custom command templates per project: + +#+begin_src elisp +((:name "unit" + :command ("npm" "run" "test:unit" "--" "{file}")) + (:name "integration" + :command ("pytest" "tests/integration" "-q"))) +#+end_src + +**** UI Ideas +***** Transient Menu +Replace or complement the raw keymap with a =transient= menu: +- scope: current test/file/focused/last failed/project +- runner: auto/ert/pytest/vitest/jest/go/cargo/make +- toggles: watch, coverage, debug, fail-fast, verbose, update snapshots +- actions: run, rerun, edit command, show failures, open report + +***** Result Buffer +Create a normalized =*Test Results*= buffer: +- latest status per project +- command and duration +- pass/fail/skip counts +- failure list with clickable =file:line= +- actions to rerun failed/current/all +- links to coverage artifacts + +***** Modeline / Headerline Signal +Show the last run status for the current project: +- green passed +- red failed +- yellow running +- gray no run + +Keep it quiet and optional. + +***** History +Store recent run requests per project: +- rerun last +- rerun last failed +- choose previous command +- compare duration/status against previous run + +**** Configuration Ideas +- =cj/test-runner-default-scope= +- =cj/test-runner-prefer-isolated-elisp= +- =cj/test-runner-project-overrides= +- =cj/test-runner-known-adapters= +- =cj/test-runner-enable-watch= +- =cj/test-runner-result-retention= +- per-project override through =.dir-locals.el= + +Example: + +#+begin_src elisp +((nil . ((cj/test-runner-project-overrides + . (:adapter pytest + :default-args ("-q") + :coverage-args ("--cov=src")))))) +#+end_src + +**** Safety And Robustness +- Use structured commands until the final boundary. +- Quote only at render time. +- Avoid shell when =make-process= / =process-file= is sufficient. +- Keep command preview/editing available for surprising cases. +- Detect missing executables before running. +- Add timeouts/cancel commands for long-running or hung tests. +- Do not silently fall back from a missing runner to a different runner unless + the fallback is visible in the command preview. +- Avoid mutating global =load-path= permanently. +- Keep remote/TRAMP behavior explicit; do not accidentally run local commands + for remote projects. + +**** Coverage Integration +Tie this into the existing coverage work: +- run coverage for current file/scope +- open latest coverage report +- summarize uncovered lines for current file +- support Elisp SimpleCov/Undercover, pytest-cov, Vitest coverage, Go cover, + and Rust coverage later +- store coverage artifact paths in the normalized run result + +**** AI-Assisted Debugging Ideas +- Summarize failing tests from the parsed failure records and raw output. +- Include command, changed files, failure snippets, and relevant source/test + locations. +- Redact env vars, tokens, Authorization headers, and secrets before sending to + =gptel=. +- Add commands: + - =cj/test-runner-explain-failure= + - =cj/test-runner-suggest-related-tests= + - =cj/test-runner-summarize-coverage-gap= + +**** Migration Plan +***** Phase 1: Internal cleanup +- Fix the task typo and rename current ERT-specific functions or wrap them under + an ERT adapter. +- Move F6 language detection/command construction from =dev-fkeys.el= into + =test-runner.el= or a new =test-runner-core.el=. +- Replace shell-string command builders with structured command plists. +- Fix path containment in =cj/test--do-focus-add-file=. +- Make =cj/test-last-results= real for ERT runs. + +***** Phase 2: ERT adapter +- Implement adapter registry. +- Add ERT adapter with in-process and isolated modes. +- Preserve all current keybindings by routing them through the adapter. +- Add failure/result normalization for ERT. +- Add "rerun last" and "rerun failed" for ERT. + +***** Phase 3: Python and JS/TS adapters +- Add pytest adapter. +- Add Vitest/Jest adapter with package-manager/script detection. +- Support current file and test-at-point for both. +- Add parser/navigation for common failures. + +***** Phase 4: UI and watch modes +- Add transient menu. +- Add result buffer. +- Add cancellation and rerun history. +- Add watch commands where supported. + +***** Phase 5: Coverage and AI +- Connect coverage commands to adapter capabilities. +- Add failure summarization with redaction. +- Add coverage-gap summarization. + +**** Acceptance Criteria For First Fix-Up Pass +- Existing ERT workflow still works. +- F6 and =C-; t= use the same underlying runner API. +- Current-file test command generation is covered for Elisp, Python, Go, + TypeScript, and JavaScript. +- At least one isolated ERT command path exists. +- Path containment checks are robust against sibling-prefix paths and symlinks. +- Runner requests and results are represented as data, not only messages. +- Missing runner/tool errors are clear and actionable. +- Tests cover adapter detection, command building, scope resolution, result + storage, and key interactive paths. + +** TODO [#B] jumper: register collisions and dead-marker errors :bug:solo: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +Two related defects from the 2026-06 config audit: +- =modules/jumper.el:155= — removal shifts the vector without renumbering registers, so a later store allocates a register still held by a surviving location and silently overwrites it. Allocate the first free register char in the live slice; =set-register nil= on removal so freed markers don't pin buffers. +- =modules/jumper.el:117,132= — guards check =(markerp marker)= but not =(buffer-live-p (marker-buffer marker))=; after killing a buffer holding a location, M-SPC SPC and M-SPC j signal wrong-type errors. Treat dead entries as skippable/removable. +Also =jumper.el:178= — the promised single-location toggle never toggles back ('already-there branch should =jump-to-register= z when set). + +** TODO [#B] Keymap consolidation — resolve decisions, run Phase 1-2 :feature:refactor:solo: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +Spec: [[id:540bf06b-16b8-46c6-b459-c40d1b9c795d][keybinding-console-safety-spec-doing.org]]. Phase 0 (revert 4a1ecf64) is done and pushed. Decisions D1-D5 are open TODOs in the spec; D2/D4/D5 gate the primary work (Phase 1 prune via Appendix D, Phase 2 consolidate + retire the translation block), while D1/D3 (the console-safe prefix) gate only the optional Phase 3 and can stay open indefinitely. Resolve D2/D4/D5, then run Phase 1-2. Appendix D is the keybinding pruning checklist. Add a =#+TODO: TODO | DONE SUPERSEDED CANCELLED= header line to the spec if adopting those decision keywords (rulesets convention update, 2026-06-12). + +** TODO [#B] ledger-config is orphaned — ledger-mode never configured :bug:quick: +Nothing requires =modules/ledger-config.el= (verified by grep), so .dat/.ledger/.journal open without ledger-mode, reports, or flycheck-ledger. The module looks finished, not staged (unlike duet-config, which documents its pre-alpha orphaning). Decide: wire into init.el (+ =cj/executable-find-or-warn= for the ledger binary) or delete. From the 2026-06 config audit. + +** TODO [#C] buffer-differs save prompt: 4-way yes/no/diff/cancel :feature:next: +The "buffer differs from file" confirmation currently gives only yes/no. Craig wants a 4-way choice with explicit consequences: yes (be explicit it overwrites), no (be explicit it discards this action and continues), diff (show a graphical difftastic diff, then return to this prompt), cancel (stop the action, leave the buffer untouched). Needs the exact prompt identified first (which save/overwrite path raises "buffer differs") and a design for the diff-then-return loop. difftastic + cj/diff-buffer-with-file infrastructure already exist. From the roam inbox 2026-06-16. +** TODO [#C] emacs: tag tasks by module name for sorting :refactor:studio: +Replace topic tagging with single-word module tags: :studio: for everything under scripts/theme-studio/, module-named tags elsewhere, :multi: for cross-area work. Drop bug/enhancement-style tags since work should be chosen on other bases. This changes the current six-tag convention, so update the priority-scheme section to document it, rewrite the task-audit workflow to reconcile tasks against the module scheme, then run the audit. Queue for end of session. From the roam inbox. ** TODO [#C] Build an Org-native API workspace :feature:test: :PROPERTIES: :LAST_REVIEWED: 2026-06-02 @@ -4180,48 +4334,22 @@ First pass can skip or mark as unsupported: 6. Open scratch buffer (C-; R n), type a request manually, execute 7. which-key shows "REST client" menu under C-; R -** TODO [#C] Migrate from Company to Corfu (with prescient integration) :feature: +** TODO [#C] Build debug-profiling.el module :feature: :PROPERTIES: :LAST_REVIEWED: 2026-06-02 :END: -Spec: [[file:docs/design/company-to-corfu-migration.org][docs/design/company-to-corfu-migration.org]] - -*** TODO [#C] Install corfu-side packages -Add corfu, cape, kind-icon, corfu-prescient to the package list. corfu-popupinfo ships inside corfu. Spec step 1. - -*** TODO [#C] Rewrite selection-framework.el company block as corfu/cape stack -Replace the three company-* use-package blocks (lines 192-226) and company-prescient (240-243) with corfu / cape / corfu-popupinfo / kind-icon / corfu-prescient. Rename the section header Company → Corfu in the same change. Spec steps 2 + 8. - -*** TODO [#C] Swap mail-compose completion disable to corfu -Rewrite cj/disable-company-in-mu4e-compose to (corfu-mode -1) across mu4e-compose, org-msg-edit, and message modes (mail-config.el:319-333). Spec step 3. - -*** TODO [#C] Drop company-ledger for ledger's built-in capf -ledger-config.el: remove company-ledger; verify ledger-complete-at-point registers on completion-at-point-functions, add a ledger-mode-hook capf push only if it doesn't. Spec step 4. - -*** TODO [#C] Drop company-auctex for AUCTeX capf + cape-tex -latex-config.el: remove company-auctex and (company-auctex-init); add cape-tex on TeX-mode-hook. Spec step 5. - -*** TODO [#C] Rewire eshell completion to pcomplete capf -eshell-config.el:163-171: drop company-shell and the company-mode activation; add cape-capf-buster around pcomplete-completions-at-point + corfu-mode. Spec step 6. - -*** TODO [#C] Remove company-mode calls from prog-go/python/webdev -Delete (declare-function company-mode ...) and (company-mode) from the three mode hooks; global-corfu-mode covers them. Spec step 7. +Reusable profiling infrastructure for targeted slow-command investigation. Consolidates scattered profiler bindings (currently in =modules/config-utilities.el=) and adds two pure-helper-backed entry points: "profile next command" and "time region or sexp." Designed via =/brainstorm= 2026-04-26. -*** TODO [#C] Uninstall company packages + recompile -After the rewrite is green: package-delete company, -quickhelp, -box, -prescient, -ledger, -auctex, -shell; make clean && make compile. Spec step 9. +Design: [[id:c713b431-ae14-498d-aba9-b84d52f981b6][docs/specs/debug-profiling-spec.org]] -*** TODO [#C] Tests: corfu activation, mail-disable, capf registration -New tests/test-selection-framework-corfu.el and tests/test-mail-config-corfu-disable.el; update ledger/latex tests to assert their capf registers. Spec Testing section. +Implement via =/start-work= against the design — branch =feat/debug-profiling=, commits decomposed along the test-first split-for-testability boundary. Once shipped, use it as the v1 exercise on the queued [#B] org-capture target-building investigation. -*** 2026-05-16 Sat @ 11:07:24 -0500 Goals -Drop-in replacement for the in-buffer completion stack: =company= → -=corfu=, =company-quickhelp= → =corfu-popupinfo=, =company-box= → -=kind-icon=, =company-prescient= → =corfu-prescient=, plus =cape= for -the file/keyword/dabbrev capfs that =company-files= / =company-keywords= -used to handle. Per-module fixups for ledger, AUCTeX, eshell, mu4e -compose, and the three =prog-*= modules. See the design doc for the -full translation table, migration steps, tests, and risks. +** TODO [#C] Evaluate jamescherti essential-emacs-packages list :quick: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-11 +:END: +Review [[https://www.jamescherti.com/essential-emacs-packages/][James Cherti's essential Emacs packages]] for anything worth installing. Cross-check each candidate against what is already in the config (=modules/= + =init.el=), skip the ones already present, and shortlist the genuinely new ones with a one-line rationale. Future-installation research, not a commitment to install. ** TODO [#C] Extend F2 "preview" convention across modes :feature: :PROPERTIES: @@ -4237,205 +4365,152 @@ F2 is the universal preview key. Currently bound only in markdown-mode (markdown Keep the binding mode-local so F2 stays available as a global candidate where no preview makes sense. -** TODO [#C] Localrepo Documentation :feature: -:PROPERTIES: -:LAST_REVIEWED: 2026-06-05 -:END: +** TODO [#C] face-diagnostic: face-name buttons + header allowlist :feature: +Two v1 follow-ups on the shipped face/font diagnostic: render the face names in the report as buttons that call describe-face (the spec's "For the user" buttons; v1 shows them as plain text), and add face-diagnostic to the module-header allowlist in tests/test-init-module-headers.el now that it's required in init.el. Spec: [[id:98f065cf-8bd5-46a0-ac24-da94d66855ad][face-font-diagnostic-popup-spec-implemented.org]]. +** TODO [#C] Gold text in auto-dimmed buffers :bug: +Some auto-dimmed document buffers render text in gold; source unknown. Likely a face-remapping or overlay interaction with the theme. Blocked on the face/font diagnostic tool above for diagnosis. From the roam inbox. +** TODO [#C] Google Contacts ↔ org-contacts sync investigation :feature: +From the 2026-06-11 brainstorm. Goal: keep [[file:~/sync/org/contacts.org][contacts.org]] (real org-contacts: PROPERTIES drawers, mu4e completion, org-roam links) in sync with Google Contacts. Google side is solid — official People API (OAuth2, incremental syncToken) or CardDAV; no ToS risk. The hard parts are local: (1) identity — entries have no UID, so two-way needs a GOOGLE_ID property per entry plus a one-time fuzzy reconciliation of the two populated datasets (name/email/phone matching); (2) field mapping — space-separated multi-email in one property, free-text body notes, inconsistent phone formats (normalization decision); (3) conflict policy. First decision gates the rest: one-way Google→org read model (simple) vs true two-way. Candidate architectures: vdirsyncer (proven two-way engine w/ Google support; build only the vCard↔org translation, evaluate org-vcard fidelity) vs a direct People API script with sync state in org properties. Output: recommendation doc in docs/design/ naming direction + the normalization/conflict decisions for Craig. Not :solo: — the one-way-vs-two-way call and normalization policy are Craig's. -Audit on 2026-05-27 found the localrepo build half is shipped (=.localrepo/= holds 185 entries; =early-init.el= L135–165 wires the priority-200 pin above the local ELPA-mirror tier at 120–125 and the online fallback). The remaining "document limitations" half splits into one docs-set plus four gap-fix follow-ups that the docs cross-reference. +** TODO [#C] Google Voice in Emacs — SMS + dialer investigation :feature: +From the 2026-06-11 messenger-unification brainstorm. Google Voice has no official API; the viable routes ride the Matrix bridge ecosystem's reverse engineering (mautrix-gvoice). Research pass to establish the 2026 state of play: (1) is mautrix-gvoice healthy and what does its auth flow look like now; (2) any better-maintained alternative (CLI/daemon) for the signel-pattern architecture (external daemon + JSON-RPC + thin Emacs chat client); (3) does call initiation (ring-linked-phone-then-connect, Emacs as dialer) survive in the current protocol — two-way audio in Emacs is out of scope (WebRTC); (4) ToS/account-flag risk assessment for Craig's account. Output: a recommendation doc in docs/design/ naming the architecture (signel-pattern daemon vs Matrix bridge + ement.el) or a no-go with reasons. If go, GV becomes a registered backend under the messenger-unification convention (see the [#B] task below). -Docs land in three artifacts. =docs/design/localrepo.org= carries the full architecture (tier model, install path, refresh story, all four limitations with pointers to the follow-up tasks). =.localrepo/README.org= sits next to the artifact as the user-facing entry — a short summary that survives even if =early-init.el= moves. =early-init.el= grows a commentary header that points at the README, not at the design doc — the README is what future-Craig hits first. +** TODO [#C] latexmk workflow never activates (two breaks) :bug:quick:solo: +=modules/latex-config.el:66= — =:hook (TeX-mode-hook . ...)= gets use-package's =-hook= suffix appended (unbound symbol not ending in =-mode=), registering on nonexistent =TeX-mode-hook-hook=, so =TeX-command-default "latexmk"= is never set. Independently =:80= auctex-latexmk is =:defer t= with no trigger, so =auctex-latexmk-setup= never runs and "latexmk" isn't in TeX-command-list. Fix hook name to =TeX-mode=; change auctex-latexmk to =:after tex=. From the 2026-06 config audit. -The four limitations the docs cover (each spun out below as its own task): -- Treesitter grammars (downloaded by =treesit-auto= on first use; not in the localrepo) -- Native-comp =.eln= cache (Emacs-version-specific; invalidated by version bumps) -- System-tool deps (=ripgrep=, =fd=, =pandoc=, =prettier=, =pyright=, etc.; flagged at load by =cj/executable-find-or-warn=, not packageable via =package.el=) -- Refresh / update story (no dedicated script today; ad-hoc =cp= from the elpa mirrors) -*** TODO [#C] Design doc — docs/design/localrepo.org -Write the design doc: tier model, priorities, install path, refresh story, all four limitations with cross-links to the follow-up tasks below. -*** TODO [#C] README — .localrepo/README.org -Write the README at the artifact: short prose entry point summarizing the tier model, pointing at =docs/design/localrepo.org= for full detail. This is what =early-init.el='s commentary header links to. -*** TODO [#C] Commentary header in early-init.el -Add a Commentary-section header in =early-init.el= pointing at =.localrepo/README.org= for usage and =docs/design/localrepo.org= for architecture. Sits at the top of the localrepo block (around L130). -** TODO [#C] TRAMP/dirvish "?" for remote dates — verify the fix per host :bug: +** TODO [#C] Org-noter custom workflow — fix and finish :feature:bug: :PROPERTIES: :LAST_REVIEWED: 2026-06-02 :END: -Root cause is traced (see the dated investigation entry below). What's left needs a live remote: open each remote host in dirvish and run the three diagnostic evals to find which gate is closed, then close it. - -Diagnostics (run with point in a remote dirvish buffer): -- =M-: (dirvish-prop :remote-async)= — nil means =tramp-direct-async-process-p= is failing for this method/host, so dirvish's remote attribute fetch never runs. -- =M-: (dirvish-prop :gnuls)= — nil means the remote has no GNU =ls= (the =ls --version= probe failed), so the parser gate stays shut. Likely on truenas (FreeBSD). -- =M-: (tramp-direct-async-process-p)= — confirms whether direct-async is actually active for the connection. - -Likely fixes, by which gate is closed: -- =:gnuls= nil → install GNU coreutils on the remote (FreeBSD: =pkg install coreutils=) and make =ls= resolve to GNU on the TRAMP path, or accept "?" on that host. +Continue debugging and testing the custom org-noter workflow from 2025-11-21 session. +This is partially implemented but has known issues that need fixing before it's usable. - - Constraint: nothing gets installed on the remote host, so the =:gnuls= gate is resolved by accepting "?" on that host rather than installing coreutils. -- =:remote-async= nil → the scp/sshx method isn't advertising direct-async; switch to a method that supports it or check =tramp-direct-async-process= is taking effect for that protocol. +*Last worked on:* 2025-11-21 +*Current status:* Implementation complete but has bugs, needs testing -Files involved: =modules/tramp-config.el=, =modules/dirvish-config.el=. +*Known issues to fix:* -*** 2026-05-22 Fri @ 20:24:44 -0500 Traced the root cause through dirvish source -Remote dates/sizes don't come from the dired =ls= listing or =dired-listing-switches=. They come from =dirvish-data-for-dir= (=dirvish-tramp.el:95=), which runs =ls -1lahi= on the remote and parses the columns into the attribute cache. That method only fires when both =(dirvish-prop :remote-async)= is a number and =(dirvish-prop :gnuls)= is a string. When either gate is shut, dirvish falls back to its default, which deliberately skips =(file-attributes f-name)= for remote files (=dirvish.el:904=, a perf guard) — leaving attrs nil, so the file-size and file-time widgets render "?" (=dirvish-widgets.el:216,247=). +1. /Double notes buffer appearing when pressing 'i' to insert note/ + - When user presses 'i' in document to insert a note, two notes buffers appear + - Expected: single notes buffer appears + - Need to debug why the insert-note function is creating duplicate buffers -That explains why every prior fix missed: dired-listing-switches feed a different code path entirely, and disabling =tramp-direct-async-process= shuts the =:remote-async= gate, which is the one path that populates remote attributes — exactly backwards. The config already enables direct-async for ssh/sshx (=tramp-config.el:79-88=), so the remaining closed gate is per-host: =:gnuls= (no GNU ls on FreeBSD-based truenas) or direct-async not taking effect for the method. Could not verify on a live remote from the work session — handed the per-host diagnostics up into the task body. +2. /Toggle behavior refinement needed/ + - The toggle between document and notes needs refinement + - May have edge cases with window management + - Need to test various scenarios -** TODO [#C] Terminal GPG pinentry Completion :feature: -:PROPERTIES: -:LAST_REVIEWED: 2026-06-05 -:END: +*Testing needed:* -Audit on 2026-05-27 found no trace of the =terminal-pinentry= branch on this machine: no local or remote ref, no reflog entry across 732 entries reaching back through January, no stash, no dangling commit, no sibling worktree. The 2026-01-24 session log says the branch was created that day, but the work either lived on another machine or was deleted before reaching here. The original task above (=Finish terminal GPG pinentry configuration=) is superseded by this one. +1. /EPUB files/ - Test with EPUB documents (primary use case) +2. /Reopening existing notes/ - Verify it works when notes file already exists +3. /Starting from notes file/ - Test opening document from an existing notes file +4. /PDF files/ - Verify compatibility with PDF workflow +5. /Edge cases:/ + - Multiple windows open + - Splitting behavior + - Window focus after operations -Surviving footprint on this machine: one commented line at =modules/auth-config.el:83= (=;; (setq epa-pinentry-mode 'loopback)=). The hook point =env-terminal-p= exists in =modules/host-environment.el:97=. Everything else (terminal-vs-GUI branching in the epa =:config=, external pinentry wiring for GUI, =GPG_TTY= export, tests) is to be written fresh off main. +*Implementation files:* +- =modules/org-noter-config.el= - Custom workflow implementation +- Contains custom functions for document/notes toggling and insertion -Goal: in terminal Emacs, GPG passphrase prompts land in the minibuffer via loopback mode; in GUI Emacs, prompts go to the existing external pinentry. +*Context:* +This custom workflow is designed to make org-noter more ergonomic for Craig's reading/annotation +workflow. It simplifies the toggle between document and notes, and streamlines note insertion. +The core functionality is implemented but needs debugging before it's production-ready. -Open: confirm the GUI pinentry tool (2026-01-24 notes named =pinentry-dmenu=; current =auth-config.el= names no pinentry program, leaving it to =gpg-agent='s config). Also worth checking whether the =terminal-pinentry= branch survives on the laptop and should be pulled here rather than rewritten. +**Next Steps:** +1. Debug the double buffer issue when pressing 'i' +2. Test all scenarios listed above +3. Refine toggle behavior based on testing +4. Document the final keybindings and workflow -*** TODO [#C] env-terminal-p branch in epa :config :feature: -Inside the epa =use-package= =:config= in =modules/auth-config.el=, set =epa-pinentry-mode= to ='loopback= when =(env-terminal-p)=, else leave the external pinentry path active. Replace the lone commented line at =auth-config.el:83=. +** TODO [#C] Pick and wire a debug backend for F5 :feature: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-01 +:END: -*** TODO [#C] GPG_TTY export for terminal sessions :feature: -When =(env-terminal-p)=, =(setenv "GPG_TTY" (shell-command-to-string "tty"))= so gpg-agent can target the controlling tty. Guard against a non-tty stdin. +#+begin_src emacs-lisp + Give me an idea of the amount of work and complexity and what allows for a consistent UX across languages. +#+end_src -*** TODO [#C] gpg-agent updatestartuptty refresh in terminal :feature: -The current =call-process= to "gpg-connect-agent updatestartuptty /bye" runs unconditionally; keep it for GUI, and re-fire it on terminal entry so the agent re-binds to the current tty. +*** 2026-05-15 Fri @ 19:19:21 -0500 Inital Goals +Bind F5 globally to a debug entry point. Backend choice is the hard part: -*** TODO [#C] ERT tests for terminal vs GUI pinentry branching :test: -Test that with =env-terminal-p= stubbed t, =epa-pinentry-mode= resolves to ='loopback= after =auth-config= loads; with it stubbed nil, the loopback setting is not applied. Use =cl-letf= around =env-terminal-p=; cover normal, boundary (=epa= already loaded), error (=gpg-connect-agent= missing). +- dape (Debug Adapter Protocol for Emacs) — modern, multi-language via DAP. Single UX across Python, Go, TS, Rust, etc. Less mature than DAP clients in other editors. +- realgud — wraps multiple debuggers (pdb, gdb, node --inspect, etc.). More mature; UX varies by backend. +- Language-specific stacks — dap-mode (python-mode + dap), delve for go, ts-node --inspect, etc. Best per-language UX; most config work. -*** TODO [#C] Minibuffer prompt in real terminal Emacs -=emacs -nw=, open an encrypted file or trigger an auth-source decrypt, confirm the passphrase prompt lands in the minibuffer rather than failing on missing pinentry. +F5 itself will be simple (start/resume debug). Likely modifier variants once the backend is picked: +- C-F5 toggle breakpoint at point +- M-F5 eval expression in debug context (or step-over shortcut) -*** TODO [#C] External pinentry still fires in GUI Emacs -Restart the daemon, open a GUI frame, trigger an encrypted decrypt, confirm =pinentry-dmenu= (or whatever GUI pinentry is configured) still appears. +Evaluate against these projects' languages: elisp (edebug already works), Python, Go, TS, shell. Shell debug is usually print-based; skip. -*** TODO [#C] Archive the original L3813 task -After this work lands, mark the original "Finish terminal GPG pinentry configuration" task DONE with a =CLOSED:= stamp and a one-line note pointing at this parent task. +Do this after the F-key rework ticket ships so F5 is the only hole left. -** TODO [#C] Google Contacts ↔ org-contacts sync investigation :feature: -From the 2026-06-11 brainstorm. Goal: keep [[file:~/sync/org/contacts.org][contacts.org]] (real org-contacts: PROPERTIES drawers, mu4e completion, org-roam links) in sync with Google Contacts. Google side is solid — official People API (OAuth2, incremental syncToken) or CardDAV; no ToS risk. The hard parts are local: (1) identity — entries have no UID, so two-way needs a GOOGLE_ID property per entry plus a one-time fuzzy reconciliation of the two populated datasets (name/email/phone matching); (2) field mapping — space-separated multi-email in one property, free-text body notes, inconsistent phone formats (normalization decision); (3) conflict policy. First decision gates the rest: one-way Google→org read model (simple) vs true two-way. Candidate architectures: vdirsyncer (proven two-way engine w/ Google support; build only the vCard↔org translation, evaluate org-vcard fidelity) vs a direct People API script with sync state in org properties. Output: recommendation doc in docs/design/ naming direction + the normalization/conflict decisions for Craig. Not :solo: — the one-way-vs-two-way call and normalization policy are Craig's. +** TODO [#C] Review and rebind M-S- keybindings :refactor: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-01 +:END: -** TODO [#C] Google Voice in Emacs — SMS + dialer investigation :feature: -From the 2026-06-11 messenger-unification brainstorm. Google Voice has no official API; the viable routes ride the Matrix bridge ecosystem's reverse engineering (mautrix-gvoice). Research pass to establish the 2026 state of play: (1) is mautrix-gvoice healthy and what does its auth flow look like now; (2) any better-maintained alternative (CLI/daemon) for the signel-pattern architecture (external daemon + JSON-RPC + thin Emacs chat client); (3) does call initiation (ring-linked-phone-then-connect, Emacs as dialer) survive in the current protocol — two-way audio in Emacs is out of scope (WebRTC); (4) ToS/account-flag risk assessment for Craig's account. Output: a recommendation doc in docs/design/ naming the architecture (signel-pattern daemon vs Matrix bridge + ement.el) or a no-go with reasons. If go, GV becomes a registered backend under the messenger-unification convention (see the [#B] task below). +Changed from M-uppercase to M-S-lowercase for terminal compatibility. +These may override useful defaults - review and pick better bindings: +- M-S-b calibredb (was overriding backward-word) +- M-S-c time-zones (was overriding capitalize-word) +- M-S-d dwim-shell-menu (was overriding kill-word) +- M-S-e eww (was overriding forward-sentence) +- M-S-f fontaine (was overriding forward-word) +- M-S-h split-below +- M-S-i edit-indirect +- M-S-k show-kill-ring (was overriding kill-sentence) +- M-S-l switch-themes (was overriding downcase-word) +- M-S-m kill-all-buffers +- M-S-o kill-other-window +- M-S-r elfeed +- M-S-s window-swap +- M-S-t toggle-split (was overriding transpose-words) +- M-S-u winner-undo (was overriding upcase-word) +- M-S-v split-right (was overriding scroll-down) +- M-S-w wttrin (was overriding kill-ring-save) +- M-S-y yank-media (was overriding yank-pop) +- M-S-z undo-kill-buffer (was overriding zap-to-char) -** TODO [#C] latexmk workflow never activates (two breaks) :bug:quick:solo: -=modules/latex-config.el:66= — =:hook (TeX-mode-hook . ...)= gets use-package's =-hook= suffix appended (unbound symbol not ending in =-mode=), registering on nonexistent =TeX-mode-hook-hook=, so =TeX-command-default "latexmk"= is never set. Independently =:80= auctex-latexmk is =:defer t= with no trigger, so =auctex-latexmk-setup= never runs and "latexmk" isn't in TeX-command-list. Fix hook name to =TeX-mode=; change auctex-latexmk to =:after tex=. From the 2026-06 config audit. +** TODO [#C] Slack message buffers in a reused popup window :quick: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-05 +:END: +Display slack.el message and thread buffers in a dedicated popup window (side or bottom) and reuse that one window instead of spawning a new window per buffer. Likely a =display-buffer-alist= rule (or popper integration) in =modules/slack-config.el=. -** TODO Manual testing and validation -Exercised once the phases above land. -*** TODO org-capture quick-capture popup behaves correctly -What we're verifying: the Hyprland Super+Shift+N popup is single-window, offers only the sensible templates, files to the inbox, and never orphans its frame (archsetup request, 2026-06-12; fix in modules/org-capture-config.el, live in the daemon). The menu-subset / inbox-target / abort-close parts need archsetup's one-line script change to call cj/quick-capture (note sent 2026-06-12); the single-window part is live regardless. -- Press Super+Shift+N to open the quick-capture popup -- The *Org Select* menu should fill the frame as one window (no top sliver of your last-visited buffer, one modeline) and list only Task / Bug / Event -- Pick Task (t): the CAPTURE buffer also fills the frame as one window; finishing with C-c C-c files it to the global inbox under "Inbox" (not a project's todo.org) -- Re-open and pick Event (e): it prompts for a date and files to the schedule -- Re-open and hit q (or C-g) at the menu: the popup frame closes (no orphan) -Expected: single window at every step; menu limited to Task/Bug/Event; Task/Bug land in the inbox; aborting at the menu closes the frame; the frame still closes on normal finalize and C-c C-k. -*** 2026-06-11 Thu @ 18:29:39 -0500 Verified UI-face preview and contrast survive a ground bg change -Craig walked the repro: mode-line with its own fg/bg kept its preview bg and ratio through a ground change; ground-dependent rows re-rated; package-faces contrast column updated. Pass. Closed the [#A] contrast-cell and [#B] preview-bg parents. -*** 2026-06-11 Thu @ 18:29:39 -0500 Verified seeded package-face defaults, with steel tuning -Craig read org/magit/elfeed against the ground. Pass with tuning: steel reads a bit dark — flipped to steel+1 on magit (better), but org wanted darker; these are updated selections, NOT final — he expects to adjust many more before the theme ships. His export saved to scripts/theme-studio/theme.json (replaced the 2026-06-09 state, prior version in git at 4f2d00eb). Side find: the org preview's heading-three ↔ headline-todo flash linkage is cross-wired — filed as its own bug task. -*** 2026-06-11 Thu @ 18:29:39 -0500 Verified large face tables stay usable -Craig scrolled the org table, filtered on "agenda", reassigned a face — grouping, narrowing, and live preview update all behaved. Pass. -*** 2026-06-11 Thu @ 18:29:39 -0500 Verified perceptual readouts in the picker -Craig validated the readouts against computed reference values (default fg #f0fef0 on ground #000000: APCA Lc -104.7 / WCAG 20.14; keyword blue #67809c: Lc -33.7 / WCAG 5.14 — negative polarity correct for light-on-dark). Legible, uncrowded. Pass. Side find filed separately: the picker panel itself blends into the page background ([#C] picker-visibility task). -*** 2026-06-11 Thu @ 18:29:39 -0500 Verified ΔE warnings read clearly -Craig built a near-duplicate pair and a well-spread palette: the close pair was named with its ΔE, sorted closest-first with the cap behaving; no warning on the spread palette. Pass. -*** TODO OKLCH editor feels right -What we're verifying: the OKLCH sliders / C×L plane edit cleanly and clamping is visible. -- Switch the picker to OKLCH mode and drag L, then C, then H -- Push chroma past the sRGB gamut, then toggle the AA/AAA mask -Expected: each axis moves independently; the C×L plane (once 4b lands) opens on the current color; "chroma clamped to sRGB" shows on clamp; toggling the mask does not reset OKLCH mode. -*** TODO Generated ramp harmonizes -What we're verifying: a ramp generated from a base color reads as one family, not a grab-bag (the aesthetic the math is meant to produce). -- Open =scripts/theme-studio/theme-studio.html= in Chrome -- Pick a mid-lightness base swatch (e.g. a blue) and generate its ramp at the defaults -- Read the row of steps left to right, then try a near-black and a near-white base -Expected: the steps share an obvious hue and step evenly in lightness; the chroma-ease keeps the extreme steps from going muddy or garish; nothing looks like it belongs to a different color. -*** TODO Safe-lightness guidance reads clearly -What we're verifying: the L_max marker and unsafe-band shade are legible and land in the right place when editing a covered face. -- Open the picker in OKLCH mode on region (or hl-line), with syntax colors assigned -- Read the L_max marker and the shaded unsafe band on the lightness slider -- Drag lightness up toward and past the marker -Expected: the marker is visible and correctly placed, the band above it reads as "unsafe," and crossing it is obvious; an out-of-scope face shows no marker. -*** TODO Safe tint actually reads in real Emacs -What we're verifying: a background tint the tool calls safe really keeps every token readable behind real syntax-colored text — the whole point of the worst-case floor. -- In the tool, set a covered face (e.g. region) to a tint at or just below its L_max with the worst-case readout showing PASS -- Build the theme and load it in Emacs, open a code buffer with varied syntax, and select a region spanning many token colors -- Read every token through the region highlight, paying attention to the limiting foreground the tool named -Expected: every token stays readable over the tint, including the limiting one; a tint pushed just past L_max (readout FAIL) shows a visibly strained or unreadable token, confirming the floor matches reality. -*** TODO Color families group the way the eye reads them -What we're verifying: the OKLCH hue clustering (25° gap) splits and merges families the way you'd expect, and renaming never moves a color. -- Open =scripts/theme-studio/theme-studio.html= in Chrome and load a real theme (e.g. sterling) -- Read the strips top to bottom: are "the blues" one strip, "the greens" another, neutrals and ground pinned at the top -- Find a pair you'd consider one family that landed in two strips (or two you'd consider separate that merged) -- Rename any swatch to something absurd and confirm it stays in the same strip -Expected: families match your mental grouping; the few that don't are the cue to revisit the 25° gap; renaming never regroups. -*** TODO Regenerate-replace reads as deliberate -What we're verifying: the count control clearly signals it rewrites the whole family, so replacing hand-added same-hue colors isn't a surprise. -- Add two unrelated colors at a similar hue so they share a strip -- Set that strip's count to 2 -- Watch what happens to the two colors -Expected: the strip becomes a clean base±2 ramp, the two loose colors are gone, and the control made it obvious that's what it would do before you committed. -*** TODO Removed-step references read clearly as "(gone)" -What we're verifying: lowering a family's count leaves a referencing face visibly stale, not silently re-pointed. -- Assign a UI or syntax element to an outer step of a family (e.g. region = a blue+3) -- Lower that family's count to 2 so blue+3 disappears -- Read the assignment's dropdown -Expected: the dropdown shows "(gone)" for the removed step, never a silent jump to a different color; re-pointing it is a deliberate choice. -*** TODO Calibre bookmark default name is "Author, Title" -What we're verifying: a new nov bookmark takes the "Author, Title" form parsed from the filename, not the raw EPUB filename. -- Open an EPUB in Calibre (nov buffer). -- Hit m to set a bookmark. -Expected: the default bookmark name is "Author, Title" (underscores stripped, colon restored), e.g. "Agatha Christie, The A.B.C. Murders". +** TODO [#C] the preview splits an already split window into 3 temporarily. :bug: +looks strange. potentially problematic for ai-terms. -*** TODO Calibre curated ? menu and docked description -What we're verifying: the curated ? transient, the docked description, and the full dispatch all work in a live calibredb buffer. -- In a calibredb search buffer, press ? and confirm the curated menu (library / filter / sort / open / describe) appears. -- Press d or v to dock the selected book's description in a bottom-30% buffer; press q to dismiss it. -- Press H and confirm calibredb's full dispatch opens. -Expected: ? shows the curated menu, d/v dock the description (q dismisses), H opens the full calibredb dispatch. +** TODO [#C] TRAMP/dirvish "?" for remote dates — verify the fix per host :bug: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-02 +:END: -*** TODO Signel: real incoming message raises a toast through the notify script -What we're verifying: the full receive path (signal-cli → signel --handle-receive → cj/signel--notify → notify script) fires on a real message. -- Make sure you are NOT viewing the sender's chat buffer. -- Have a real message sent to you on Signal (or send one from your phone to a second device thread that lands here). -Expected: a transient info toast titled "Signal: <sender>" with the message text (one line, truncated if long), no sound. +Root cause is traced (see the dated investigation entry below). What's left needs a live remote: open each remote host in dirvish and run the three diagnostic evals to find which gate is closed, then close it. -*** TODO Signel: actively-viewed chat stays quiet -What we're verifying: the suppression predicate gates the toast when you're reading that chat. -- Open the sender's chat buffer (=C-; M m=) and keep it the selected window in a focused frame. -- Have the same sender message you again. -Expected: the message renders in the buffer, but no desktop toast appears. +Diagnostics (run with point in a remote dirvish buffer): +- =M-: (dirvish-prop :remote-async)= — nil means =tramp-direct-async-process-p= is failing for this method/host, so dirvish's remote attribute fetch never runs. +- =M-: (dirvish-prop :gnuls)= — nil means the remote has no GNU =ls= (the =ls --version= probe failed), so the parser gate stays shut. Likely on truenas (FreeBSD). +- =M-: (tramp-direct-async-process-p)= — confirms whether direct-async is actually active for the connection. -*** TODO Project-aware capture files into the right todo.org -What we're verifying: C-c c t and C-c c b file into the current projectile project's todo.org under its "<Project> Open Work" header, and fall back to the global inbox outside a project. -- Inside a projectile project that has a todo.org, run C-c c t (Task), capture a test entry, and confirm it lands under "<Project> Open Work". -- Run C-c c b (Bug) similarly and confirm it lands as "* TODO [#C] ..." under the same header. -- Run a capture from outside any project (or a project with no todo.org) and confirm the global-inbox fallback with a warning. -Expected: in-project captures land in that project's Open Work; out-of-project captures fall back to the global inbox with a warning. +Likely fixes, by which gate is closed: +- =:gnuls= nil → install GNU coreutils on the remote (FreeBSD: =pkg install coreutils=) and make =ls= resolve to GNU on the TRAMP path, or accept "?" on that host. -** TODO [#D] theme-studio per-tier reseed controls :feature: -Deferred from the seeding-engine spec (vNext). V1 reseeds all three guide-owned tiers at once; later consider separate "reseed syntax", "reseed UI", and "reseed package/org" controls if all-at-once proves too blunt. Spec: [[file:docs/design/theme-studio-seeding-engine-spec.org][spec]] (vNext; review folded in 2026-06-08). -** TODO [#D] theme-studio low-contrast preset/mask mode :feature: -Deferred from the perceptual color metrics spec (vNext). After raw OKLCH/APCA/DeltaE readouts exist, decide whether to add a named low-contrast workflow: APCA Lc bands, a contrast ceiling/floor mask, or a "soft" sibling to the existing any/AA+/AAA picker mask. Spec: [[file:docs/design/theme-studio-perceptual-color-metrics-spec.org][spec]] (vNext candidates; review folded in 2026-06-08). -** TODO [#D] theme-studio CIEDE2000 DeltaE option :feature: -Deferred from the perceptual color metrics spec (vNext). v1 uses DeltaE-OK on its native scale with a 0.02 threshold (decided); revisit CIEDE2000 only if the native OKLab scale proves too unfamiliar or poorly calibrated for palette distinguishability. Spec: [[file:docs/design/theme-studio-perceptual-color-metrics-spec.org][spec]] (vNext candidates; review folded in 2026-06-08). -** TODO [#D] Treesitter grammar offline cache :feature: -Treesitter grammars are downloaded by =treesit-auto= on first use and live outside the localrepo. For true offline reproducibility, cache the grammars next to the localrepo (a =.localrepo/treesitter/= tier, or a separate mirror script). Cross-linked from =docs/design/localrepo.org=. + - Constraint: nothing gets installed on the remote host, so the =:gnuls= gate is resolved by accepting "?" on that host rather than installing coreutils. +- =:remote-async= nil → the scp/sshx method isn't advertising direct-async; switch to a method that supports it or check =tramp-direct-async-process= is taking effect for that protocol. -** TODO [#D] Native-comp .eln cache strategy :feature: -The native-comp =.eln= cache is Emacs-version-specific; an Emacs upgrade invalidates everything. Document the cache location, what an upgrade triggers, and whether a warm-the-cache script is worth shipping. Cross-linked from =docs/design/localrepo.org=. +Files involved: =modules/tramp-config.el=, =modules/dirvish-config.el=. -** TODO [#D] System-tool dependency install script :feature: -=ripgrep=, =fd=, =pandoc=, =prettier=, =pyright=, and other binaries that =cj/executable-find-or-warn= flags at module load are not in =package.el='s reach. Document the required-tool set and ship a setup script (or =pacman=/=apt= invocation set). Cross-linked from =docs/design/localrepo.org=. +*** 2026-05-22 Fri @ 20:24:44 -0500 Traced the root cause through dirvish source +Remote dates/sizes don't come from the dired =ls= listing or =dired-listing-switches=. They come from =dirvish-data-for-dir= (=dirvish-tramp.el:95=), which runs =ls -1lahi= on the remote and parses the columns into the attribute cache. That method only fires when both =(dirvish-prop :remote-async)= is a number and =(dirvish-prop :gnuls)= is a string. When either gate is shut, dirvish falls back to its default, which deliberately skips =(file-attributes f-name)= for remote files (=dirvish.el:904=, a perf guard) — leaving attrs nil, so the file-size and file-time widgets render "?" (=dirvish-widgets.el:216,247=). -** TODO [#D] Localrepo refresh / update script :feature: -No dedicated update path today — refreshing a pinned package means ad-hoc =cp= from the local elpa mirrors. Document the current shape and decide whether a =scripts/refresh-localrepo.sh= is worth writing. Cross-linked from =docs/design/localrepo.org=. +That explains why every prior fix missed: dired-listing-switches feed a different code path entirely, and disabling =tramp-direct-async-process= shuts the =:remote-async= gate, which is the one path that populates remote attributes — exactly backwards. The config already enables direct-async for ssh/sshx (=tramp-config.el:79-88=), so the remaining closed gate is per-host: =:gnuls= (no GNU ls on FreeBSD-based truenas) or direct-async not taking effect for the method. Could not verify on a live remote from the work session — handed the per-host diagnostics up into the task body. ** TODO [#D] Dashboard over-scroll: pin last line to window bottom :bug: :PROPERTIES: @@ -4465,6 +4540,266 @@ Findings from the 2026-05-20 investigation: navigation commands. - Live experiment scratch file: =~/dashboard-overscroll-experiment.el=. +** TODO [#D] Emacs Packages — Curl-Friendly Web Service Wrappers +Ideas for new Emacs packages following the same pattern as wttrin: HTTP GET to a simple web service, render results in a buffer, optionally show summary in the mode-line. All of these share the async fetch + caching infrastructure already proven in wttrin. +Captured On: [2026-04-04 Sat] +*** TODO Stock Market / Finance Package (Finnhub or Alpha Vantage) +Build a stock watchlist and quote viewer for Emacs. User defines a list of symbols; package fetches quotes and renders a formatted table in a dedicated buffer. Optional mode-line ticker showing one or more symbols rotating on a timer. + +**** Features +- Customizable watchlist: user defines a list of stock symbols in a defcustom; package fetches and displays all of them in a single buffer +- Formatted quote table: symbol, company name, current price, daily change (absolute and percent), volume — color-coded green/red for gains/losses +- ASCII sparkline charts: inline mini-charts showing intraday or multi-day price movement using Unicode block characters (▁▂▃▅▇ style) +- Mode-line ticker: rotating display of one or more symbols with price and change indicator, similar to wttrin's weather widget — click to open the full watchlist buffer +- Detail view: press RET on a symbol to see extended data — open/high/low/close, 52-week range, market cap, P/E ratio (data availability depends on backend) +- Auto-refresh with market awareness: background timer fetches new data during market hours; pauses on weekends and after-hours to conserve API calls +- Unit/currency preference: display prices in local currency if the backend supports it +- Cache layer: same pattern as wttrin — serve cached data instantly, refresh in background, show staleness indicator when data is old +- Interactive symbol lookup: ~M-x stock-add-symbol~ with completion against a symbol database or search endpoint + +**** What you'd learn +- JSON parsing in elisp (~json-parse-buffer~, ~json-read~) — these APIs return JSON, not plain text, so this is the main new skill vs. wttrin +- ASCII chart rendering — drawing sparklines or simple price charts with Unicode block characters in a buffer +- API key management in elisp — storing keys in ~auth-source~ or custom variables, passing them as query params + +**** Where the complexity lives +- Rendering: No pre-formatted ASCII comes back from the API. You'd build the table layout and any chart visualization yourself. This is the bulk of the work. +- Market hours awareness: Knowing when to fetch (pre-market, regular, after-hours, weekends) to avoid wasting API calls. +- Rate limiting: Free tiers are tight. Finnhub gives 60 calls/min which is generous; Alpha Vantage gives only 25/day on the free tier. Caching strategy matters more here than in wttrin. + +**** Candidate backends +- Finnhub (finnhub.io): Free API key, 60 calls/min, real-time US quotes. JSON only. Best rate limit of the free options. +- Alpha Vantage (alphavantage.co): Free API key, 25 calls/day. Supports CSV output which is trivial to parse — no JSON needed. Good for daily summaries, bad for frequent polling. +- Twelve Data (twelvedata.com): Free key, 800 calls/day, 8/min. Covers stocks, forex, crypto, ETFs. JSON and CSV. + +**** Downsides +- API key requirement adds friction for users (signup, config). Not as frictionless as wttrin. +- Rate limits mean you can't poll aggressively. Stale data is the norm on free tiers. +- Financial APIs change or shut down. Yahoo Finance's unofficial API has broken repeatedly over the years. Even paid services deprecate endpoints. Expect maintenance. +- Finnhub and Alpha Vantage are US-market-centric. International coverage varies. + +**** Effort: Medium-High +The fetch/cache layer is straightforward (reuse wttrin patterns). The rendering layer (tables, charts, color-coding gains/losses) is where most of the time goes. Expect this to be a real project, not a weekend hack. + +**** Name candidates (backronyms) +Pick one. All are recursive (self-referential) in the style of CHIME. +- BULL — *BULL Updates Live Listings* +- MINT — *MINT Indexes Noteworthy Tickers* +- QUOTE — *QUOTE Updates Ongoing Ticker Estimates* +- ASSET — *ASSET Surfaces Stock Exchange Tickers* +- MOAT — *MOAT Monitors Active Tickers* +- TRADE — *TRADE Reveals Active Daily Equities* +- BELL — *BELL Exhibits Live Listings* +- CHART — *CHART Highlights Asset Rate Tickers* +- BOARD — *BOARD Oversees Asset Rate Data* +- VAULT — *VAULT Aggregates Underlying Listing Tickers* + +*** TODO rate.sx Wrapper — Cryptocurrency Rates +Wrap Igor Chubin's rate.sx service. This is the lowest-effort, highest-pattern-match option — rate.sx works exactly like wttr.in. Returns colored ASCII tables with sparkline charts. Same ~User-Agent: curl~ trick, same ANSI escape codes. + +**** Features +- Full crypto dashboard: ~M-x rate-sx~ opens a buffer with a colored ASCII table of top cryptocurrencies — name, price, 24h change, market cap, and sparkline charts — all rendered by the service +- Single coin lookup: ~M-x rate-sx-coin~ prompts for a coin name (e.g., ~eth~, ~btc~) and displays its detailed view +- Plain price fetch: query ~rate.sx/1BTC~ to get a single numeric price — useful for mode-line display or programmatic use from other elisp +- Mode-line widget: show the price of one or more coins in the mode-line with periodic background refresh, similar to wttrin's weather indicator +- Customizable coin list: user picks which coins appear in the dashboard via a defcustom +- Currency base selection: rate.sx supports displaying prices in different fiat currencies +- ANSI color rendering: reuse wttrin's ~xterm-color~ pipeline to convert the service's colored ASCII output into Emacs faces +- Cache with background refresh: same timer-based pattern as wttrin — data stays warm, buffer opens instantly + +**** What you'd learn +- Very little new — this is almost a copy of wttrin with different URL construction. Good first project if you want to validate the pattern before tackling stocks. +- Could explore sharing infrastructure between wttrin and this package (common async fetch, caching, ANSI rendering). + +**** Where the complexity lives +- Minimal. The service does the formatting. Your job is URL construction, fetch, ANSI-to-faces conversion (already solved in wttrin via ~xterm-color~), and buffer display. +- Coin selection UX: letting users pick which coins to show, custom vs. top-N, etc. + +**** Downsides +- Single point of failure: rate.sx is one person's side project. If Chubin takes it down, the package is dead. No fallback. +- Crypto-only. No traditional stocks, forex, or commodities. +- Less useful than a stock package for most people. + +**** Effort: Low +Could reuse 70-80% of wttrin's code. A weekend project if you're focused. + +*** TODO Frankfurter Currency Exchange Package +Wrap the Frankfurter API (frankfurter.dev) for fiat currency conversion and historical rates. ECB data, open source, no API key. + +**** Features +- Quick conversion: ~M-x currency-convert~ prompts for amount, base currency, and target currency — displays the result in the echo area (e.g., "100 USD = 91.34 EUR") +- Multi-target conversion table: convert one amount against several currencies at once, rendered as an aligned table in a dedicated buffer +- Historical rate lookup: query a specific date's exchange rate — useful for expense reports, invoicing, or curiosity +- Rate trend view: fetch a date range and display a table or ASCII sparkline showing how a currency pair moved over days/weeks/months +- Latest rates dashboard: ~M-x currency-latest~ shows today's rates for a user-defined set of currency pairs in a buffer +- Interactive currency selection: completing-read over the ~30 supported currencies with full names (e.g., "USD — United States Dollar") +- Mode-line rate display: optionally show one currency pair's rate in the mode-line with daily background refresh +- Cache layer: rates only update once per business day, so caching is especially effective — fetch once, serve all day + +**** What you'd learn +- JSON parsing in elisp (the API returns JSON, not formatted text) +- Table rendering — building aligned currency tables with ~format~ and text properties +- Historical data display — the API supports date ranges, so you could show rate trends over time + +**** Where the complexity lives +- Rendering: You'd build the table and any trend visualization yourself. +- Date handling in elisp for historical queries (~encode-time~, ~format-time-string~, etc.). +- UX: interactive base/target currency selection with completion. + +**** Downsides +- ECB data updates once per business day. No real-time rates — this is reference data, not trading data. +- Covers ~30 currencies (major fiats). No crypto, no exotic currencies. +- Frankfurter is open-source and self-hostable, which is good for longevity, but the public instance could still go away. + +**** Effort: Low-Medium +JSON parsing adds a step vs. wttrin's plain text, but the API is clean and well-documented. Straightforward project. + +*** TODO ipinfo.io — IP and Geolocation Lookup +~curl ipinfo.io~ returns JSON with your public IP, city, region, country, ISP, and timezone. No auth needed for basic lookups (1000 requests/day unauthenticated). + +**** Features +- My IP: ~M-x ipinfo~ fetches your public IP and geolocation, displays a formatted summary in a buffer or the echo area — IP, city, region, country, ISP, timezone, coordinates +- Arbitrary IP lookup: ~M-x ipinfo-lookup~ prompts for an IP address and shows the same geolocation detail +- Copy IP to kill ring: one-keystroke convenience for grabbing your public IP +- Open in browser map: command to open the returned lat/long coordinates in OpenStreetMap or Google Maps via ~browse-url~ +- Hostname resolution: the API also returns the reverse DNS hostname for an IP +- Mode-line IP display: optionally show your current public IP in the mode-line (useful when switching between networks/VPNs) +- Org-mode integration: insert IP/geo info as an org property block or table row at point + +**** What you'd learn +- Minimal new skills — simple JSON response, single fetch, render in buffer or echo area. +- Could add map integration (open coordinates in browser or an Emacs map package). + +**** Where the complexity lives +- Almost nowhere. This is the simplest possible package. Fetch JSON, format it, display it. +- If you want to look up arbitrary IPs (not just your own), add a prompt with completion history. + +**** Downsides +- Very niche utility. You look up your IP occasionally, not daily. +- Free tier is generous (1000/day) but authenticated lookups require a token for enriched data. +- Privacy-conscious users may not want to send their IP to a third party (though they already do by virtue of connecting). + +**** Effort: Very Low +An afternoon project. Good as a learning exercise for the fetch-parse-render pattern if you haven't done JSON APIs in elisp before. + +*** TODO icanhazdadjoke.com — Dad Jokes in Emacs +~curl -H "Accept: text/plain" https://icanhazdadjoke.com~ returns a single plain-text joke. No auth, no key, no rate limit concerns for casual use. + +**** Features +- Random joke: ~M-x dad-joke~ fetches a random joke and displays it in the echo area — minimal disruption, maximum groan +- Joke buffer: ~M-x dad-joke-buffer~ opens a dedicated buffer with a joke, nicely formatted with a large font face. Press ~n~ for the next joke, ~q~ to quit +- Search jokes: ~M-x dad-joke-search~ prompts for a term (e.g., "cat") and displays matching jokes in a buffer — the API supports ~?term=~ search +- Startup joke: optional hook to display a dad joke in the echo area or scratch buffer on Emacs startup +- Org-mode insertion: ~M-x dad-joke-insert~ inserts a joke at point — for lightening up documentation or commit messages +- Kill ring: ~M-x dad-joke-yank~ fetches a joke and puts it directly in the kill ring for pasting elsewhere + +**** What you'd learn +- Nothing technically new — this is the simplest possible HTTP-GET-to-buffer pattern. +- Good excuse to experiment with fun presentation: display in echo area, dedicated buffer, or even as a startup message. + +**** Where the complexity lives +- It doesn't. Fetch a string, display it. The API also supports search (~?term=dog~) if you want to add that. + +**** Downsides +- Toy project. Zero practical utility beyond morale. +- The joke quality is... dad jokes. + +**** Effort: Trivial +An hour, maybe two if you add search and a nice buffer layout. Publishable on MELPA as a novelty package. + +*** TODO qrenco.de — QR Code Generator +Chubin's QR code service. ~curl qrenco.de/hello~ returns a QR code rendered in Unicode block characters. Encodes arbitrary text, URLs, WiFi credentials, etc. + +**** Features +- Encode text: ~M-x qr-encode~ prompts for a string and displays the QR code in a dedicated buffer using Unicode block characters +- Encode region: ~M-x qr-encode-region~ encodes the currently selected text — quick way to QR-ify a URL, password, or snippet +- Encode URL at point: ~M-x qr-encode-url~ detects the URL under point (via ~thing-at-point~) and generates a QR code for it +- WiFi QR codes: ~M-x qr-wifi~ prompts for SSID, password, and encryption type, then generates the standard WiFi QR format (~WIFI:T:WPA;S:MyNetwork;P:password;;~) — scan to join a network +- Buffer font management: automatically sets the buffer to a monospace font with consistent Unicode block rendering (same approach as wttrin's Liberation Mono override) +- Copy as text: yank the QR code's block characters to the kill ring for pasting into emails, READMEs, or chat +- Adjustable size: the service supports size parameters — expose this as a prefix argument or defcustom + +**** What you'd learn +- Handling Unicode block character output (not ANSI colors this time, but character-level rendering) +- Interactive input patterns — prompting for text to encode, or encoding the current region/URL at point + +**** Where the complexity lives +- Font and character width: QR codes require a monospace font where the block characters render at consistent widths. Some Emacs font configurations break this. You'd need to set the buffer font explicitly (like wttrin does). +- The service sometimes returns ANSI codes for inverted colors. May need ~xterm-color~ or manual processing. + +**** Downsides +- Same single-point-of-failure risk as rate.sx — one person's service. +- QR codes in a terminal/buffer are inherently lower resolution than image-based ones. Scanning reliability depends on terminal font size and screen. +- Niche use case. Most people generate QR codes infrequently. + +**** Effort: Low +Similar to rate.sx in scope. The fetch is trivial; font handling and display are the main considerations. + +*** TODO dns.toys — Multi-Tool Utility via DNS +dns.toys answers queries over DNS instead of HTTP. ~dig 100USD-EUR.fx @dns.toys~ returns currency conversion, ~dig mumbai.time @dns.toys~ returns world time, ~dig 42km-mi.unit @dns.toys~ does unit conversion. Also supports base conversion, math constants, and more. + +**** Features +- Currency conversion: ~M-x dns-toys-currency~ prompts for amount and currency pair (e.g., "100 USD to EUR"), displays result in echo area +- World time: ~M-x dns-toys-time~ prompts for a city name and shows the current local time — faster than searching online, no browser needed +- Unit conversion: ~M-x dns-toys-unit~ prompts for a value and unit pair (e.g., "42 km to mi"), returns the conversion +- Base conversion: ~M-x dns-toys-base~ converts between decimal, hex, octal, and binary (e.g., "100 dec to hex") +- Math constants: ~M-x dns-toys-constant~ looks up pi, e, tau, etc. — niche but handy in a calc session +- Unified command: ~M-x dns-toys~ with a smart prompt that detects query type from input format, dispatching to the right DNS query automatically +- Echo area results: all results display in the echo area by default for quick non-disruptive answers, with an optional dedicated buffer for history +- Async queries: use ~start-process~ with sentinels so ~dig~ calls don't block Emacs + +**** What you'd learn +- Calling external processes from elisp (~call-process~ or ~start-process~ to invoke ~dig~) instead of ~url-retrieve~. This is a meaningfully different integration pattern from wttrin. +- Parsing DNS TXT record output — dig returns structured but noisy output; you'd extract the answer section. +- Building a multi-function package — this one service covers currency, time, units, and base conversion, so the UX needs a dispatch mechanism (separate commands, or a unified prompt with type detection). + +**** Where the complexity lives +- Output parsing: ~dig~ output is not designed for human consumption. You'd parse the ANSWER SECTION, strip TTL/class/type fields, and extract the payload string. +- Latency: DNS queries are fast but ~call-process~ on ~dig~ has subprocess overhead. For interactive use this is fine; for mode-line updates you'd want async (~start-process~ with a sentinel). +- Feature breadth: The temptation is to wrap every dns.toys feature. Scoping to a focused set (currency + time + units) keeps it manageable. + +**** Downsides +- Requires ~dig~ installed (standard on Linux/macOS, not on Windows). Limits portability. +- dns.toys is a single maintainer's project. Same fragility concern as rate.sx and qrenco.de. +- DNS protocol means no rich formatting — just short text strings. The results are useful but visually plain. +- Some networks/firewalls block non-standard DNS queries, which would silently break the package. + +**** Effort: Low-Medium +The individual queries are trivial. The interesting work is building a clean multi-function UX and handling the process-based (vs. HTTP-based) integration pattern. Good project for learning elisp process management. + +*** TODO cheat.sh Integration — Programming Cheat Sheets +~curl cheat.sh/tar~ returns a syntax-highlighted cheat sheet. Supports language-specific queries like ~cheat.sh/python/lambda~. Already has some Emacs integrations (cheat-sh.el exists) but could be worth a custom implementation if existing packages don't fit your workflow. + +**** Features +- Quick lookup: ~M-x cheat-sh~ prompts for a topic (e.g., "tar", "git/stash") and displays a syntax-highlighted cheat sheet in a dedicated buffer +- Language-scoped queries: ~M-x cheat-sh-lang~ prompts for language then topic (e.g., ~python/lambda~, ~go/goroutine~) with two-stage completion +- Context-aware lookup: detect the current buffer's major mode and scope the query to that language automatically — in a Python buffer, querying "lambda" goes to ~cheat.sh/python/lambda~ +- ANSI-to-faces rendering: convert the service's syntax-highlighted ANSI output to proper Emacs font-lock faces using ~xterm-color~ (same pipeline as wttrin) +- Navigation: browse related topics from within the buffer — follow-up queries without returning to the minibuffer. Previous/next topic history with ~p~ / ~n~ +- Completion against the topic list: fetch and cache ~cheat.sh/:list~ to provide completing-read over all available topics +- Offline cache: optionally cache previously viewed cheat sheets for offline access or instant re-display +- Region query: select a command or function name and look it up directly with ~M-x cheat-sh-region~ + +**** What you'd learn +- ANSI syntax highlighting → Emacs faces (same skill as wttrin) +- Deep completion support: cheat.sh has a massive topic tree. Building good interactive completion for ~cheat.sh/{language}/{topic}~ is a UX challenge. + +**** Where the complexity lives +- Completion and navigation: the value is in making it fast to find the right cheat sheet. ~cheat.sh/:list~ returns thousands of entries. +- Existing packages: ~cheat-sh.el~ already exists on MELPA. You'd need a reason to build your own (better caching, offline support, integration with your workflow). + +**** Downsides +- Overlaps with existing Emacs packages. Check ~cheat-sh.el~ before building. +- The service aggregates from many sources. Quality is inconsistent across topics. + +**** Effort: Medium +If building from scratch. Low if extending or wrapping an existing package. The completion UX is where the effort goes. +** TODO [#D] Localrepo refresh / update script :feature: +No dedicated update path today — refreshing a pinned package means ad-hoc =cp= from the local elpa mirrors. Document the current shape and decide whether a =scripts/refresh-localrepo.sh= is worth writing. Cross-linked from =docs/design/localrepo.org=. + +** TODO [#D] Native-comp .eln cache strategy :feature: +The native-comp =.eln= cache is Emacs-version-specific; an Emacs upgrade invalidates everything. Document the cache location, what an upgrade triggers, and whether a warm-the-cache script is worth shipping. Cross-linked from =docs/design/localrepo.org=. + ** TODO [#D] Polish reveal.js presentation setup :feature: Three small reveal.js improvements; collected into one task because each on its own is too small to track separately. @@ -4473,30 +4808,12 @@ Three small reveal.js improvements; collected into one task because each on its 2. *Default font sizing for slide elements.* Configure reveal.js font sizes for headings, body text, code blocks, etc. — better defaults via =org-reveal-head-preamble= CSS or a custom theme. 3. *Custom dupre reveal.js theme.* CSS theme using the colors from =themes/dupre-palette.el=. Install into =reveal.js/css/theme/= for use with =#+REVEAL_THEME: dupre=. -** TODO [#B] "? = curated help menu" convention across modes :feature: -From the calibredb keybindings work 2026-06-06. The pattern that worked: in a modal/major-mode buffer (calibredb), bind =?= to a curated transient of the frequent workflows, and move the package's own full dispatch to =H=. It fixes the "I can't discover the keys" problem that which-key can't help with (which-key only pops up after a prefix, not for top-level single keys in a mode-map). - -Task: survey the modes/modules Craig works in and identify where a =?= -> curated-help-menu (transient) makes sense. Candidates: any major-mode buffer with single-key bindings and no good discovery affordance -- calibredb (done), nov, dirvish, mu4e, ghostel/term, signel, pearl/linear, ELFeed, etc. For each, note whether =?= is free or already a help dispatch, and whether a curated menu (vs the package's own) adds value. Establish it as a convention (and maybe a small helper/macro to define a curated =?= menu consistently). - -** TODO [#C] the preview splits an already split window into 3 temporarily. -looks strange. potentially problematic for ai-terms. - -** DONE [#C] Project-aware bug capture via C-c c t :feature: -CLOSED: [2026-06-12 Fri] -Relocated from the global capture inbox 2026-06-06. When inside a projectile project, C-c c t (Task) files into that project's root todo.org under the "<Project> Open Work" header. If the project has no todo.org, fall back to the global inbox-file and warn naming the project. - -Implemented 2026-06-06 in =modules/org-capture-config.el=: a shared project-aware =function= capture target (=cj/--org-capture-project-location=) used by =C-c c t= (Task, =* TODO=) and a new =C-c c b= (Bug, =* TODO [#C]=). Matches an existing top-level "... Open Work" heading (so ~/.emacs.d hits "Emacs Open Work") and creates "<Capitalized project> Open Work" only when absent. Outside a project / no todo.org -> global inbox under "Inbox" (with a warning in the no-todo.org case). 15 ERT tests in =tests/test-org-capture-config-project-target.el=; daemon e2e confirmed a real capture lands "** TODO [#C] ..." prepended under Open Work. Manual verify filed under the Manual testing and validation parent. NOTE: the matching "<Project> Resolved Work" header for the wrap-up workflow is a separate concern, not handled here. - -** VERIFY [#C] Palette-columns spec review -SCHEDULED: <2026-06-12 Fri> -Read [[file:docs/theme-studio-palette-columns-spec.org][docs/theme-studio-palette-columns-spec.org]] (Draft, from the 2026-06-10 design discussion) and bless or amend. Decisions 9 and 10 are the two session calls awaiting your word: strips flip to lightest→darkest top→bottom to match the dropdown, and each dropdown column run places the base at its natural lightness position (vs bg/fg bases leading before any steps). On "spec's good": mark Ready, file the phase breakdown, cancel the [#C] hint-override task, start Phase 1. - -** VERIFY [#C] page-signal pager account deregistered — re-registration needs your hands -:PROPERTIES: -:LAST_REVIEWED: 2026-06-12 -:END: -Reported by .emacs.d 2026-06-12 01:01: the dedicated pager number (+15045173983, the Claude Pager Google Voice number on signal-cli) returns "User ... is not registered" on every send — Signal appears to have deregistered it (GV numbers get periodically re-verified). Re-registration requires captcha/SMS, which only you can do. Until then every page-signal call fails; .emacs.d's config-audit page fell back to email. Wrapper lives at claude-templates/bin/page-signal. +** TODO [#D] System-tool dependency install script :feature: +=ripgrep=, =fd=, =pandoc=, =prettier=, =pyright=, and other binaries that =cj/executable-find-or-warn= flags at module load are not in =package.el='s reach. Document the required-tool set and ship a setup script (or =pacman=/=apt= invocation set). Cross-linked from =docs/design/localrepo.org=. +** TODO [#D] Treesitter grammar offline cache :feature: +Treesitter grammars are downloaded by =treesit-auto= on first use and live outside the localrepo. For true offline reproducibility, cache the grammars next to the localrepo (a =.localrepo/treesitter/= tier, or a separate mirror script). Cross-linked from =docs/design/localrepo.org=. +* Emacs Someday/Maybe * Emacs Resolved ** DONE [#B] Fix likely =elpa-mirror-location= path bug :bug:quick: CLOSED: [2026-05-03 Sun] @@ -4708,12 +5025,12 @@ Auto-compress after recording. Move to cloud sync directory. Generate transcript (once transcription workflow exists). -** DONE [#B] Implement coverage reporting (per docs/design/coverage.org) +** DONE [#B] Implement coverage reporting (per docs/specs/coverage-spec-implemented.org) CLOSED: [2026-04-23] Diff-aware coverage report with pluggable backends. Shipped v1 on 2026-04-23. -Design: [[file:docs/design/coverage.org][docs/design/coverage.org]] +Design: [[id:7d7f4486-fad7-4f0a-bd9a-775bd4cd8f7e][docs/specs/coverage-spec-implemented.org]] What shipped: - modules/coverage-core.el (engine, backend registry, cj/coverage-report, cj/coverage-report-mode) @@ -4722,7 +5039,7 @@ What shipped: - tests/run-coverage-file.el (undercover driver for the Makefile) - ERT tests for all pure helpers (parse-simplecov, parse-diff, intersect, format-report, backend registry, scope lookup) plus one smoke test for the command - F7 global binding -- docs/design/coverage.org (design doc with historical LCOV→simplecov pivot note) +- docs/specs/coverage-spec-implemented.org (design doc with historical LCOV→simplecov pivot note) Notable pivots during implementation: - Switched collection format from LCOV to simplecov (undercover's :merge-report t only supports simplecov). @@ -5788,7 +6105,7 @@ Assessed already-covered (pure logic tested; remaining % is interactive only — Net: the coverage backlog is cleared — every module's testable logic is covered; the residual low percentages are interactive/config/process code that the testing rules say not to chase. ** DONE [#B] Review all config and pull library functions into system-lib file :refactor: -Superseded by =PROJECT [#B] Consolidate shared utility helpers= (the structured version of this, with =docs/design/utility-consolidation.org= as the spec and =docs/design/utility-inventory.org= as the config-wide audit -- 30 candidate helpers across all modules, decided 11 Migrate / 3 Leave / 13 Defer). The system-lib extractions shipped 2026-05-10: =c75e36f= (=cj/executable-find-or-warn= from mail-config), =f1e8f08= (=cj/shell-quote-argument-readable= from dev-fkeys), =57e558c= (=cj/process-output-or-error= + =cj/git-output-or-error= from coverage-core), =aa72245= (=cj/file-from-context= from system-utils), plus the earlier =8e8152e= (=cj/log-silently=) -- each with its own test file. The rest of the 11 Migrate items landed as new =-lib.el= modules in the same marathon (=cj-cache-lib.el=, =cj-org-text-lib.el=, =external-open-lib.el=, =cj-window-geometry-lib.el=, =cj-window-toggle-lib.el=). The 13 deferred candidates remain tracked under the Consolidate-shared-utility-helpers PROJECT, not here. +Superseded by =PROJECT [#B] Consolidate shared utility helpers= (the structured version of this, with =docs/specs/utility-consolidation-spec-doing.org= as the spec and =docs/design/utility-inventory.org= as the config-wide audit -- 30 candidate helpers across all modules, decided 11 Migrate / 3 Leave / 13 Defer). The system-lib extractions shipped 2026-05-10: =c75e36f= (=cj/executable-find-or-warn= from mail-config), =f1e8f08= (=cj/shell-quote-argument-readable= from dev-fkeys), =57e558c= (=cj/process-output-or-error= + =cj/git-output-or-error= from coverage-core), =aa72245= (=cj/file-from-context= from system-utils), plus the earlier =8e8152e= (=cj/log-silently=) -- each with its own test file. The rest of the 11 Migrate items landed as new =-lib.el= modules in the same marathon (=cj-cache-lib.el=, =cj-org-text-lib.el=, =external-open-lib.el=, =cj-window-geometry-lib.el=, =cj-window-toggle-lib.el=). The 13 deferred candidates remain tracked under the Consolidate-shared-utility-helpers PROJECT, not here. ** DONE [#C] Clean up calibredb-epub-config.el :refactor:bug: CLOSED: [2026-05-11 Mon 14:55] @@ -6454,7 +6771,7 @@ CLOSED: [2026-05-15 Fri] What if we were writing this as it's own package and couldn't use EMMS. What would that look like? The spec should be in docs/ Another task should be created to implement the spec -Spec written in [[file:docs/design/music-config-without-emms.org][Design: music-config Without EMMS]]. +Spec written in [[id:423bc355-18d3-4e39-9e7a-f768b865d95b][Design: music-config Without EMMS]]. ** DONE [#B] Update gptel models :chore: CLOSED: [2026-05-14 Thu] Anthropic side: bumped Opus 4.6 → 4.7 (current frontier); Sonnet 4.6 @@ -6813,7 +7130,7 @@ transient-setup: Cannot open load file: No such file or directory, gptel-magit ** DONE [#C] Implement flycheck modeline customization :feature: CLOSED: [2026-05-16 Sat] -Spec: [[file:docs/design/flycheck-modeline-customization.org][docs/design/flycheck-modeline-customization.org]] (Option 4 / hybrid). +Spec: [[id:76979608-956e-474f-90a8-8d0c958101a0][docs/specs/flycheck-modeline-customization-spec-implemented.org]] (Option 4 / hybrid). =modules/flycheck-config.el= got two new =:custom= lines: =flycheck-mode-line-prefix= → "🐛", =flycheck-mode-success-indicator= → @@ -7411,7 +7728,7 @@ last-test memory persists per source file; no-match error fires correctly. Depends on: per-language test discovery. *** TODO [#B] F7 hand-off to dev-fkeys story :feature: -Once the coverage track ships ([[file:docs/design/coverage.org][docs/design/coverage.org]]), +Once the coverage track ships ([[id:7d7f4486-fad7-4f0a-bd9a-775bd4cd8f7e][docs/specs/coverage-spec-implemented.org]]), confirm F7 binds =cj/coverage-report= and lives alongside F4/F6 in the same dev-fkeys module so the three keys read as one unit. No new coverage logic here -- only the binding placement and a short comment block in the module @@ -7463,7 +7780,7 @@ Per-language test discovery: - Parsing unopened test files: use with-temp-buffer + insert-file-contents + python-ts-mode (etc.) + treesit-query-capture - Elisp: built-in sexp navigation; scan for (ert-deftest <name> ...) forms. No tree-sitter needed. -*F7 — coverage* (already designed in docs/design/coverage.org) +*F7 — coverage* (already designed in docs/specs/coverage-spec-implemented.org) **Required moves:** - Move blacken-buffer (python), shfmt-buffer (sh), clang-format-buffer (c) off F6 to C-; f prefix (already the format-buffer prefix). @@ -7669,7 +7986,7 @@ Built as scripts/theme-studio/build-theme.el (sibling to build-inventory.el), em The last link in the pipeline: turn a theme.json exported by the theme-studio into a real loadable Emacs theme. Elisp (per Craig), TDD — this is the correctness-sensitive piece. Inputs (all on disk; no chat history needed): -- theme.json contract: =scripts/theme-studio/README.md= (theme.json section) and =docs/design/theme-studio-package-faces-spec.org= (State and export policy, Relative height, Inheritance). +- theme.json contract: =scripts/theme-studio/README.md= (theme.json section) and =docs/specs/theme-studio-package-faces-spec-doing.org= (State and export policy, Relative height, Inheritance). - Reference face layout: existing =themes/dupre-palette.el= + =themes/dupre-faces.el= + =themes/dupre-theme.el=, and =tests/test-dupre-theme.el= (WCAG-contrast helper to reuse). - Conventions: =.claude/rules/elisp.md=, =.claude/rules/elisp-testing.md=. @@ -7683,7 +8000,7 @@ Scope: TDD targets: old-JSON (no packages) loads; every category maps; round-trip of fg/bg/bold/italic/inherit/height into valid face specs; WCAG-contrast assertion on the result. Decide whether the converter lives under =scripts/theme-studio/= (emits to =themes/=) or =themes/=. ** DONE [#B] theme-studio tier-3 package faces :feature:theme:theme-studio: CLOSED: [2026-06-08 Mon] -Package-specific face editing in the theme-studio: org/magit/elfeed bespoke (complete face tables + live previews) plus a generated all-package inventory so every installed package is themeable. Spec is Ready, all opens resolved: [[file:docs/design/theme-studio-package-faces-spec.org][docs/design/theme-studio-package-faces-spec.org]]. Phases below run in dependency order; phases 1-5 deliver the three high-value apps, phase 6 opens the long tail, phase 7 documents. The =theme.json= -> =dupre-*.el= converter (Elisp) is a separate downstream task. +Package-specific face editing in the theme-studio: org/magit/elfeed bespoke (complete face tables + live previews) plus a generated all-package inventory so every installed package is themeable. Spec is Ready, all opens resolved: [[id:8f37a1fd-cfd3-4b25-92e5-772468092bdc][docs/specs/theme-studio-package-faces-spec-doing.org]]. Phases below run in dependency order; phases 1-5 deliver the three high-value apps, phase 6 opens the long tail, phase 7 documents. The =theme.json= -> =dupre-*.el= converter (Elisp) is a separate downstream task. *** 2026-06-08 Mon @ 00:17:41 -0500 Phase 1 — package state + schema landed Added =APPS= (org starter) and =PKGMAP= ({app:{face:{fg,bg,bold,italic,inherit,height,source}}}), pure helpers (=seedPkgmap= / =packagesForExport= / =mergePackagesInto=), and wired export/import for the =packages= key with old-JSON compat. The =height= float (relative size, read off the face not cascaded through inherit) and the fixed-pitch inherits are seeded in the org starter. No UI yet (Phase 3). Verified: node-check, plus a guarded =#selftest= harness (headless Chrome) confirming seed->export->import round-trip, old-JSON merge, and inherit/height/source survival — all PASS. @@ -7710,7 +8027,7 @@ Rewrote =README.md= for the full tool: three face tiers + palette, the in-page p Extended the guarded =#selftest= harness (headless Chrome) to assert the acceptance criteria against the real emitted code: old-JSON import (no =packages=), full round-trip (fg/bg/bold/italic/inherit/height/source), cleared-state export, unknown-package/face preservation, and inheritance-cycle termination — all PASS. The two DOM-coupled regressions are handled structurally: =updateColor= remaps =PKGMAP= on a palette-color edit, and =PKGMAP= stores hexes so a deleted palette color leaves package refs in the "(gone)" recoverable state. =generate.py= rebuilds =theme-studio.html= each run. ** DONE [#B] theme-studio perceptual color metrics :feature:theme:theme-studio: CLOSED: [2026-06-08 Mon] -Spec (Ready, opens confirmed 2026-06-08): [[file:docs/design/theme-studio-perceptual-color-metrics-spec.org][docs/design/theme-studio-perceptual-color-metrics-spec.org]]. OKLCH model + perceptual-L/APCA readouts + pairwise ΔE, for building low-contrast themes by metric rather than by eye. All five phases shipped 2026-06-08 (commits 49342bf5, 78260018, 77c7f126, 163d3730, 22605426, 582d8a6a): colormath.js core inlined + WCAG/HSV helpers migrated; picker OKLCH/APCA readouts; palette ΔE warnings; OKLCH edit-model dials; C×L gamut plane. 17 Node tests (colormath 100/93.75/100), six browser hash gates green, inline-integrity guard. vNext deferrals (low-contrast preset, CIEDE2000) remain the two [#D] tasks below. Manual eyeballs tracked under Manual testing. +Spec (Ready, opens confirmed 2026-06-08): [[id:15db8ae3-fc14-49f3-9ed5-d5ff59790904][docs/specs/theme-studio-perceptual-color-metrics-spec-implemented.org]]. OKLCH model + perceptual-L/APCA readouts + pairwise ΔE, for building low-contrast themes by metric rather than by eye. All five phases shipped 2026-06-08 (commits 49342bf5, 78260018, 77c7f126, 163d3730, 22605426, 582d8a6a): colormath.js core inlined + WCAG/HSV helpers migrated; picker OKLCH/APCA readouts; palette ΔE warnings; OKLCH edit-model dials; C×L gamut plane. 17 Node tests (colormath 100/93.75/100), six browser hash gates green, inline-integrity guard. vNext deferrals (low-contrast preset, CIEDE2000) remain the two [#D] tasks below. Manual eyeballs tracked under Manual testing. *** 2026-06-08 Mon @ 19:43:50 -0500 Color-math foundation + Node tests landed Pure color core in =scripts/theme-studio/colormath.js= (OKLab/OKLCH, APCA-W3 0.1.9 exact constants, ΔE-OK, binary-search gamut clamp returning ={hex,clamped}=) shipped in 49342bf5; this phase finished the integration in 78260018. =generate.py= now inlines the colormath.js body into the page script (export-stripped, =COLORMATH_J= placeholder), and the page's lin/rl/contrast/rating/hsv2rgb/rgb2hsv/hex2rgb/rgb2hex copies moved into the module — =rl= reuses the canonical =lin= (0.04045 cutoff), byte-identical to the old 0.03928 form on every #rrggbb (no 8-bit channel falls between the cutoffs; verified over 200k pairs, zero contrast change). =test-colormath.mjs= gained Normal/Boundary/Error cases for the migrated helpers, a seeded hsv-rgb round-trip property test, and an inline-integrity check that the generated page carries the module body verbatim. Gate met: =node --test scripts/theme-studio/*.mjs= 15 pass, colormath.js 100% line / 93.75% branch / 100% func; =node --check= on the spliced script clean; =#selftest= + =#cursortest= PASS in headless Chrome. NOTE: =node --test <dir>= directory-globbing is broken on Node v26 (tries to load the dir as a module) — use the =*.mjs= glob form. *** 2026-06-08 Mon @ 19:55:53 -0500 Picker OKLCH/APCA readouts landed @@ -7821,3 +8138,634 @@ CLOSED: [2026-06-11 Thu] In the UI faces table, the preview cell for a face with its own bg renders with the ground bg instead. Repro: set mode-line fg=black, bg=blue — the preview cell should be black text on blue, but shows black on black (the live buffer mode-line is fine). Root cause: =applyGround= (app.js:300) blankets EVERY =.ex= element's background to =MAP['bg']=, and the preview cell =cP= shares =className='ex'= (app.js:753), so it clobbers the per-face bg =paintUI= sets (app.js:739) — runs on load and on every ground change. Fix: stop applyGround from touching the UI-face preview cells (scope its =.ex= selector to the code/example cells, give the preview cell its own class, or re-run paintUI after). The contrast cell shares the same staleness, so confirm both. *** 2026-06-10 Wed @ 14:40:22 -0500 Fixed by the applyGround scoping under the contrast-cell task Same root cause as the [#A] contrast-cell task, fixed there in one change: =applyGround= scopes its blanket to =#legbody .ex= + the code panes and repaints UI faces through =paintUI=. #contrasttest pins the preview-bg survival. Awaiting the same repro check. +** DONE [#B] cj/undo-kill-buffer off-by-one on plain invocation :bug:quick:solo: +CLOSED: [2026-06-12 Fri] +Fixed in =modules/ui-navigation.el=: indexing is now =(nth (1- arg) ...)=, so a numeric prefix is 1-based and plain M-S-z re-opens the most-recently-killed file (was opening the second). Rewrote the two undo-kill tests to exercise the real no-prefix path (arg=1 -> first) and a 1-based numeric prefix; both red against the bug, green after. Full suite: no new failures (the 4 pre-existing dupre-theme failures are the separate task below). Live-reloaded into the daemon. +** DONE [#B] dashboard-config setq wipes recentf-exclude list :bug:quick:solo: +CLOSED: [2026-06-12 Fri] +Fixed in =modules/dashboard-config.el=: extracted the EMMS exclusion into =cj/--dashboard-exclude-emms-from-recentf= (the =:config= side-effect was not reachable for a test) and switched =setq= to =add-to-list=, so the five exclusions system-defaults adds earlier in init order survive. Two ERT tests in =tests/test-dashboard-config-recentf-exclude.el= (preserves prior entries / adds the pattern); the preservation test was red before, green after. Live-reloaded into the daemon and restored the five wiped entries in the running session. +** DONE [#B] org-roam dailies template writes FILETAGS and TITLE on one line :bug:quick:solo: +CLOSED: [2026-06-12 Fri] +Fixed in =modules/org-roam-config.el=: extracted the dailies head into the =cj/--org-roam-dailies-head= defconst (so it is unit-testable, the value was unreachable inside the use-package =:custom= form) and gave it real newlines — =#+FILETAGS: Journal\n#+TITLE: %<%Y-%m-%d>\n=. Two ERT tests in =tests/test-org-roam-config-dailies-head.el= assert FILETAGS and TITLE sit on separate lines and the head ends in a newline (both red before, green after). Live-reloaded into the daemon. Open follow-up for Craig: existing malformed daily files (with the run-together first line) are data, not code — sweep them by hand if desired. +** DONE [#B] drill-refile clobbers global org-refile-targets with an invalid spec :bug:quick:solo: +CLOSED: [2026-06-12 Fri] +Fixed in =modules/org-drill-config.el=: =cj/drill-refile= now =let=-binds =org-refile-targets= (the session-wide value survives) and supplies =(directory-files drill-dir t "\\.org$")= as the file list instead of the bound =drill-dir= symbol (org reads a bound symbol as a directory string, which yielded nothing). Rewrote the stale test (it asserted the buggy =(assoc 'drill-dir ...)=) into two: targets are a real .org file list, and the global is not clobbered. Both red before, green after. Live-reloaded into the daemon. + +Follow-up 2026-06-12 (Codex review): the first fix reinvented file-listing with a raw =directory-files= call, bypassing the shared validated entry point =cj/--drill-files-or-error= — no missing/unreadable-dir =user-error=, silent fall-through on an empty dir, and it included leading-dot =.org= files the rest of the module excludes. Re-routed through =cj/--drill-files-or-error= + =expand-file-name=; the test was rewritten into three (validated-helper targets, no global clobber, =user-error= on a missing dir). +** CANCELLED [#B] M-S- launcher keys dead: eww, elfeed, calibredb unreachable :bug:quick:solo: +CLOSED: [2026-06-13 Sat] +Not a bug. The audit used =key-binding=, which ignores =key-translation-map=, so it read the M-S- launcher chords as dead. They work in GUI: =keyboard-compat.el= installs a =key-translation-map= entry (=M-E -> M-S-e=, etc.) in GUI frames, so Meta+Shift+letter reaches eww/elfeed/calibredb. The "fix" =4a1ecf64= bound =M-E= directly and broke them instead; reverted here. The real console-reachability problem (the chords are dead outside GUI) is the subject of [[id:540bf06b-16b8-46c6-b459-c40d1b9c795d][the keybinding-console-safety spec]]. +** DONE [#B] Signel Client Open Work +CLOSED: [2026-06-12 Fri] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-12 +:END: +Parent task for the Emacs Signal client bring-up. Engine: signal-cli (linked secondary device). Front end: a fork of signel at =~/code/signel=, wired through =modules/signal-config.el=. Design: [[id:0cabd6ee-c458-47b5-a8af-3ee054b25821][docs/specs/signal-client-spec-doing.org]]. + +Closed 2026-06-12: the bring-up shipped (dated history below). The open signel/signal-cli issues moved to [[file:~/code/smoke/todo.org][the smoke todo]] (smoke is the evolved Signal package) and are tracked there flat (the three open children here — handle-error leak, link-with-QR, groups in picker — moved in that pass). Work on =modules/signal-config.el= stays in this file. + +*** 2026-06-12 Fri @ 07:34:05 -0500 Signel notify-only-for-unviewed-conversation shipped +Wire =cj/signal--should-notify-p= (done) into signel's =signel--handle-receive= notify block (signel.el:277), route through Craig's notify script instead of bare =notifications-notify=, and gate sound behind a defcustom that defaults off. Spec addendum (the four notify details + wiring architecture) accepted 2026-06-11 — see [[id:0cabd6ee-c458-47b5-a8af-3ee054b25821][signal-client-spec-doing.org]] "Notification slice". + +Built 2026-06-11 (TDD; fork commit e263367, dotemacs 9afc6128): =signel-notify-function= customization point in the fork; =cj/signel--notify= + =cj/signal--format-notify-body= + =cj/signel-notify-sound= in signal-config.el, wired in =:config= with a load-time =cj/executable-find-or-warn=. 17 new ERT tests green; full launch smoke clean; live-reloaded into the daemon and a synthetic toast fired through the script path. The two manual checks moved to the Manual testing and validation parent. + +*** 2026-05-26 Tue @ 20:06:58 -0500 Decided: fork signel rather than depend on it +signel is on MELPA but stale (one-author v0.1, all commits in a Jan-2026 burst, unattended tracker, no PRs). The spec needs internal edits (notify behavior, input-clobber fix), which are clean in a fork and hacky via advice, and a dead upstream means no divergence cost. Rejected: adopt-from-MELPA + advice, build-from-scratch, signal-cli-rest-api (Docker), MCP-tool, ERC bridge. Full rationale in the design doc. + +*** 2026-05-26 Tue @ 20:06:58 -0500 Linked as secondary device; contact parser verified against live shape +Installed signal-cli 0.14.4.1 (AUR; imported AsamK's signing key FA10826A... to clear the makepkg verification). Linked the account via QR. Built and unit-tested the pure helper layer in =modules/signal-config.el= (contact-list parsing, notify-when-not-viewing predicate) with =tests/test-signal-config.el=. Confirmed the live =listContacts= shape: givenName/familyName are top-level in 0.14, not under profile as first assumed; corrected the parser and verified it produces a picker entry for all 94 real contacts. Sent a request to archsetup to add signal-cli to the standard install. + +*** 2026-05-27 Wed @ 22:08:40 -0500 Shipped initiate-message workflow: picker + Note-to-Self + keymap +=cj/signel-message= (=C-; M m=) names contacts via =completing-read= over the cj-owned =cj/signel--contact-cache=, with "Note to Self" pinned first. =cj/signel-message-self= (=C-; M s=) sends straight to =signel-account=. Daemon guard =cj/signel--ensure-started= auto-starts the daemon when =signel-account= is set and =user-error='s with the remedy when it isn't; on start it pre-warms the cache. =cj/signel--fetch-contacts= rides the new RPC callback contract (=signel--send-rpc= with success-callback), the result feeds =cj/signal--parse-contacts=, and =cj/signel-refresh-contacts= (=C-; M no leaf=) clears + refetches. Cold-cache invocations =accept-process-output= up to =cj/signel-fetch-timeout= seconds (3s default) and =user-error= on timeout so a wedged daemon can't hang Emacs. Prefix keymap =cj/signel-prefix-map= bound under =C-; M= via =keybindings.el='s =cj/custom-keymap=: m / s / d / q / SPC. 15 new ERT tests in =tests/test-signal-config.el= cover ensure-started branches, fetch contract, cache empty-vs-failure, refresh, picker happy-path + cold-cache resolves + cold-cache timeout, message-self, and the prefix map bindings. + +*** 2026-05-27 Wed @ 21:55:57 -0500 Added JSON-RPC success-result dispatch in the signel fork +Fork commit 4740d97 added =signel--request-handler-map= (id → success callback), extended =signel--send-rpc= with an optional =success-callback= that registers under the new request id, and gave =signel--dispatch= a result branch that invokes the callback and removes the handler. Error responses also remhash the handler entry, and =signel-start= / =signel-stop= both =clrhash= the map so reconnect is reliably empty. Backward-compatible: existing callers that don't pass a callback hit the same code path as before. Five ERT tests in this project (=tests/test-signel-rpc-dispatch.el=, dotemacs commit bfec0eab) lock the contract: Normal (result invokes callback + cleanup, send-rpc registers), Boundary (unknown id is a no-op), Error (error response cleans up handler), reconnect (=signel-stop= empties the map). Refactor audit surfaced a separate pre-existing leak in =signel--handle-error= (request-buffer-map entries aren't removed on error); filed as the [#C] follow-up below. + +*** 2026-05-27 Wed @ 22:08:40 -0500 Shipped clobber fix for both insert paths +Fork commit 5ec56c0 added =signel--pending-input= (capture from input-marker to point-max) and =signel--restore-input= (re-insert after the redrawn prompt; nil-safe), and wired both into =signel--insert-msg= (the receive path) and =signel--insert-system-msg= (the error path). A mid-type send now survives both an incoming message and a system-error insertion. Four ERT tests in =tests/test-signel-input-preservation.el= cover the helpers (typed text, empty) and both insert paths via a temp =signel-chat-mode= buffer. + +*** 2026-05-27 Wed @ 22:08:40 -0500 use-package wired with C-; M keymap and local account config +=use-package signel :load-path "~/code/signel" :ensure nil= already wired earlier with =signel-auto-open-buffer nil=. Account source is =signel-account= set from =cj/signal-private-config-file= (=signal-config.local.el=, gitignored) loaded in =:config=, decided in the workflow spec. Keymap prefix =C-; M= attached via =with-eval-after-load 'keybindings= so the binding survives load-order. + +*** 2026-06-06 Sat @ 12:29:24 -0500 Fixed C-; M load-order bug via canonical register-prefix-map +Root cause: signal-config.el was the only feature module that violated the prefix-registration contract documented in =keybindings.el:41-45=. Every other prefix map uses =(require 'keybindings)= + a top-level =(cj/register-prefix-map "X" map)=; signal-config had neither, mutating =cj/custom-keymap= directly through a =(with-eval-after-load 'keybindings (when (boundp 'cj/custom-keymap) ...))= form. The =boundp= guard turned a load-order miss into a SILENT no-op — no error, the binding just never happened — which is why a live-reload (keybindings definitely loaded by then) papered over it. +Fix: added =(require 'keybindings)= at the top of signal-config.el and replaced the guarded form with =(cj/register-prefix-map "M" cj/signel-prefix-map "signal messages")=, matching the 25+ other prefix maps. +Verified: (1) new contract test =test-signal-config-prefix-map-registered-under-c-semi-m= asserts =C-; M= resolves to =cj/signel-prefix-map= (35/35 green); (2) full =emacs --batch= init.el launch — the exact failing scenario — now shows =C-; M= bound; (3) clean byte-compile; (4) live-reloaded into the daemon, binding confirmed. No unit-level red was possible: the =boundp= guard is robust under all standard test timings, which is the CLAUDE.md launch-only-failure class. + +*** 2026-05-28 Thu @ 03:09:18 -0500 Chat buffer docks bottom 30% and C-c C-k cancels +=display-buffer-alist= entry in =modules/signal-config.el= matches =^\*Signel: = chat buffers and routes them through =display-buffer-at-bottom= with =window-height . 0.3=, so the chat docks to the bottom 30% of the frame. The signel fork's =signel-chat= switched from =switch-to-buffer= to =pop-to-buffer= so the rule can apply (=switch-to-buffer= ignores =display-buffer-alist=). =C-c C-c= was already bound to =signel--send-input= in the mode; =C-c C-k= now binds =signel--cancel-input=, a new fork helper that clears the editable region between =signel--input-marker= and =point-max= and then calls =quit-window=. Buffer stays alive so chat history above the marker survives revisits; cleared input means the next visit lands on a fresh prompt. Five ERT tests in =tests/test-signel-cancel-input.el= (clears pending, empty-area no-op, quit-window called, buffer preserved, keymap binding) and two new tests in =tests/test-signal-config.el= (entry shape + regex match set). Dotemacs commit 998e9c7a, fork commit df02d79. +** DONE [#C] Project-aware bug capture via C-c c t :feature: +CLOSED: [2026-06-12 Fri] +Relocated from the global capture inbox 2026-06-06. When inside a projectile project, C-c c t (Task) files into that project's root todo.org under the "<Project> Open Work" header. If the project has no todo.org, fall back to the global inbox-file and warn naming the project. + +Implemented 2026-06-06 in =modules/org-capture-config.el=: a shared project-aware =function= capture target (=cj/--org-capture-project-location=) used by =C-c c t= (Task, files a top-level TODO) and a new =C-c c b= (Bug, files a top-level TODO [#C]). Matches an existing top-level "... Open Work" heading (so ~/.emacs.d hits "Emacs Open Work") and creates "<Capitalized project> Open Work" only when absent. Outside a project / no todo.org -> global inbox under "Inbox" (with a warning in the no-todo.org case). 15 ERT tests in =tests/test-org-capture-config-project-target.el=; daemon e2e confirmed a real capture lands a second-level TODO entry prepended under Open Work. Manual verify filed under the Manual testing and validation parent. NOTE: the matching "<Project> Resolved Work" header for the wrap-up workflow is a separate concern, not handled here. +** DONE [#A] theme-studio: 2D gallery color picker for assignment dropdowns :feature:studio: +CLOSED: [2026-06-15 Mon] +Replaced the per-face color dropdown (mkColorDropdown popup in app.js) with a 2D grid in the palette-panel shape: galleryModel(cur,palette,ground) in app-core.js (pure; reuses columnsFromPalette) returns a default chip, an optional (gone) cell, and rows = ground strip then one row per family (members dark->light, one selected). 5 node tests + #gallerytest browser gate. Trigger and ‹ › step buttons unchanged; applies to all three tiers. From the roam inbox 2026-06-15. +** DONE [#C] theme-studio: palette display toggle for base colors vs full palette :feature: +CLOSED: [2026-06-15 Mon] +Added an arrow control on the palette: right collapses each column to its base color (ground steps collapse to bg/fg too), down shows the full spans. #paltoggletest covers it. Commit 5ab506d9. +** DONE [#A] theme-studio: flag gone color assignments with a distinctive border :feature:studio: +CLOSED: [2026-06-15 Mon] +Swatches whose assigned color resolves to "(gone)" now carry a solid red outline (distinct from the dashed unused-tile flag). #gonetest covers it. Commit 0529189a. +** DONE [#A] theme-studio: flag unused palette tiles and columns :feature: +CLOSED: [2026-06-15 Mon] +usedPaletteHexes reverse-lookup over syntax/ui/package assignments + ground; a tile referenced nowhere gets a dashed outline, an all-unused column gets a dashed box. Biased safe (never flags a used color). Node tests + #unusedtest. Commit 7e7b871f. +** DONE [#C] theme-studio: equalize style and box button cluster sizing :refactor:quick:studio: +CLOSED: [2026-06-15 Mon] +Shrank .sbtn from 26x24 to the 17x15 box-button size (font 13px), so the style and box clusters match and the row returns to roughly its pre-cluster height. Commit 44128931. +** DONE [#A] Face and font diagnostic popup at point :feature: +CLOSED: [2026-06-15 Mon] +Read-only popup diagnosing why text at point paints as it does (face stack by source, merged attributes, real font vs declared family, theme/config/inherit provenance). Spec: [[id:98f065cf-8bd5-46a0-ac24-da94d66855ad][face-font-diagnostic-popup-spec-implemented.org]]. Building in modules/face-diagnostic.el: pure core cj/--face-diagnosis-at returns the report plist; cj/describe-face-at-point renders it into a read-only help buffer. From the roam inbox — "do this one first." +*** 2026-06-15 Mon @ 12:19:41 -0500 Phase 1 — core read model + buffer classifier landed +modules/face-diagnostic.el: cj/--face-diagnosis-at returns groups 0-2 (buffer classification, character context, face stack by source) via small pure helpers. 17 ERT tests (tests/test-face-diagnostic.el), byte-compile clean. Not yet wired into init.el; the interactive command and keybinding land in Phase 4. +*** 2026-06-15 Mon @ 12:26:52 -0500 Phase 2 — merged attributes + real font landed +cj/--face-diag-merged-attributes folds the ordered, remap-expanded spec stack ("computed"); cj/--face-diag-real-font reports font-at or "unavailable" under batch. Settles spec decision #7 (hand-fold, tested on overlay-over-text-prop, default-remap, and face-symbol fixtures). 23 ERT tests total, byte-compile clean. +*** 2026-06-15 Mon @ 12:30:30 -0500 Phase 3 — provenance trace landed +cj/--face-diag-provenance returns per-face provenance: themes from theme-face, config from saved/customized-face, the :inherit chain, and the attributes still unspecified that fall to the default. Version-sensitive internals sit behind small tolerant accessors. 30 ERT tests total, byte-compile clean. +*** 2026-06-15 Mon @ 12:37:16 -0500 Phase 4 — render + popup wiring landed +cj/describe-face-at-point renders the diagnosis into the read-only *Face Diagnosis* buffer (cj/face-diagnostic-mode), with region-scan mode and an out-of-scope banner; required in init.el; live-verified in the daemon (it already surfaces the auto-dim remaps). Command name settled as cj/describe-face-at-point. Deferred to follow-up: clickable face-name buttons (plain text for now) and the module-header allowlist entry; the keybinding is Craig's to pick. +** DONE [#B] dwim-shell: zip overwrites its own name, backup timestamp never expands, dired menu key dead :bug:quick:solo: +CLOSED: [2026-06-13 Sat] +From the 2026-06 config audit, =modules/dwim-shell-config.el=: +- =:338= — single-file zip is =zip -r '<<fne>>.<<e>>' '<<f>>'= — reconstructs the input filename as the archive ("Zip file structure invalid"; directories produce =foo.=). Should be ='<<fne>>.zip'= like the tar-gzip sibling. +- =:549= — backup destination single-quotes =$(date ...)= so the substitution is literal: =foo.txt.$(date +%Y%m%d_%H%M%S).bak=. Move it outside the quotes or format-time-string in Elisp. +- =:932= — dired-mode binding "M-S-d" is unreachable (Meta+Shift+d generates M-D); the dirvish binding two lines down is correctly "M-D". Fix + the stale commentary at dirvish-config.el:30. +Fixed 2026-06-13: zip single-file template now ='<<fne>>.zip'=; backup uses =format-time-string= in Elisp (real =YYYYMMDD_HHMMSS= stamp, dropped the now-unneeded =date= util); dired key M-S-d→M-D + dirvish-config.el:30 doc corrected. Both command strings extracted into top-level builders (=cj/dwim-shell--zip-single-file-command=, =cj/dwim-shell--dated-backup-command=) so they're unit-testable without the dwim-shell-command package — the command defuns live in its use-package :config, which the batch harness doesn't load. 2 builder tests green in make; live daemon confirms all three (backup stamp, .zip, dired M-D). Real backup/zip run + the dired keypress are a VERIFY. +** DONE [#B] ERC: double mention notifications + tautological server list :bug:quick:solo: +CLOSED: [2026-06-14 Sun] +From the 2026-06 config audit, =modules/erc-config.el=: +- =:281= — =erc-modules= includes the built-in =notifications= module AND :config adds =cj/erc-notify-on-mention= to the same hook — every mention fires two desktop notifications. Pick one path (keep the custom one, slated for messenger unification). +- =:100= — =cj/erc-connected-servers=: inside =with-current-buffer=, the free =erc-server-process= is the buffer's own local value, so the eq test is tautologically true — returns ALL ERC buffers (channels, dead connections). Use =erc-server-buffer-p= + =erc-server-process-alive=. +- =:238= — =user-whole-name= read at load but =user-constants= only required at compile time (same trap as auth-config/keyboard-macros). +Fixed 2026-06-14: removed =notifications= from =erc-modules= (kept the custom =cj/erc-notify-on-mention=, so one notification per mention); rewrote =cj/erc-connected-servers= to filter on =(erc-server-buffer-p)= + =(erc-server-process-alive)= instead of the tautological self-eq; moved =user-constants= to a runtime require. New test-erc-config-connected-servers.el (live-server-only + empty cases) 2 green; module byte-compiles. erc-config not reloaded into the daemon (live IRC session) — takes effect on restart. VERIFY for the one-notification + real-server-list behavior. +** DONE [#B] help-config: three defects in one small file :bug:quick:solo: +CLOSED: [2026-06-13 Sat] +From the 2026-06 config audit, =modules/help-config.el=: +- =:67= — =cl-return-from= inside a plain =defun= (no cl-block): declining the save prompt signals "No catch for tag" instead of canceling. =cl-defun= or restructure. +- =:108= — =:hook (info-mode . info-persist-history-mode)= is dead twice: Info's hook is =Info-mode-hook= (capital I), and =info-persist-history-mode= doesn't exist anywhere. Implement the intent or delete. +- =:111= — auto-mode-alist maps .info to an interactive command that KILLS the buffer mid find-file — programmatic =find-file-noselect= of any .info destroys buffers and pops Info windows. Drop the entry; keep the explicit command. Zero test coverage on this module (the two broken paths are exactly the untested ones). +Fixed 2026-06-13: (1) extracted the save/cancel/open decision into a pure =cj/--info-open-plan= and routed =cj/open-with-info-mode= through it — no more =cl-return-from=, declining cancels cleanly; (2) deleted the dead =:hook= and the empty =:preface=; (3) dropped the destructive =auto-mode-alist= .info entry (kept =cj/open-with-info-mode= as an M-x command and =cj/browse-info-files= on C-h i). New test-help-config.el covers the planner (open / save-then-open / cancel) — 3 green; module loads clean. Stale daemon state (the .info auto-mode entry + the bogus info-mode-hook entry) cleared by hand so the running session is correct without a restart. Interactive Info open + find-file-no-longer-destructive are a VERIFY. +** DONE [#B] markdown live preview clobbered by markdown-mode :bug:quick:solo: +CLOSED: [2026-06-13 Sat] +=modules/markdown-config.el:54= defines bare =markdown-preview=, which markdown-mode redefines the moment the first .md loads — the impatient-mode live preview is dead and F2 silently runs the package command (agent verified in the live daemon). Also =:61= guards on =(boundp 'httpd-process)=, a variable that doesn't exist in simple-httpd — use =(httpd-running-p)=. And the =:config= =(setq imp-set-user-filter 'markdown-html)= at line 41 is doubly dead (function-not-variable, symbol names nothing) — delete. Rename to =cj/markdown-preview=, rebind F2. From the 2026-06 config audit. +Fixed 2026-06-13: renamed the defun to =cj/markdown-preview= and rebound =<f2>=; guard is now =(httpd-running-p)=; deleted the dead =(setq imp-set-user-filter 'markdown-html)= (impatient-mode use-package is now =:defer t= only). Added a guard test (server-down → user-error); 4/4 green; live daemon confirms =cj/markdown-preview= defined and guarding. Browser-render check is a VERIFY. +** DONE [#B] modeline runs synchronous git on the redisplay path, unguarded :bug:solo: +CLOSED: [2026-06-14 Sun] +=modules/modeline-config.el:173,154,145= — the mode-line :eval calls vc-backend/vc-state/vc-working-revision (synchronous git) on TTL expiry; a slow or unmounted filesystem stalls ALL redisplay. The cache key computes =file-truename= on every render (the "one stat per refresh" comment is wrong), and nothing is condition-case-wrapped, so a signal lands inside the mode-line eval. Defer the truename behind the TTL check; wrap the fetch in condition-case caching nil. From the 2026-06 config audit. +Fixed 2026-06-14 (Approach A): dropped =file-truename= from =cj/modeline-vc-cache-key= (key is now =(file show-remote)=, no per-render stat; a moved symlink is caught at the next TTL refresh when vc-backend resolves the link fresh). Wrapped =cj/modeline-vc-fetch= in =condition-case ... (error nil)= so a git signal on a slow/unmounted FS degrades to no-VC-info instead of breaking redisplay. Rewrote the two truename cache-key tests to assert the cheap key; added a fetch-swallows-vc-errors test. 9 modeline vc tests green; live daemon confirms the 2-element key and nil-on-error fetch. +** DONE [#B] org-faces: custom header-row face layer + theme-studio app :feature:theme-studio:spec: +CLOSED: [2026-06-15 Mon] +Named, theme-agnostic faces for org TODO keywords and priorities, wired via org-todo-keyword-faces / org-priority-faces, plus a dedicated theme-studio "org-faces" app beside elfeed and mu4e. Spec: [[id:35578114-8c29-43af-97a2-fdfea01a802e][org-faces-spec-implemented.org]]. All four decisions resolved (prefix org-faces-, real defface defaults, auto-dim repointed to org-faces-*-dim, all 10 keywords). Phase 1 (modules/org-faces-config.el + 5 ERT tests), Phase 2 (auto-dim-config.el repoint), Phase 3 (theme-studio org-faces app) all landed and verified; the build-theme round-trip is confirmed mechanically. Residual visual check is a VERIFY under Manual testing and validation. +** DONE [#B] slack-config lifecycle gaps :bug:quick:solo: +CLOSED: [2026-06-14 Sun] +From the 2026-06 config audit, =modules/slack-config.el=: +- =:265= — w / @ / # bound to commands neither autoloaded nor in :commands — void-function before slack loads. Add to :commands. +- =:246= — =cj/slack-close-all-buffers= reads =slack-current-buffer= (declared but unbound) without the boundp guard its sibling has — void-variable on C-; S Q before slack loads. +- =:259= — raw =global-set-key= for C-; S bypasses =cj/register-prefix-map= (signal/erc use it); invisible to the keybindings registry and the planned unification enumeration. +Fixed 2026-06-14: added =slack-message-write-another-buffer=, =slack-message-embed-mention=, =slack-message-embed-channel= to =:commands= (w/@/# now autoload); guarded =cj/slack-close-all-buffers= with =buffer-local-boundp= (no void-variable on C-; S Q before slack loads); switched =global-set-key= to =(cj/register-prefix-map "S" cj/slack-keymap "slack")= (+require keybindings). New test-slack-config-close-all.el green; module loads, C-; S registered in the registry. Not reloaded into the live daemon (active slack session) — restart to apply. VERIFY for the pre-load key safety. +** DONE [#B] theme-studio color columns :feature:studio: +CLOSED: [2026-06-13 Sat] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-11 +:END: +Show the palette as hue-grouped strips (dark→light) over the existing flat, individually-editable palette. Grouping is by OKLCH hue from the hex, so renaming a color never moves it. A per-strip count control generates a symmetric ramp (N → base ±N) from the strip's most-saturated color; regenerate is authoritative, repointing surviving-step references by lightness rank and leaving removed-step references a visible "(gone)". The ground strip is synthesized from the bg/fg assignments and pinned first; the standalone ramp panel is removed. Designed in [[file:docs/theme-studio-color-families-spec.org][docs/theme-studio-color-families-spec.org]]. Codex-reviewed Ready 2026-06-10 after response folded: pivoted from name-derived families to hex-derived families over a flat palette, which designs out the name-grammar/import-inference and chip-ownership blockers. All review findings dispositioned; both open decisions resolved. Builds on and supersedes the palette-ramps v1 ramp UI. + +All six phases landed 2026-06-10 (commits ebe18d51, 74db9a52, 111687b0, e7ae18c4, 77783126, f6ab0001, 9daeff15, and the Phase 6 commit); =make theme-studio-test= green (98 node tests, 16 browser gates). Code-complete and self-verified. The hue-adjacent warm-color grouping limitation is filed as a separate research task (=~/color-sorting.org=). Remaining: the manual aesthetic/fidelity sign-off under the Manual testing parent (hue grouping reads right, regenerate-replace reads as deliberate, removed-step "(gone)" is clear). Mark this DONE once that passes. +Retired 2026-06-13: the current implementation no longer uses color-derived hue families. Palette entries carry stable structural column ids, generated colors stay in their originating column, renames do not move tiles, and =#columntest= / =#roundtriptest= pin the behavior. +*** 2026-06-10 Wed @ 01:17:45 -0500 Family model core landed +Phase 1 (commit =ebe18d51=, grouping reworked in =77783126=). =familiesFromPalette=, =regenFamily=, =rankByLightness=, =stepRepointPlan= in app-core.js, pure and hex-derived. Grouping started as gap-clustering + flat neutral threshold; after the design discussion it became nearest-hue-anchor bucketing (no single-linkage chaining) + a lightness-scaled neutral threshold (pale tints keep their hue, mid grays go neutral). regenFamily handles n=0 without ramp()'s clamp; stepRepointPlan maps survivors / lists removed by signed lightness rank. 20 node tests including the green/yellow split and the no-chaining case. Open: hue-adjacent warm colors still merge — research task above (=~/color-sorting.org=). +*** 2026-06-10 Wed @ 01:17:45 -0500 Family sort core landed +Phase 2 (commit =74db9a52=). =sortFamilies=/=sortFamilyMembers=: neutrals first, then chromatic by base hue (rounded so a hue hair doesn't outrank lightness), ties by base lightness then hex; members dark→light. Display-only; stored palette order untouched. 4 node tests. +*** 2026-06-10 Wed @ 01:17:45 -0500 Family-strip rendering landed +Phase 3 (commit =111687b0=, columns =e7ae18c4=). renderPalette restructured into the pinned ground strip + hue-sorted family columns (top→bottom dark→light), chips keep per-chip rename/remove/select, move-arrows/drag dropped. #familytest gate locks the structure + rename-stays-in-strip. Existing palette flows stay green. +*** 2026-06-10 Wed @ 01:17:45 -0500 Count control + regenerate landed +Phase 4 (commit =f6ab0001=). Per-chromatic-strip count input (0-4); setting N regenerates the family as base ±N, repointing survivor references by lightness rank and leaving removed-step references on their now-gone hex. Also fixed the neutral-threshold curve to taper at both lightness ends (symmetric Munsell) so chroma-eased dark/light extremes keep their hue. #counttest gate covers count up/down + the survivor/removed reference behavior. +*** 2026-06-10 Wed @ 01:17:45 -0500 Base edit + retire ramp panel landed +Phase 5 (commit =9daeff15=). Editing a family base recolors the whole family (shared =regenFamilyInPlace= with the count control); editing a ground swatch writes the bg/fg assignment. The standalone ramp panel (button, panel, JS, CSS, #ramptest) is removed — fan a color via its column's count instead. #baseedittest gate covers base-edit recolor + reference follow + the bg-swatch edit. +*** 2026-06-10 Wed @ 01:17:45 -0500 Warnings, seeding, export, README close-out landed +Phase 6 (commit =c175e2be=). Export stays a flat palette and import needs no reconstruction (#roundtriptest: export→import→export byte-identical). =seedPkgmap= reads the flat palette unchanged. The too-similar warning stays on the full palette — the planned ramp-step exemption was dropped after analysis: ramp steps are a stepL apart (well above the ΔE threshold) so they never warn, and exempting same-family pairs would hide genuine near-duplicates (caught by #deltatest). README documents families, the ground strip, the count control/regenerate, removed-step references, and the ramp-panel removal. +** DONE [#B] theme-studio delete entire color column :feature:quick:solo:studio: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +Add a column-level delete affordance to the palette. Deleting a normal color column removes the base color and every generated/imported tile in that column from the screen and from =PALETTE=. Ground remains pinned and non-deletable. Existing assignments that referenced removed tiles should follow the current deleted-color behavior: they remain on the old hex and appear as recoverable =(gone)= values rather than silently repointing. + +Acceptance notes: add a browser gate proving a column delete removes all entries with that stable =columnId=, leaves other columns alone, leaves ground non-deletable, and preserves any references to deleted hexes as gone values. + +Shipped 2026-06-13 in commit =2cf730d5=: normal column headers have a delete button, ground has no delete affordance, deleted names feed =lastGone= for recovery, and =#columntest= pins the behavior. +** DONE [#B] theme-studio palette ramps + contrast safety v1 :feature:studio: +CLOSED: [2026-06-13 Sat] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-10 +:END: +The v1 build from [[file:docs/theme-studio-palette-ramps-spec.org][theme-studio-palette-ramps-spec.org]] (Ready, Codex-reviewed). Two coupled features: a ramp generator (one base color → harmonized tonal ramp) and background-contrast safety (worst-case floor over a face's foreground set + safe-lightness guidance). + +All five phases + the README close-out landed 2026-06-09 (commits 1d51a332, 9da6c663, e7021bfe, 1d8b9f9e, 843bbf08, 23926837); =make theme-studio-test= green (78 node tests, 12 browser gates). Code-complete and self-verified. Remaining: the aesthetic and real-Emacs-fidelity sign-off under the Manual testing parent below (does a ramp harmonize, does the safe band read clearly, does a "safe" tint actually read behind real syntax). Mark this DONE once that passes. +Retired 2026-06-13: this parent is no longer active planning work. The useful pieces are already in the current tool, and later structural-column work replaced the standalone ramp workflow. +*** 2026-06-09 Tue @ 18:40:20 -0500 Ramp generator core landed +Phase 1 (commit =1d51a332=). =ramp(baseHex, {n, stepL, chromaEase})= in app-core.js → ={steps: [{hex, clamped, offset}], adjusted}= or ={steps: [], error: 'bad-hex'}=. Holds the OKLCH hue, steps lightness by =stepL=, quadratic chroma-ease toward the extremes, gamut-clamps each step; knobs clamp to range with the clamped knob named in =adjusted= (n=2/stepL=0.08/chromaEase=0.5 defaults). 10 node tests (mid/near-white/near-black bases, hue-hold, chroma ease, knob clamping, malformed hex), suite 55→65, =make theme-studio-test= green. The app-core integrity stripper now drops =import= lines too. +*** 2026-06-09 Tue @ 19:06:46 -0500 Ramp UI in palette landed +Phase 2 (commit =9da6c663=). A "ramp" button opens a panel that generates from the current color and previews the steps (named per source swatch, clamp badge on out-of-gamut steps); the n/stepL/chroma-ease controls default to 2/0.08/0.5. Click a step or "add all" to insert adjacent to the source in -n..+n order; name collisions skip (no overwrite), hex duplicates add with a flag. New #ramptest gate pins count, ordered insertion, collision skip, and the clamp badge. Verified headless + screenshot. +*** 2026-06-09 Tue @ 18:53:16 -0500 Foreground-set + floor + L_max core landed +Phase 3 (commit =e7021bfe=). =fgSetFor=, =floor=, =lMax= and the =COVERED_FACES= constant in app-core.js, all pure and explicit-state. fgSetFor returns {set:[{hex,label}]} or a structured reason ('out-of-scope'/'empty'); floor returns {ratio, limitingHex, limitingLabel}; lMax scans L from black to bracket the dark-side crossing then binary-searches it (tol 0.001), status ok/none/all/clamp. 13 node tests including the keyword-blue #67809c fixture and lMax's none/all/clamp branches. Suite 65→78, =make theme-studio-test= green. +*** 2026-06-09 Tue @ 19:06:46 -0500 Worst-case contrast readout landed +Phase 4 (commit =1d8b9f9e=). The five covered overlay faces show the worst-case floor over their foreground set (live syntax colors + default fg) and name the limiting foreground; a syntax-color edit repaints them. Out-of-scope faces keep the single-pair cell; an empty set reads "no fg set". Verdict is WCAG AA by default. New #contrasttest gate pins the readout, the keyword-blue limiting case, the single-pair fallback, and the no-set string. +*** 2026-06-09 Tue @ 19:06:46 -0500 Safe-lightness picker guidance landed +Phase 5 (commit =843bbf08=). The OKLCH picker gets a "safe for" selector over the covered faces; the C×L plane shades the lightness band too light to keep that face readable, with the L_max ceiling (via =lMax= at the current chroma) as the band's lower edge. A too-dark foreground shades the whole plane. New #safetest gate pins band-shows-for-covered-face and hides-when-none. Verified headless + screenshot. +*** 2026-06-09 Tue @ 19:06:46 -0500 README + test-surface close-out landed +Commit =23926837=. README documents the ramp controls and defaults, the worst-case floor / limiting foreground, the five covered faces, the safe-lightness guidance, and WCAG-drives-PASS-FAIL with APCA as a diagnostic; the browser-gate list is updated. =make theme-studio-test= carries all new node tests and the #ramptest/#contrasttest/#safetest gates. All acceptance criteria met. +** DONE [#B] theme-studio preview face mislinks (org, erc, flycheck) :bug:quick:solo:studio: +CLOSED: [2026-06-13 Sat] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-11 +:END: +Found by Craig 2026-06-11 during the manual-test walk (org case), then a full audit of all 20 bespoke previews confirmed three mislinks; the rest are clean: + +1. app.js:564 (org) — "Heading three" carries data-face org-headline-todo on a line with no TODO keyword; org-headline-todo's docstring says it applies to the part of the headline after the TODO keyword. Fix: add an org-todo keyword span mirroring the DONE line at app.js:563 (stars = org-level-3, keyword = org-todo, text = org-headline-todo). +2. app.js:765-766 (erc) — swapped: craig's own message text is erc-default-face and bob's is erc-input-face. erc-input-face is "ERC face used for your input"; swap them. +3. app.js:720 (flycheck) — swapped: brackets carry flycheck-delimited-error and the content flycheck-error-delimiter. In flycheck's delimiters highlighting style the delimiter strings get error-delimiter and the enclosed text gets delimited-error; swap them. + +Pin with a browser-gate assertion that these preview elements link the right faces (e.g. the org headline-todo span sits after an org-todo span; the erc my-message line uses input-face). +Fixed 2026-06-13: org heading three now has an =org-todo= keyword before =org-headline-todo=, flycheck delimiters/content are mapped to =flycheck-error-delimiter= / =flycheck-delimited-error= correctly, and ERC own/remote message text use =erc-input-face= / =erc-default-face=. Added =#previewlinktest= to pin all three mappings. +** DONE [#B] theme-studio spans should stop at bg and fg bounds :bug:quick:solo:studio: +CLOSED: [2026-06-15 Mon] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +Done in commit 25e2d2ad: regenColumn ramps the dark side toward bg and the light side toward fg, bounded by the ground endpoints; pure black/white duplicates still skipped. Node tests + the #counttest bounds assertion pin it. +From the roam inbox: spanning a color should not generate colors beyond the current ground endpoints. No generated color should be darker than =bg= or lighter than =fg=. If the darker side hits =#000000=, do not create duplicate black tiles; if the lighter side hits =#ffffff=, do not create duplicate white tiles. Apply this to normal column spans and ground spans as appropriate, then pin with Node tests for the ramp/column plan and a browser gate for the palette UI. +** DONE [#B] vertico-prescient clobbers orderless filtering :bug:quick:solo: +CLOSED: [2026-06-13 Sat] +=modules/selection-framework.el:250= — =vertico-prescient-mode= defaults =vertico-prescient-enable-filtering t=, overriding =completion-styles= to prescient inside vertico sessions; the orderless config at :151 is dead exactly where it matters. Set =vertico-prescient-enable-filtering nil= — orderless matches, prescient sorts (and this resolves the dead =vertico-sort-function= finding in the buffer/window-libs child the other way around). From the 2026-06 config audit. +Fixed 2026-06-13: added =:custom (vertico-prescient-enable-filtering nil)= to the vertico-prescient use-package. Live daemon confirmed filtering nil + =completion-styles (orderless basic)= with the mode re-enabled — orderless matches, prescient sorts. No ERT test (framework defcustom, unexercisable in the stubbed-use-package harness); the in-session matching check is a VERIFY under Manual testing and validation. +** DONE [#C] Swap buffer delete/diff keys — destructive on capital :refactor:quick:solo: +CLOSED: [2026-06-13 Sat] +=modules/custom-buffer-file.el:515= binds =d= = =cj/delete-buffer-and-file= and =D= = =cj/diff-buffer-with-file=. Destructive commands should be the capital, and diff is the one hit often (when saving a buffer changed on disk). Swap them: =D= = delete, =d= = diff. From the roam inbox. +Swapped 2026-06-13: =cj/buffer-and-file-map= now binds =d= = =cj/diff-buffer-with-file=, =D= = =cj/delete-buffer-and-file=. keymap-lookup test added; live daemon re-bound by hand (defvar-keymap won't reassign a bound var on reload). Keypress check is a VERIFY under Manual testing and validation. +** DONE [#C] theme-studio: remove redundant reset button on package faces :refactor:quick:studio: +CLOSED: [2026-06-15 Mon] +Removed the per-row reset column (package faces was the only tier with one). It was not equivalent to the bulk reset next to "lock all": per-row reset one face, bulk resets every unlocked face. Single reset path now, matching syntax/ui tiers. Commit 7a7b1c16. +** DONE [#C] theme-studio: rename preview sample names :feature:quick:solo:studio: +CLOSED: [2026-06-15 Mon] +Renamed the preview personas Alice→Christine and Eve→Evan across the mu4e/signel/telega previews, with the mu4e header spacing adjusted to stay aligned. Commit 44128931. +** DONE [#C] theme-studio Rust + Zig language previews :feature:studio: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-11 +:END: +Requested by Craig 2026-06-11: add Rust and Zig code samples to the language previews (samples.py currently carries Elisp, Go, Python, TypeScript, Java, C, C++, Shell). Each sample should exercise the treesit token categories distinctive to its language (Rust: lifetimes, macros, attributes, traits; Zig: comptime, builtins, error unions), then regenerate theme-studio.html and extend the test surface. + +Shipped 2026-06-13: Rust and Zig were added to =samples.py= and =generate.py=, with generator tests pinning the language-specific category coverage. +** DONE [#C] theme-studio separate tile selection from name editing :feature:quick:solo:studio: +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +From the roam inbox: clicking a palette tile should have predictable intent. Single-click anywhere on a tile should select the whole color tile for editing/assignment. Double-clicking the name should enter name-edit mode with the cursor at the beginning of the name. Add browser-gate coverage for both paths so accidental single-click name edits do not regress. + +Shipped 2026-06-13: tile names are read-only until double-clicked; single-click selects the tile, and =#columntest= pins single-click vs double-click behavior. +** CANCELLED [#D] Desktop quick-capture: Note + Recipe types :feature:solo: +CLOSED: [2026-06-15 Mon] +Superseded 2026-06-15: the desktop popup was simplified to a single Task into the org-roam inbox (no Bug/Event, no template menu), so adding Note/Recipe types to the popup subset no longer applies. +** DONE [#A] theme-studio: remove the in-table preview column :refactor:studio: +CLOSED: [2026-06-15 Mon 20:57] +Drop the per-row preview from the assignment tables and rely on the live buffer preview alone. Requires auditing every assignment view so each face in the faces column has a situationally appropriate representation in the live preview. Craig wants a reusable project workflow for that periodic audit, created before the refit so it can drive the fix. From the roam inbox. +** DONE [#B] dupre-theme test failures :bug:test:quick:solo: +CLOSED: [2026-06-15 Mon] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-11 +:END: +Moot: dupre was retired (commit 4f0a8d80) and tests/test-dupre-theme.el was deleted with it, so the 4 failures no longer exist. The assertion-fix plan below is superseded. Remaining "dupre" mentions in the suite are benign (a fake theme symbol in test-face-diagnostic; a "dupre-fixture" JSON name in test-build-theme, a separate converter task). + +A full =make test= run (2026-06-07) is green across 516 of 517 files; the only failures are 4 tests in =tests/test-dupre-theme.el=, long pre-existing. Two root causes. For each, decide whether the palette or the test assertion is canonical, then fix the loser so =make test= goes fully green. + +Decided 2026-06-11 (Craig): #0d0b0a is the canonical background — the three drift assertions are stale, update them. org-todo stays the muted red-1 #a7502d — update the test's expected value. Both sides decided; this is now a pure assertion fix. + +*** TODO Background drift: 3 tests expect #151311, palette bg is #0d0b0a +=dupre-get-color-base= (test:46), =dupre-theme-default-face= (test:84), and =dupre-with-colors-binds-values= (test:62) all assert the default background is "#151311", but =themes/dupre-palette.el= defines =bg= as "#0d0b0a". The committed palette looks intentional, so the three assertions are likely just stale -- confirm #0d0b0a is the wanted background, then update the tests. + +*** TODO org-todo color mismatch: test expects #ff2a00, theme renders #a7502d +=dupre-theme-org-todo= (test:130) asserts the org-todo foreground is "#ff2a00" (intense-red), but the theme renders "#a7502d" (red-1). Design call: should org-todo be the bright intense-red or the muted red-1? Fix whichever side loses the decision. +** DONE [#B] reconcile-open-repos skips any repo with a dot in its name :bug:quick:solo: +CLOSED: [2026-06-15 Mon] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +=modules/reconcile-open-repos.el:174= — discovery regexp ="^[^.]+$"= matches only dot-free names, so =~/code/mcp.el=, =capture.el=, =google-contacts.el=, =auto-dim-other-buffers.el= etc. are never reconciled while M-P still reports "Complete." Replace with =directory-files-no-dot-files-regexp= + a hidden-dir check; add a regression test with a dotted repo name. From the 2026-06 config audit. +*** 2026-06-13 Sat @ 11:01:44 -0500 Fixed: regexp swapped + hidden-dir check +=cj/find-git-repos= now iterates =directory-files-no-dot-files-regexp= (keeps dotted names, drops =.=/=..=) plus a =string-prefix-p "."= guard for hidden dirs. Regression test =test-find-git-repos-boundary-dotted-repo-name-found= (mcp.el/capture.el/plain-repo → 3 found); existing hidden-dirs-skipped test stays green; 11/11. Live daemon confirmed all six dotted repos under ~/code now discovered (mcp.el, gptel-mcp.el, capture.el, google-contacts.el, google-maps.el, auto-dim-other-buffers.el). Re-verified live 2026-06-15 (41 repos, 6 dotted); Craig confirmed. +** DONE [#B] theme-studio save button does not overwrite the current theme file :bug:studio: +CLOSED: [2026-06-15 Mon] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +Resolved — Craig handled it 2026-06-15. +From the roam inbox: the =save= button currently behaves too much like =export=. The intended workflow is: after a theme file has been opened or saved once, pressing =save= or using the save keybinding overwrites that same file instead of downloading a fresh export. If browser security prevents overwriting a previously exported download without a file handle, make that limitation explicit in the UI and reconsider whether the separate save button should remain. This needs a small product decision around export-vs-save semantics before implementation. +** CANCELLED [#A] Global yes-or-no-p fset defeats every strong confirmation :bug:quick: +CLOSED: [2026-06-15 Mon 22:40] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +=modules/system-defaults.el:203= =(fset 'yes-or-no-p 'y-or-n-p)= — verified live. Several modules deliberately chose yes-or-no-p as the strong tier for irreversible actions: shutdown/reboot (=system-commands.el:74=, whose comment explicitly says "so a stray RET/space can't trigger them"), "permanently destroy files" (=dwim-shell-config.el:804=), file overwrites (=custom-buffer-file.el:159,199=, =music-config.el:374=). The fset makes all of them single-keystroke — the two-tier design is dead. Drop the fset, or provide a real =cj/confirm-strong= (typed "yes") for the irreversible set. From the 2026-06 config audit. +Fixed 2026-06-13 (Craig chose the surgical option): added =cj/confirm-strong= to system-lib.el (binds =use-short-answers= nil for one =yes-or-no-p= call → typed "yes"); removed the redundant fset (kept =use-short-answers t= so benign prompts stay single-key); routed the 6 irreversible sites through it (shutdown/reboot, permanent-destroy, file overwrites). Note: the fset is baked into the running daemon and can't be cleared from Lisp, so the typed-"yes" tier goes live only after a daemon restart — manual confirm under the Manual testing parent. TDD; tests green. +** DONE [#B] Add Signal to the dashboard :quick:solo: +CLOSED: [2026-06-15 Mon] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-01 +:END: +** DONE [#B] ai-term adaptive side/bottom window placement :feature:quick:solo: +CLOSED: [2026-06-15 Mon] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +The ai-term window should dock from whichever edge conserves more screen space, chosen at display time from the frame's aspect ratio: when the frame is wider than it is tall, dock from the right; when it is square or taller than wide, dock from the bottom. Compare the frame's pixel width against its height in the display-buffer rule to pick the edge. +** DONE [#B] auth-config: unguarded gpg-connect-agent call + compile-time require :bug:quick:solo: +CLOSED: [2026-06-15 Mon] +Fixed in cd95ea79: guarded gpg-connect-agent with cj/executable-find-or-warn; runtime require of user-constants. +From the 2026-06 config audit. =modules/auth-config.el:88= — bare =(call-process "gpg-connect-agent" ...)= in a =:demand t= :config signals file-missing and aborts init on machines without the binary; guard with =cj/executable-find-or-warn=. =auth-config.el:36= — =user-constants= is required only =eval-when-compile= but =authinfo-file= is read at load time; works from .el source, fails from standalone .elc. Use a runtime require (system-defaults.el:32-35 documents this exact trap). +** DONE [#B] Dashboard keybinding changes :quick:solo: +CLOSED: [2026-06-15 Mon] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-06 +:END: +On the dashboard, =g= should refresh the buffer (=dashboard-refresh-buffer=); =g= currently opens Telegram (=cj/telega=, dashboard-config.el:88), so move Telegram to another key. F1 (=cj/dashboard-only=) should also run a refresh at the end, so re-showing the dashboard always lands on fresh content. F1-refresh folded in from the roam inbox 2026-06-13. +** DONE [#B] eshell: visual-commands nested-list + xterm-color dead hook :bug:quick:solo: +CLOSED: [2026-06-15 Mon] +Fixed in de32ffbe: dolist visual-commands; xterm-color real hook name + filter wiring. +=modules/eshell-config.el:104= — =add-to-list= pushes one LIST into the flat string list =eshell-visual-commands=, so lf/ranger/htop/top never get a visual terminal (and the r→ranger alias garbles). dolist the strings. =:166= — =:hook (eshell-before-prompt-hook . ...)= gets "-hook" appended → registers on nonexistent =eshell-before-prompt-hook-hook=; and =xterm-color-filter= is never added to =eshell-preoutput-filter-functions= anyway while TERM advertises xterm-256color. Wire xterm-color fully per its README or drop it + the TERM override. From the 2026-06 config audit. +** DONE [#B] eww quick-add bookmarks split the store and break the default file :bug:quick:solo: +CLOSED: [2026-06-15 Mon] +Fixed in 7d58ccfb: dropped the dir-creating let-binding so quick-add shares the default store. +=modules/eww-config.el:116-126= — quick-add let-binds =eww-bookmarks-directory= to ~/.emacs.d/eww-bookmarks/ (creating a DIRECTORY at the path where the daemon's default store expects a FILE ~/.emacs.d/eww-bookmarks). After one quick-add, B reads an unreadable path and quick-added bookmarks are invisible post-restart. Drop the let-binding or setq the directory once in :config so both commands share one store. From the 2026-06 config audit. +** DONE [#B] Go: format key void-functions, go-mode :config never runs :bug:quick:solo: +CLOSED: [2026-06-15 Mon] +Fixed in 4038cf59: :commands (gofmt) autoloads gofmt so C-; f pulls go-mode and its :config. +=modules/prog-go.el:99,113-118= — .go maps to go-ts-mode so the go-mode package never loads, and =gofmt= isn't autoloaded in go-mode 1.6.0 — C-; f signals void-function, and the :config (exec-path += ~/go/bin, =gofmt-command "goimports"=) never executes. Wrapper that requires go-mode first (or autoload gofmt), move the setup to top level. From the 2026-06 config audit. +** DONE [#B] prog hooks mutate global state per buffer :bug:quick:solo: +CLOSED: [2026-06-15 Mon] +Fixed in 902290a4: electric-pair-local-mode in go/c/shell hooks; line-number setqs hoisted to top level. +From the 2026-06 config audit: =prog-go.el:64=, =prog-c.el:73=, =prog-shell.el:77= call global =(electric-pair-mode t)= from buffer setup hooks — one Go/C/shell buffer turns on pairing in org/text everywhere (python/webdev correctly use =electric-pair-local-mode=). =prog-general.el:79-80= — =display-line-numbers-type 'relative= setq/setq-default run from the hook AFTER the mode is enabled, so the first prog buffer of a session gets absolute numbers. Local-mode for the three; move the line-number setqs to top level. +The global electric-pair this turns on also paired "<" in org, stranding a ">" after "<"-key snippets (=#+end_src>=, broke cj-scan). That symptom is fixed separately (=d9c90e83=, an =electric-pair-inhibit-predicate= for "<"). This task remains the root fix: pairing should not be global at all. +** DONE [#B] Remove buffer-state cursor coloring :refactor: +CLOSED: [2026-06-15 Mon] +Removed cj/set-cursor-color-according-to-mode + the two cache defvars + the post-command/server-after-make-frame hook registrations from ui-config.el; cursor now uses the theme cursor face. Kept cj/buffer-status-state / cj/buffer-status-color in user-constants.el (modeline still uses them). Deleted tests/test-ui-cursor-color-integration.el (all cursor-function tests) and dropped the one cursor-function test from test-ui-config--buffer-cursor-state.el (kept its 6 classifier tests). Live daemon cleaned (hook removed, fn unbound, cursor reset). + +Craig directed removal (roam inbox, 2026-06-15): the cursor changing color by buffer state is confusing ("strange not knowing what your cursor should look like"). Remove cj/set-cursor-color-according-to-mode, the cj/-cursor-last-color / cj/-cursor-last-buffer defvars, and the post-command-hook + server-after-make-frame-hook registrations in ui-config.el, so the cursor uses the theme's cursor face. Keep the shared cj/buffer-status-state / cj/buffer-status-color classifier (the modeline buffer-name indicator still uses it). Before deleting tests/test-ui-cursor-color-integration.el and tests/test-ui-config--buffer-cursor-state.el, confirm which covers the shared classifier (keep) versus the cursor function (remove). Update the cursor header comment. This settles the earlier keep-vs-remove question: 7ccc3f5c's theme-driven rework is the thing to drop. +** DONE [#B] Split window opens the dashboard in the other window :feature:quick:solo: +CLOSED: [2026-06-15 Mon] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-10 +:END: +When splitting with C-x 2 (=split-window-below=) or C-x 3 (=split-window-right=), the new/other window should default to the =*dashboard*= buffer instead of mirroring the current buffer. Advise =split-window-below= / =split-window-right= (or rebind the keys) to select the dashboard in the freshly-created window. Keep point in the original window. +** DONE [#B] system-defaults: top-level server-start unguarded in batch :bug:quick:solo: +CLOSED: [2026-06-15 Mon] +Fixed in 79a38fe1: (unless noninteractive ...) guards on server-start and the custom-file temp. +=modules/system-defaults.el:140= — raw module load under =--batch= (make validate-modules on a machine with no daemon socket) starts a server from a batch process; the suite only passes because the testutil stubs it. Wrap in =(unless noninteractive ...)= — the repo's established guard for this defect class; same guard stops the =custom-file= =make-temp-file= at line 104 littering temp files per batch load. From the 2026-06 config audit. +** DONE [#C] theme-studio: extract a ground() helper for the repeated bg/fg literal :refactor:quick:solo:studio: +CLOSED: [2026-06-15 Mon] +Done in de6fccc9 as groundPair() (named to avoid the local `ground` destructure collision; 32 call sites). +The literal {bg:MAP['bg'],fg:MAP['p']} repeats 21 times across app.js and palette-actions.js, plus more in the browser gates. Extract a ground() helper that returns it and replace every call site. Purely mechanical, no behavior change; the node tests + browser gates are the safety net. From the 2026-06-15 refactor review. +** DONE [#C] cj/undo-kill-buffer skip-visited uses delq (eq) on path strings :bug:quick:solo: +CLOSED: [2026-06-15 Mon] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +=modules/ui-navigation.el= — the visited-file filter calls =(delq buf-file recently-killed-list)= where =buf-file= is a fresh string from =expand-file-name=, never =eq= to the =recentf-list= entries, so already-open files are never skipped (the skip logic is dead). Use =delete= (equal-based). Found 2026-06-12 while fixing the off-by-one above; the two bugs cancel exactly when one file is open, which is why it went unnoticed. +** DONE [#B] C-s C-s vertico-repeat path never works :bug:quick:solo:next: +CLOSED: [2026-06-15 Mon] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +Fixed in b62af096 (prior session): vertico-repeat-save added to minibuffer-setup-hook so a session exists for the second C-s. Re-verified live 2026-06-15: the hook is installed and cj/consult-line-or-repeat is defined. +=modules/selection-framework.el:263= — =cj/consult-line-or-repeat= calls =vertico-repeat= on the second consecutive C-s, but nothing adds =vertico-repeat-save= to =minibuffer-setup-hook= (grep: zero hits config-wide), so it always signals "No Vertico session". Add the hook next to the vertico use-package block. From the 2026-06 config audit. +*** 2026-06-13 Sat @ 10:59:52 -0500 Fixed: vertico-repeat-save hooked +Added top-level =(add-hook 'minibuffer-setup-hook #'vertico-repeat-save)= after the vertico use-package block (placed top-level, not inside use-package, so the stub-use-package test exercises it; =vertico-repeat-save= is autoloaded, deferring the load to first minibuffer). New test asserts hook membership; 5/5 green; evaled into the live daemon (=:on-hook= now t). Awaiting Craig's confirm → DONE. +** DONE [#B] dirvish M (mark all files) marks every other file :bug:quick:solo:next: +CLOSED: [2026-06-15 Mon] +Rewrote cj/dired-mark-all-visible-files with dired-get-filename + file-directory-p and an if/else so dired-mark's own point-advance isn't doubled by forward-line. Added real-dired marked-count tests; retired the now-dead regex helper and its fake-buffer mock test. +=modules/dirvish-config.el:218= — =dired-mark= advances point to the next line itself; the loop's extra =forward-line 1= then skips it, so consecutive files are marked alternately. Live mis-marking on a key that feeds batch operations (delete/copy on marked files) — data-loss adjacent. Drop the manual forward-line when a mark was made (or =dired-unmark-all-marks= + mark dirs + =dired-toggle-marks=). The trivial line-predicate helper is tested; the loop isn't — add the marked-count test. From the 2026-06 config audit. +** DONE [#B] heavy-box comment inserts non-comment lines :bug:solo:next: +CLOSED: [2026-06-15 Mon] +cj/--comment-heavy-box now prefixes the interior empty/text lines with the comment char + suffix (like cj/--comment-box) so they stay valid comments in line-comment languages, and gained the min-length guard (small/negative widths now error cleanly instead of hitting make-string). The two characterization assertions that pinned the broken bare-* lines were updated to the corrected output. +=modules/custom-comments.el:427= — =cj/--comment-heavy-box= interior/empty lines carry no comment prefix, so in line-comment languages (elisp, Python) C-; C h injects syntax-breaking bare =*...= lines. The existing test characterizes the broken output (asserts =^\*.*\*$=). Prefix interiors like =cj/--comment-box= does; add the missing min-length validation (negative width hits make-string with a raw error); fix the test to assert corrected output. From the 2026-06 config audit. +** DONE [#B] Scratch buffer background a shade lighter than default :feature:next: +CLOSED: [2026-06-15 Mon] +cj/scratch-apply-background remaps the *scratch* default background lighter (cj/scratch-background-lighten percent, default 5) via color-lighten-name, applied on the existing emacs-startup-hook. The percent is a tunable defcustom. Pure helper tested for the display-independent contract; the lightening itself is display-dependent (color-name-to-rgb), verified live in the daemon. +Make *scratch* just-noticeably lighter than the normal background so it reads as the scratch buffer. Simplest is a buffer-local face remap on *scratch*; Craig is fine routing it through org-faces if a theme hook is wanted. The exact lightening delta is an aesthetic call to tune visually. From the roam inbox. +** DONE [#C] theme-studio: drop the too-similar-colors message below the palette :refactor:studio:next: +CLOSED: [2026-06-15 Mon] +Removed the renderPaletteWarnings box (function, #palwarn element, .palwarn CSS) and its #deltatest browser gate. The per-chip nearest-ΔE tooltip stays (paletteWarnings still computes `nearest`), so the same info remains reachable inline. +Remove the too-similar-colors warning under the palette display. It isn't useful there; the same information is reachable per-assignment through the inline contrast field. From the roam inbox 2026-06-15. +** CANCELLED [#C] theme-studio: raise the max color spans to 5 :feature:studio: +CLOSED: [2026-06-15 Mon 22:52] +Increase the palette's maximum span count to 5, for a smoother, slower transition across a color. From the roam inbox. +*** CANCELLED which control caps below 5 — current maxes are all 8 +CLOSED: [2026-06-15 Mon 22:52] +On review the per-column span control, the ground span control, and regenColumn all already cap at 8 (well above 5), so there's no sub-5 limit to raise. Either 5 is already reachable, or the intended control is a different one (e.g. the generator emits base-only columns — spanCount is hardcoded 0 in palette-generator-ui.js). Need Craig to point at the control he's hitting. +** DONE [#C] Page-down in a long completing-read selects and dismisses the list :bug:next: +CLOSED: [2026-06-15 Mon] +Bound <next>/<prior> to vertico-scroll-up/down in vertico-map, so Page-Up/Down page the candidate list instead of falling through to history (which selected and dismissed). Verified live (use-package :bind isn't reachable under make test). +In a very long completing-read (vertico), Page-Down selects an item and the list vanishes instead of paging, forcing a cancel. Investigate the completion stack's next-page handling; likely needs vertico-scroll-up / vertico-scroll-down bound in vertico-map. From the roam inbox. +** CANCELLED [#C] theme-studio reconsider the JSON show button :feature:quick:studio: +CLOSED: [2026-06-15 Mon 22:56] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +From the roam inbox: the =show= button for the raw JSON export does not fit the main theme-design workflow, but it may still be useful for debugging. Decide whether to hide it behind a debugging affordance, rename it, or remove it. Quick UI cleanup once the desired debugging surface is chosen; not marked solo because it is a workflow preference call. +** DONE [#B] TTY-accessible personal C-; keymap :feature:solo:quick: +CLOSED: [2026-06-16 Tue] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-05 +:END: +Done 2026-06-16: keybindings.el binds cj/custom-keymap under C-c ; alongside C-;, so the whole command family is reachable in a terminal frame with the same leaf keys (the single-point fix the body describes; no env-terminal-p branch). Audited every leaf key registered into the family — all are TTY-safe (letters, digits, punctuation, SPC, and arrow keys under C-; b, which terminals do encode); no C-RET, super, or hyper bindings, so nothing needed remapping. TDD: tests/test-keybindings-tty-mirror.el (3 tests, both prefixes share one map); full suite green; live-reloaded and confirmed C-c ; resolves to the family in the daemon. Commit pending. TTY-frame sign-off is a VERIFY under Manual testing and validation. +The personal prefix =C-;= (Control-semicolon) is GUI-only — terminals can't encode it, so the entire custom command family (=C-; g= calendar, =C-; a= AI, =C-; S= Slack, =C-; O= org, =C-; M= Signal, =C-; L= pearl, =C-; j= jump, …) is unreachable in a terminal frame (=emacsclient -nw=, Emacs inside vterm/tmux). Surfaced 2026-06-03 out of the pearl =C-; L= prefix discussion. + +Goal: keep =C-;= in GUI and add a TTY-typable mirror prefix so the same leaf keys work in a terminal. The fix is a single point: =modules/keybindings.el= defines =cj/custom-keymap= once, binds it globally with =(keymap-global-set "C-;" cj/custom-keymap)=, and every module registers into it via =cj/bind-prefix= / =cj/bind-command=. Binding that one keymap under a second prefix mirrors the whole family for free — no per-module edits. + +Easy prefix candidates (home-row-leaning, TTY-safe), same leaf keys under each: +- =C-c ;= (recommended) — keeps the semicolon mnemonic; =C-c= is the standard user prefix and always TTY-encodable, =;= is home row. =C-; L= becomes =C-c ; L=, zero leaf-key relearning. Bind it unconditionally alongside =C-;= so both GUI and TTY reach the identical map — no =env-terminal-p= branch needed. +- =C-c SPC= — easy reach, but collides with =org-table-blank-field= (=C-c SPC=) inside org buffers. +- Bare =C-c <leaf>= (the literal "C-c L" idea) — rejected: =C-c= is shared with org (=C-c l= = =org-store-link=, confirmed live), the LSP prefix (=lsp-keymap-prefix "C-c l"=), and pdf-view; binding the whole family under bare =C-c= would shadow/conflict with those. + +While in here, audit individual leaf chords for other non-TTY keys (any =C-RET=, super/hyper bindings — terminals can't send super/hyper either) and note or remap them. Verify the result in an actual =emacs -nw= / =emacsclient -nw= frame, not just GUI. Relates to the standing "org-mode keybinding consolidation" reminder. + +** DONE [#C] theme-studio: open with the palette collapsed to base colors :feature:studio:next: +CLOSED: [2026-06-16 Tue] +Every time theme-studio opens, the palette shows all colors including the span tints. Instead it should open showing the base colors only, and the user expands the spans by clicking the left-side arrow menu. From the roam inbox 2026-06-16. Craig: "just do it. :)" +Done 2026-06-16: initApp sets paletteShowFull=false before the first render, so the studio opens collapsed (arrow ▶); the existing toggle expands the spans. New #paldefaulttest gate asserts the opening collapsed state; #counttest and #paltoggletest now opt into full mode explicitly since they assert span tiles. Full suite green. +** DONE [#C] theme-studio: realistic markdown-mode preview :feature:studio: +CLOSED: [2026-06-16 Tue] +markdown-mode fell back to the generic preview (face names in their own colors). Built renderMarkdownPreview (app.js): a realistic README exercising 28 markdown faces in context (front matter, H1-H3, bold/italic, inline + fenced code with a language tag, links + bare URLs, lists + GFM checkboxes, blockquote + footnote, table, hr, strikethrough, highlight, math, inline HTML, comment). Routed via a PREVIEW_KEYS map in app_inventory.py (markdown-mode -> markdown). #mdtest gate validates every data-face is a real markdown face; full theme-studio suite green. Commit =0682b24f=, pushed. Visual sign-off is a VERIFY under Manual testing and validation. +** DONE [#C] cj/gptel-switch-backend reintroduces the string-model crash :bug:quick:solo: +CLOSED: [2026-06-16 Tue] +=modules/ai-config.el:272= — =(setq gptel-model model)= with the raw completing-read STRING — the documented wrong-type-argument-symbolp modeline hang (CLAUDE.md gotcha), reachable from C-; a B today. =cj/gptel-change-model= (C-; a m) already does backend+model switching and interns correctly. Intern here, or delete switch-backend and keep one command. From the 2026-06 config audit. + +Fixed 2026-06-16: added pure helper =cj/gptel--model-to-symbol= (mirrors =cj/gptel--model-to-string=) and coerced the completing-read value through it before =(setq gptel-model ...)= in =cj/gptel-switch-backend=. 7 ERT tests for the helper (=tests/test-ai-config-model-to-symbol.el=); the existing switch-backend test (=tests/test-ai-config-gptel-commands.el=) updated from asserting the raw string to asserting a symbol + a =symbolp= crash-guard. Full suite green; helper and the redefined command are live in the daemon. Chose "intern" over deleting the redundant command — the dedup is the VERIFY below. + +** DONE [#C] theme-studio picker panel blends into the page :bug:quick:solo:studio: +CLOSED: [2026-06-16 Tue] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-11 +:END: +Craig, 2026-06-11 manual-test walk: the color picker's background is hard to distinguish from the page background. Give the picker panel a visibly distinct background or a highlighted border so it stands out. Pin with a gate asserting the picker element carries the distinct style. +Done 2026-06-16: the picker now carries the gold accent border (#e8bd30) and a lighter background (#1f1c19 vs the page's #0d0b0a). The #pickertest gate asserts the accent border and a per-channel background lift of ≥12 over the page, so the distinction can't silently regress. + +** DONE [#A] ai-term: selecting an agent kills the whole Emacs process :bug: +CLOSED: [2026-06-18 Thu] +Root cause: a ghostel native-module regression in 0.35.0-0.35.2 (all shipped 2026-06-16..18), not anything in this config and not display-backend related. Reproduced down to a plain =M-x ghostel= in a GUI frame (not ai-term-specific); under gdb it is a clean =exit()= from the PGTK main loop (not a SIGSEGV — hence no core ever produced). Upstream filed it the same day: dakra/ghostel #422 (Linux/glibc — the native PTY path now spawns worker threads, and a SIGSETXID handler calls malloc while the main thread holds the glibc arena lock → crash/hang on =M-x ghostel= in a GUI daemon, exactly our case) and #423 (macOS — recursive os_unfair_lock via =run_window_change_functions=). =ghostel-comint= is not a usable workaround (no cursor positioning, can't run the Claude TUI). + +Fix: pinned ghostel to the last pre-rework build — =ghostel-20260604.2049=, commit 5779a2adceb2, native module 0.33.0 — installed directly into =elpa/= and held there by =:ensure= (won't auto-upgrade). See =modules/term-config.el=. Verified: the exact crash scenario (open a ghostel buffer in a PGTK GUI frame) now survives; ghostel buffer healthy; terminal test suites green. + +Also done this session: =ghostel-module-auto-install= set to =download= (the original "doesn't install" fix); zig 0.15.2 pinned at =/usr/local/bin/zig= as the compile fallback (Arch ships 0.16 which can't build ghostel); archsetup notified of the zig pin. + +*** 2026-06-18 Thu @ 16:33:56 -0500 ai-term confirmed working after the 0.33.0 pin +Craig confirmed in normal use — opening/selecting ai-terms works with no whole-process crash ("everything seems to be working as normal now"). Headless reproduction (open a ghostel buffer in a PGTK GUI frame) had already survived; this is the live-hands confirmation. +** DONE [#C] Reproducible face-coverage generator + coverage diff :feature:solo: +CLOSED: [2026-06-18 Thu] +Built: =face-coverage-dump.el= + =face_coverage.py= + =make face-coverage= / =make face-coverage-diff=. Validated by regenerating and diffing against the hand-built worklist (headings identical; only an intro line and one sharper description differ). Compare mode reports newly-covered / newly-present / disappeared / per-tier deltas. Unrecognized faces route by defface source (elpa -> own package bucket, built-in -> emacs-general child), so a newly-loaded package self-buckets. + +Known edge: a new package whose face prefix collides with an existing family name (e.g. =org-modern= faces start with =org=) folds into that family's bucket instead of getting its own, because the family match wins before the source fallback. Fix when it bites: add the package's prefix to =EXTRA_FAMILIES= in =face_coverage.py=. + +=scripts/theme-studio/face-coverage.org= is hand-regenerated by a throwaway /tmp script each time. Commit a self-contained generator so the worklist regenerates with one command, plus a diff that names what coverage changed between runs. + +Generator — two pieces plus a Makefile target: +- =face-coverage-dump.el= — batch elisp run via =emacsclient= against the live daemon (captures actually-loaded packages), with an =emacs --batch -l init.el= fallback for a clean checkout. For every face in =(face-list)= emit name, first-line docstring, and =(symbol-file f 'defface)=. One JSON/TSV out. +- =face_coverage.py= — read that dump plus the studio's managed set (font-lock map from =build-theme.el=, =UI_FACES= from =generate.py=, =package-inventory.json=); classify each face core/general/package by where its defface lives (=/usr/share/emacs= = built-in, =elpa= = package); group; write =face-coverage.org= with the TODO/DONE tree, =[d/t]= cookies, per-face docstrings, and per-bucket descriptions (group-documentation / package summary). +- =make face-coverage= runs both and writes the file. + +Carry over the manual logic already worked out: the CORE_HINT core-face set; the subsystem/package family buckets (including abbrev, which-func, git-gutter, git-commit, twentyfortyeight, yas, edit-indirect); the erc-ansi and =bg:erc=/=fg:erc= routing; and the separator-aware prefix match (=-=, =:=, =/=). + +Compare mode (=make face-coverage-diff=): +- Parse the committed (HEAD) =face-coverage.org= and the freshly generated one into face→state maps via =^\*+ (TODO|DONE) name=. Report newly covered (TODO→DONE), newly present (new package or Emacs upgrade), disappeared (package removed), and net coverage with per-tier deltas. +- =git diff face-coverage.org= already gives the raw line delta; this is the friendlier summary. +- Optional: append a dated =covered/total= line to a small coverage-log for progress over time. + +Dump from the live daemon by default (reflects the packages actually run); the batch fallback won't see lazily-loaded packages until required. +** DONE [#C] todo.org org-lint follow-ups :refactor: +CLOSED: [2026-06-20 Sat] +From the lint-org sweeps (2026-06-15, refreshed 2026-06-20). Resolved 2026-06-20: the misplaced-heading false positive was reworded (the bug-capture task's prose quoted heading-like "* TODO" strings), and the broken link was repointed from the missing =~/code/signel/todo.org= to =~/code/smoke/todo.org= (smoke is the evolved Signal package). The obsolete-properties-drawer entries no longer reproduce under a full org-lint pass. Both lint-org --check and the built-in org-lint now report zero. +** DONE [#B] F9 toggle collapses a 3-window layout to 2 :bug: +CLOSED: [2026-06-20 Sat] +Fixed 2026-06-20 (option 1 — reversible toggle, Craig's call). In a 3+ window layout where +the agent had its own split, toggle-on reused the working window at the bottom edge, +displacing its buffer and collapsing three windows to two. Added a flag +(=cj/--ai-term-last-toggle-deleted-split=) set when toggle-off delete-windows the agent's own +window; =cj/--ai-term-reuse-edge-window= consumes it and falls through to a fresh re-split, so +the agent returns to its own window and the others are untouched. The flag only changes the 3+ +window case (2-window slot-reuse unchanged). TDD regression +=test-ai-term--reuse-edge-window-3win-toggle-restores-own-window=; full =make test= green; +live-reloaded. Commit 64916462. GUI sign-off is a VERIFY under Manual testing and validation. +** DONE [#B] Codebase refactoring program — remaining batch :refactor:solo: +CLOSED: [2026-06-20 Sat] +Complete 2026-06-20: all 13 scan findings addressed across the day's sessions (see +=.ai/sessions/= for the logs). 5 medium extractions + 2 big single-file refactors + +6 theme-studio items including the browser-gates harness rewrite. The only item not +done is the item-8 plan() factory, consciously skipped as premature abstraction +(heterogeneous call sites — see "Remaining — item-8 plan() factory" below). +The original scan: full-codebase 8-agent fan-out over modules/ + scripts/theme-studio/, +one focused refactor per commit, won't-do items excluded. + +*** Working protocol (apply to every item) +- TDD: write/keep a failing-then-green test; harvest new test seams the refactor opens. +- Behavior-preserving only. If a "dedup" would delete a real test seam or couple + dissimilar code, SKIP it and record why (see skips below). +- Per refactor, verify in this order, then commit + push (no-approvals mode): + 1. =make test-file FILE=<basename.el>= for touched + new tests. + 2. =make validate-modules= (loads all 123 modules; catches load/paren errors). + 3. Init-launch smoke on a throwaway daemon: =emacs --daemon=cj-sNN=, then + =emacsclient -s cj-sNN -e '(emacs-pid)'= to capture the PID, check + =(length features)= = 807 and no init errors in the log, then kill by that + PID (the emacsclient kill-emacs is flaky; pkill -f 'daemon=cj-sNN' + self-matches its own shell — kill the captured PID). + 4. Live-reload the edited module into Craig's running daemon + (=emacsclient -e '(load "/home/cjennings/.emacs.d/modules/<m>.el")'=); skip + the live reload for big use-package modules whose :config restacks (verify via + the fresh smoke daemon instead, as with mail-config). +- Tab-heavy files: =sed -n 'A,Bp' FILE | cat -A= to get exact bytes before an Edit; + write NEW code in the documented 2-space style. +- Shared asset already created: =cj/format-region-with-program= in system-lib.el + (the run-a-formatter-over-the-buffer helper). Reuse it for any further + format-region duplicates. + +*** DONE — medium extractions (2026-06-20 afternoon) +All five shipped: calibredb-epub nov re-render/centering helpers (fccf29b0); +ai-term toggle-off teardown + working-buffer swap (62fee96b); calendar-sync +per-event exception parser (23f405b4); dirvish playlist-target resolution +(a1ca2fb0); custom-case per-word title-case decision (4cc9ca0b). + +*** DONE — big single-file + theme-studio (2026-06-20 afternoon, no-approvals run) +Both big single-file items shipped: dwim-shell branching command builders +(f93b4615); custom-comments divider/box generator dedup (42f0c88a). Five of the +six theme-studio items shipped: face_coverage path_kind (9a52370b), +capture-default-faces condition_matches unify (28b4d1cf), dropdownRowTextColor +delete (10a56789), test-file inline-integrity dedup — subTest loop + shared +inline-strip.mjs (13969c70), generate.py lazy _build()/__getattr__ (6df4ebdc), +browser-gates assertPreviewFaces for the 3 preview gates (5627f137). + +*** DONE — browser-gates harness rewrite (with Craig's go-ahead, 2026-06-20) +- =gate(id, body)= helper (05697e83): the 38 standard gates' ok/notes/A + title + + result-div boilerplate, note format standardized to " fails=". Each call site keeps + its literal =location.hash==='#NAMEtest'=. 6 custom gates stay inline. First automated + attempt deleted gates (a closing-finder spanned boundaries) — caught by a gate-count + guard, reverted, redone anchored on each gate's unique =d.id=. Verified all 44 green + + a forced A(false) in a converted gate still FAILs. +- =withSavedState(keys, body)= (a473aa7c): wraps the 7 restore-nothing gates, scoped to + the globals each mutates; JSON-clone snapshot + finally-restore (structuredClone threw + on the studio objects — caught by the gate run as "no verdict", switched to JSON like + the gates' own local saves). The 14 self-restoring gates left as-is. Verified 44 green, + restore round-trip holds, broken assertion in a wrapped gate still FAILs. + +*** Remaining — item-8 plan() factory (deferred, low value) +The =plan(overrides)= factory for the ~30 planPaletteGenerator calls (test-app-core.mjs ++ test-palette-generator-core.mjs) was deferred. The calls pass heterogeneous options +(scheme/accentCount/sourceMode/vibe/intent vary per call); a factory only dedups the +constant spanCount:0/rng and would hide which options each test actually exercises — +premature abstraction over varying calls. The other two item-8 parts (subTest loop + +shared stripExports) shipped in 13969c70. + +*** WON'T-DO (do not re-attempt — assessed and rejected) +- theme-studio buildTable/buildUITable/buildPkgTable merge: genuine per-tier divergence + (column order, syntax dual fg/bg dropdowns, ui preview cell, pkg nd markers) + the + =.cells[N]= positional sort coupling make a unified builder MORE complex than the + three explicit ones. Close as won't-do. +- Cross-language test overlap (browser-gates preview gate vs test_generate.py + PackageFaceCoverage): don't merge — would couple a fast Python test to a headless + browser run. A one-line comment in each noting the split is the most that's worth it. + +*** Skipped this run (with reasons — don't redo) +- eshell-config ssh-alias "merge the two helpers": =cj/--eshell-ssh-alias-commands= is + a deliberate pure/effectful split with 3 dedicated tests; merging deletes the seam. +- prog-*-setup boilerplate: only python+webdev share the full pattern; shell/c/elisp/ + common-lisp differ materially. A keyword-arg helper would be less readable. No + premature abstraction. +- erc join-command =cj/erc--ensure-active-connection= extraction: nesting-only on + untestable UI (call-interactively/switch-to-buffer), no test seam, risky tab-rewrite. +- coverage-core =simplecov-executable-lines= vs =parse-simplecov= clone: borderline + MEDIUM, differs only by a =(> hits 0)= predicate; parameterize with a keep-line-p + only if revisiting. Low priority. +** CANCELLED [#A] calendar-sync drops final occurrences, resurrects cancelled meetings :bug:solo:next: +CLOSED: [2026-06-20 Sat 22:51] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-13 +:END: +Needs from Craig: a real .ics fixture (or two) that reproduces both symptoms — a recurring event missing its final occurrence, and a cancelled meeting that reappears. This is RFC-5545 recurrence handling (RRULE/UNTIL/EXDATE/STATUS:CANCELLED); I won't guess-patch the parser without a failing case to test against. Drop a sanitized .ics and I'll write the characterization test + fix. +RFC 5545 conformance holes in =modules/calendar-sync.el=, all agenda-visible (from the 2026-06 config audit): +- =:973,1015,1024= — UNTIL treated as exclusive (strict =calendar-sync--before-date-p=); RFC and Google make it inclusive, so the LAST instance of every UNTIL-bounded series vanishes. Tests assert loose count ranges, so it's unpinned. Allow equality. +- =:578= — comma-separated EXDATE lists (Google emits them) never parse; the exclusion drops silently and cancelled occurrences reappear on the agenda. Split on "," before parsing; no comma-case test exists. +- =:902= — timed events without DTEND render as all-day (time lost); multi-day all-day spans collapse to one day (end date unused, exclusive-DTEND unhandled). Emit start-time-only stamps and org date ranges. +----- + +2026-06-20 Sat @ 22:52:51 -0400 Can't reproduce. closing +** DONE [#A] Native compilation disabled config-wide; GC at stock 800KB :bug:next: +CLOSED: [2026-06-20 Sat] +Both fixed 2026-06-20. =early-init.el:69= was =(setq native-comp-deferred-compilation nil)= — the obsolete alias of =native-comp-jit-compilation= — which turned JIT native-comp OFF entirely (not "synchronous"); replaced with =(setq native-comp-jit-compilation t)= + =native-comp-async-report-warnings-errors 'silent=. The old "Selecting deleted buffer" async race was an Emacs 28/29 issue; this is 30.2. GC: dropped the early-init post-startup restore to stock 800KB and the system-defaults minibuffer setup/exit hooks, replaced with gcmh (idle-delay 'auto, 1GB high threshold) — keeps the threshold high during activity, collects on idle. Verified via a clean throwaway-daemon launch (native-comp-jit t, gcmh-mode t, no backtrace) and a batch proof of gcmh's threshold cycle; applied live to the running daemon. Restart confirmation filed under Manual testing and validation. +** DONE [#C] Dirvish: free D for hard-delete, move duplicate :feature:quick:next: +CLOSED: [2026-06-20 Sat] +Decided with Craig 2026-06-20: remove delete-to-trash entirely, bind =d= = =cj/dirvish-duplicate-file= and =D= = =cj/dirvish-hard-delete= (sudo rm -rf after a =yes-or-no-p= naming the exact targets). Built in =modules/dirvish-config.el= (=cj/--dirvish-hard-delete-command= pure builder + =cj/dirvish-hard-delete= command; keymap =d=/=D= swap). 4 ERT tests for the command builder; full suite green; live-reloaded into the daemon (=dirvish-mode-map= =d=/=D= rebinding confirmed). Manual keypress + sudo-flow check filed under Manual testing and validation. +** DONE [#C] Pull a fullscreen terminal window away with C-; b + arrow :feature:next: +CLOSED: [2026-06-20 Sat] +Decided with Craig 2026-06-20: when the selected window is the sole window, =C-; b= + arrow keeps that window on the arrow's edge and slivers =other-buffer= in on the opposite side (=minimize-window=, so the current window keeps almost the whole frame), focus staying put; each further arrow then shrinks it step by step via =windsize=, reading the same as resizing an existing split. Generalizes to any sole window, not just terminals — resize was a no-op there before. Built in =modules/ui-navigation.el= (=cj/window-pull-side= pure mapping + =cj/window--pull-away= + a =one-window-p= branch in =cj/window-resize-sticky=). ERT tests for the mapping and both sticky paths; geometry verified in a headless frame (down -> terminal 37/40 at the bottom, reveal 2 lines slivered on top via window-min-height=1, windsize-down then steps it down); full suite green; live-reloaded into the daemon. Refined from a first cut that split toward the arrow and jumped to 50%, per Craig's feedback. Manual gesture check filed under Manual testing and validation. +** DONE [#B] Migrate All Terminals From Vterm to Ghostel +CLOSED: [2026-06-20 Sat 22:50] +:PROPERTIES: +:LAST_REVIEWED: 2026-06-04 +:END: +Replace vterm with ghostel (libghostty-vt) as the single terminal engine across every workflow, and rename ai-vterm → ai-term. References: [[file:docs/2026-05-25-emacs-terminal-comparison.org][docs/2026-05-25-emacs-terminal-comparison.org]] (vterm vs eat vs ghostel research); migration spec [[id:b54c94a0-d762-4b41-afd7-cf5593ce6675][docs/specs/vterm-to-ghostel-migration-spec-implemented.org]] (READY; external review incorporated 2026-06-04, D1-D7 agreed). Build in 5 phases (0-4); see the spec's Implementation tasks block. + +Decisions D1-D7 are settled in the spec's Agreed-decisions section. Build order below; each phase stays green (suite + byte-compile) at every step. + +*** 2026-06-20 Sat @ 22:49:41 -0400 Follow-up: theme ghostel ANSI faces in dupre +D2 — set the 16 ghostel-color-* + ghostel-default faces in dupre-faces/palette. +Roam-inbox note (2026-06-14): theme-studio assignments don't reach ghostel — it paints from its own ANSI palette, not the theme. Also investigate ghostel's property-file color mechanism as an alternative and surface the options for working with that limitation. + +*** 2026-06-20 Sat @ 22:50:28 -0400 CANCELLED [#B] Follow-up: evaluate ghostel-eshell + ghostel-compile +CLOSED: [2026-06-20 Sat 22:49] +D3 — ghostel-eshell as eshell visual backend; ghostel-compile against F4 dev-fkeys. + +*** 2026-06-20 Sat @ 22:50:32 -0400 DONE [#B] Investigate ghostel selection/highlight color +CLOSED: [2026-06-20 Sat 22:50] +Look at how selected text is highlighted in a ghostel buffer — the region face in =ghostel-copy-mode= and any live selection — surfaced during the copy-mode debugging. Check whether the highlight is legible against the dupre background and consistent with the rest of the config; if it needs theming, fold it in with D2 (theming the ghostel faces in dupre). + +*** 2026-06-04 Thu @ 23:57:09 -0500 Phase 0 done: characterization baseline green +=make test= green except the 5 documented pre-existing failures (4 test-dupre-theme, 1 test-init-module-headers), none terminal-related. Characterization coverage already present + green for all six must-survive behaviors: vterm-toggle--dispatch/display/buffer-filter, vterm-tmux-history, ai-vterm--show-or-create/launch-command/f9-in-vterm, ui-config--buffer-cursor-state + vterm-copy-mode-cursor, dashboard-config-launchers. Add a characterization test before any behavior change in later phases if a gap appears. + +*** 2026-06-05 Fri @ 00:38:34 -0500 Phase 1 done: ghostel + term-config.el +=modules/term-config.el= written (full port of vterm-config: tmux history/copy-mode-dwim preserved via process-tty-name + ghostel-send-string; F12 toggle + display rule + geometry; cj/term-map C-; x menu → ghostel commands; which-key "terminal menu"; ghostel-max-scrollback 10MB; C-; added to ghostel-keymap-exceptions; F12 + C-; in ghostel-mode-map; use-package ghostel guarded per D6). Dropped: mouse-wheel SGR forwarding, vterm-timer-delay hacks, copy-mode cursor hook, goto-address hook. ghostel installed into elpa (MELPA + auto-downloaded native module). Tests: test-term-toggle--{dispatch,display,buffer-filter} + test-term-tmux-history (16) ported with a ghostel stub in testutil-ghostel-buffers; all green. + +*** 2026-06-05 Fri @ 00:38:34 -0500 Phase 2 done: ai-vterm→ai-term on ghostel +=modules/ai-vterm.el= → =modules/ai-term.el=: 6 vterm call sites swapped to ghostel (buffer named via let-bound ghostel-buffer-name + pinned ghostel-buffer-name-function so OSC titles don't rename agent buffers); F9/C-F9/M-F9 on global + ghostel-mode-map; refuse-in-terminal guard removed (D4 — F9 launches in TTY frames); tmux-suppression invariant preserved (cj/--ai-term-suppress-tmux). 23 ai-vterm tests renamed → test-ai-term--* (terminal-guard test deleted, obsolete); show-or-create + f9-in-term rewritten for ghostel; all green. ui-config cursor-state ported (ghostel-mode + ghostel--input-mode; copy/emacs = read-only, else writeable) + its test. init.el now requires term-config + ai-term; vterm-config.el + ai-vterm.el deleted. Full suite green except the 5 documented pre-existing failures (4 dupre-theme, 1 init-module-headers/popper-config-missing — both unrelated). validate-modules ✓; full early-init+init smoke clean (no ghostel/term/ai-term errors). vterm package still installed (Phase 4) — dashboard "Launch VTerm" + dormant auto-dim still reference it until Phase 3/4. Restart Emacs to pick up ghostel (load-order + use-package :config change). + +*** 2026-06-05 Fri @ 00:50:58 -0500 Phase 3 done: satellites ported to ghostel +Deleted auto-dim's vterm color-advice + redraw integration (~165 lines; D1 — terminals don't dim, ghostel bakes its palette per-terminal so there's no per-window color hook); dashboard launcher → =(ghostel)= + "Launch Terminal" label; cj-window-geometry/toggle-lib doc comments; module-inventory + init-load-graph doc refs. (ui-config cursor-state + init.el requires landed in Phase 2.) Trimmed test-auto-dim-config (dropped the 6 vterm tests) + updated the dashboard-launcher test stub. Incidental: removed the stale =popper-config= entry from the test-init-module-headers allowlist (the file doesn't exist + isn't required) — fixes the long-standing pre-existing test failure. + +*** 2026-06-05 Fri @ 00:50:58 -0500 Phase 4 done: vterm + vterm-toggle removed +=package-delete='d vterm + vterm-toggle from elpa. No vterm refs remain in modules/init except intentional historical comments. Suite green except the 4 pre-existing dupre-theme failures (the popper-config one is now fixed). validate-modules ✓; full early-init+init batch smoke = INIT-SMOKE-OK. The migration parent stays DOING until Craig restarts Emacs and walks the ghostel manual-verify matrix under "Emacs Manual Testing and Validation". + +*** 2026-06-05 Fri @ 14:24:02 -0500 Auto-dim revisit cancelled — current no-dim behavior is fine +Craig confirmed the shipped auto-dim setup works fine as-is: terminal buffers don't participate in unfocused-window dimming (D1), and the rest of auto-dim behaves. That is the measured decision the original task asked for — option (a), keep no-dim — so no rework (the focus-loss palette-blend in option (b) or an upstream per-window hook in option (c)) is needed. Closing without further investigation. Context: [[id:b54c94a0-d762-4b41-afd7-cf5593ce6675][migration spec]] D1. + +*** 2026-05-26 Tue @ 15:15:43 -0500 Direction confirmed; Claude Code in eat needs a caveat +Craig confirmed the consolidation: one terminal engine everywhere — eat for standalone terminal buffers (replacing vterm) plus =eat-eshell-mode= as eshell's visual backend, keeping eshell as the shell. Not dropping eshell for eat + zsh. + +Researched whether Claude Code runs cleanly in eat (Craig runs it in his Emacs terminal). Verdict: mostly, with caveats. eat is the default backend for claude-code.el and renders the TUI with color and full key handling, but there is an eat-specific bug where Claude Code's input handling makes the buffer scroll-pop to the top on window-buffer changes and the input box can get stuck mid-buffer (recoverable, but it does not happen in vterm or ghostel), and eat runs about 1.5x slower than vterm on heavy streaming output. claude-code.el's own docs name ghostel as the most faithful Claude TUI renderer. + +Recommendation: consolidate everyday terminals onto eat, but keep ghostel (or vterm) for the Claude Code workflow specifically — the scroll-pop / stuck-input bug and the slower heavy-stream handling are exactly what bites a long Claude session. Sources: [[https://github.com/cpoile/claudemacs][claudemacs]], [[https://github.com/stevemolitor/claude-code.el][claude-code.el]], [[https://codeberg.org/akib/emacs-eat][emacs-eat]]. + +Eval plan (from the research doc): install EAT alongside vterm, run the same workloads through both, decide. Test matrix: Claude Code TUI, lazygit, htop/btop, yazi, a heavy-output build, ssh to a remote, and eshell with =eat-eshell-mode=. Assess rendering fidelity, stability under heavy output, and Emacs-native line editing. Switch only if it covers every workflow without regression. + +*** 2026-06-02 Tue @ 14:12:48 -0500 Audit: eval plan not yet run; back to TODO +Task audit found no eval work recorded since the 2026-05-26 direction-confirmed note. The test matrix above is unrun, so the task isn't actively in progress — moved DOING back to TODO until the eval starts. + +*** 2026-06-04 Thu @ 22:40:27 -0500 Pivot: ghostel as the single engine (not eat) +Direction changed from eat-everyday + ghostel-for-Claude to ghostel-for-everything, and the task is now a migration rather than an eval. Rationale: ghostel is claude-code.el's most-faithful Claude TUI renderer and the fastest engine (81 vs vterm 34 vs eat 4.9 MB/s), and an audit confirmed it exposes an analog for every vterm primitive this config uses (=ghostel-send-string=, =ghostel-keymap-exceptions=, =ghostel-copy-mode=, =ghostel-clear-scrollback=, =ghostel-send-next-key=, =ghostel-next-prompt= / =ghostel-previous-prompt=, =ghostel-max-scrollback=, =ghostel-kill-buffer-on-exit=). eat's washed colors, the scroll-pop / stuck-input bug under Claude Code, and slowest throughput made it the weaker single-engine pick; one engine beats running two. Surface audited: 2 main modules (=vterm-config.el=, =ai-vterm.el=) + 4 satellites (=auto-dim-config.el= is the heavy one) + ~35 test files + init.el. Next: spike ghostel read-only to answer the open migration questions (auto-dim rework — ARCHITECTURE.md forbids the around-redraw color advice vterm uses; tmux pane-id via =process-tty-name= on a ghostel process; buffer naming; TTY-frame behavior; copy-mode keybinding parity), then write the migration spec under =docs/design/= and review it. + +*** 2026-06-04 Thu @ 23:17:54 -0500 Spec review: not ready until decisions and handoff shape are closed +Ran the spec-review workflow against [[id:b54c94a0-d762-4b41-afd7-cf5593ce6675][docs/specs/vterm-to-ghostel-migration-spec-implemented.org]] and wrote a companion review file (incorporated and deleted 2026-06-04). Verdict: =Not ready=. Direction is sound, but the draft still has open D1-D5 decisions, lacks the workflow-required =Implementation phases= section and acceptance criteria, and needs explicit ghostel package/native-module failure behavior before implementation tasks can be emitted. + +*** 2026-06-04 Thu @ 23:24:28 -0500 Spec-response: review incorporated, raised to READY +Folded the external review via spec-response. Craig accepted D1-D5; baked them plus D6 (module-failure = degrade-with-warning, modifying the reviewer's fail-loud) and D7 (=ghostel-max-scrollback= 10 MB) into a new Agreed-decisions section. Added Implementation phases (0-4), Acceptance criteria, Dependency/module-failure behavior, Test strategy, per-phase key/menu ownership, the tmux-suppression contract, and an Implementation-tasks drop-in block. Status DRAFT → READY; review file deleted. Build is now unblocked. + +*** 2026-06-04 Thu @ 23:30:18 -0500 External re-review: ready +Re-reviewed [[id:b54c94a0-d762-4b41-afd7-cf5593ce6675][docs/specs/vterm-to-ghostel-migration-spec-implemented.org]] after incorporation. Verdict: =Ready=. No further blocking review notes; implementation can start from the phase plan and acceptance criteria in the spec. +** DONE [#A] erc-yank silently publishes >5-line pastes as public gists :bug:quick:solo: +CLOSED: [2026-06-20 Sat] +Dropped erc-yank 2026-06-20 (Craig's call: drop, not harden). The package turned a >5-line paste into a PUBLIC gist (=gist -P=, the clipboard-paste flag, no =--private=) behind a single y-or-n-p, with no executable-find guard for =gist=. It also gisted the system clipboard rather than the kill-ring text being yanked. No replacement binding needed: =erc-mode-map= defines no C-y of its own, so removing the package lets C-y fall through to the ordinary global =yank=. Verified live: effective C-y in an ERC buffer = =yank=. (Audit's "no confirmation" was slightly off — the package did prompt — but public-by-default + one-keystroke confirm + no guard made dropping it the clean fix.) |
