feat(tui): clearer key model — esc never quits, ctrl+d quits, arrow-key scroll - #49
Merged
Conversation
…ey scroll Reorganise the TUI key bindings around two clear rules: - Quit is only ctrl+c or ctrl+d, anywhere. esc no longer quits: it cancels a running turn or steps back one level. On the select screen q/esc no longer quit either. - A single-branch ledger has no menu to return to, so esc from chat reconnects a fresh session instead of landing on a dead one-item screen. - Arrow keys scroll the transcript: up/down line-by-line, pgup/pgdn for full pages, home/end to jump to top/bottom. Only the arrows and home/end are routed (not vim k/j), since k/j are typed text in the chat input; home/end keep ctrl+a/ctrl+e as input-cursor aliases. ctrl+u/ctrl+d are dropped from scrolling, leaving pgup/pgdn for paging. Footer hints and docs/tui-manual-test.md updated to match.
flarexium
force-pushed
the
feat/tui-key-bindings
branch
from
June 15, 2026 02:16
48e492c to
a35ef40
Compare
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.
What
Reorganises the conversational TUI key bindings around two clear rules.
Quit is only
ctrl+c/ctrl+descno longer quits anywhere — it cancels a running turn or steps back one level. On the select screenq/escno longer quit either; quitting is exclusivelyctrl+corctrl+d.Single-branch
escreconnectsA single-branch ledger auto-starts into chat (existing behaviour) and has no selection menu to return to. Previously
escwould land on a dead one-item screen (or, briefly, quit). Nowescfrom chat reconnects a fresh session — a conversation reset (new engine, cleared transcript and recall buffer) while the underlying ledger is untouched.Scroll the transcript
↑/↓— line by linepgup/pgdn— full pagehome/end— jump to top/bottomOnly the arrows and home/end are routed to the viewport — not vim
k/j, since those are typed characters in the chat input.home/endkeepctrl+a/ctrl+eas their input-cursor aliases, so nothing is lost when typing.ctrl+u/ctrl+dare dropped from scrolling (the latter now quits), leavingpgup/pgdnfor paging.Tests
TestModelCtrlDQuits— ctrl+d quits.TestModelEscReconnectsWithSingleOption— esc reconnects, never quits.TestModelEscReturnsToSelectWithMultipleOptions— multi-branch esc returns to select.TestModelArrowKeysScrollTranscript— up/down/home/end scroll an overflowing transcript without starting a turn.go build ./...,go vet, andgo test ./cmd/ledger/...all pass. Footer hints anddocs/tui-manual-test.mdupdated to match.🤖 Generated with Claude Code