feat(tui): top-3 round — persisted settings, copy any turn, /retry - #41
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
/theme/retry--profileThe judges also vetoed a transcript render-cache candidate as speculative (80 ms coalescing already bounds cost).
The three improvements
1. Persisted settings + runtime
/theme— newinternal/settingspackage keeps bodek's own front-end preferences in~/.bodek/config.json(BODEK_CONFIGoverrides):theme,mouse,bel,notify,plain. Flag defaults are seeded from the file, so a choice made once survives relaunches. Resolution order: flag →BODEK_THEMEenv → 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 existingresize()path — and the switch persists automatically (anOnThemeChangehook; a save failure surfaces as a note while the switch still applies for the run).2. Copy any turn card —
alt+ycopies the focused turn's reply: the onealt+↑/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 (/retryoralt+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 lint— 0 issuesmake test— full race-enabled suite, all packages greeninternal/settingscoverage 96.3% (remainder: unreachable OS-error branches); all new tui functions 92.9–100%TestE2EAllCommands) extended with real-path cases for/themeand/retryF1help card synced