Skip to content

feat(tui): top-3 round — persisted settings, copy any turn, /retry - #41

Merged
jkyberneees merged 1 commit into
mainfrom
feat/top-3-improvements
Aug 29, 2026
Merged

feat(tui): top-3 round — persisted settings, copy any turn, /retry#41
jkyberneees merged 1 commit into
mainfrom
feat/top-3-improvements

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Process

10 evidence-backed improvement candidates were compiled from the repo (every recently shipped feature excluded), then a panel of 3 independent expert judges (TUI/UX, Go performance/architecture, developer-experience) voted the top 3 by value ÷ (effort × risk):

Candidate Judge A Judge B Judge C Verdict
Persisted settings + runtime /theme #1 #1 #1 in — unanimous
Copy any turn card #2 #2 #2 in — unanimous
/retry #3 #3 in — majority 2/3
First-class --profile #3 out (1/3)

The judges also vetoed a transcript render-cache candidate as speculative (80 ms coalescing already bounds cost).

The three improvements

1. Persisted settings + runtime /theme — new internal/settings package keeps bodek's own front-end preferences in ~/.bodek/config.json (BODEK_CONFIG overrides): theme, mouse, bel, notify, plain. Flag defaults are seeded from the file, so a choice made once survives relaunches. Resolution order: flag → BODEK_THEME env → file → built-in default. /theme [name] switches the palette mid-run — every style rebuilds, the glamour renderer is recreated, finalized messages re-render through the existing resize() path — and the switch persists automatically (an OnThemeChange hook; a save failure surfaces as a note while the switch still applies for the run).

2. Copy any turn cardalt+y copies the focused turn's reply: the one alt+↑/alt+↓ last jumped to, or a transcript-find match (find jumps now set the focus). Falls back to the latest reply when there's no focus or it went stale. Shares the existing OSC 52 machinery (copyText), so the size cap and terminal-support caveats behave identically to ^Y.

3. /retry — re-sends the last prompt in one step (/retry or alt+r). Mid-turn it joins the existing prompt queue, exactly like a typed prompt; with no history it says so instead of failing silently.

Verification

  • make fmt / make vet / make lint0 issues
  • make test — full race-enabled suite, all packages green
  • internal/settings coverage 96.3% (remainder: unreachable OS-error branches); all new tui functions 92.9–100%
  • The e2e registry sweep (TestE2EAllCommands) extended with real-path cases for /theme and /retry
  • README (bindings, commands, configuration, theme) and the F1 help card synced

Judge-selected top 3 of 10 evidence-backed improvement candidates:
persisted settings + runtime /theme and copy-any-turn won unanimously,
/retry took the third seat by majority (2/3).

- new internal/settings: ~/.bodek/config.json keeps theme, mouse, bel,
  notify, plain; flag defaults are seeded from it, so a choice made once
  survives relaunches (flag > BODEK_THEME env > file > built-in default)
- /theme [name] switches the palette mid-run — styles, glamour renderer
  and finalized messages all re-render; the switch persists automatically
- alt+y copies the focused turn's reply (the one alt+↑/↓ last jumped to,
  or a find match) instead of only ever the latest one
- /retry and alt+r re-send the last prompt; mid-turn it joins the queue
  like any typed prompt
@jkyberneees
jkyberneees merged commit ec4a723 into main Aug 29, 2026
5 checks passed
@jkyberneees
jkyberneees deleted the feat/top-3-improvements branch August 29, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant