fix(tui): free arrow keys for transcript scroll, move recall to ^P/^N - #21
Merged
Conversation
With prompt history present, bare ↑ with an empty input always recalled a previous prompt and never scrolled the transcript — combined with the opt-in mouse wheel, the conversation history was practically unreachable while the input holds focus. - ↑/↓ at the input's edge lines now always scroll the transcript (PgUp/PgDn/^U/^D unchanged) - prompt-history recall moves to the dedicated readline-style ^P/^N - discoverability: ^P hint in the input placeholder, a keys section in /help (scroll/page/recall rows), and a 'PgUp more' hint in the footer's off-bottom badge; README key table updated Regression test: ↑ scrolls even with prompt history present and leaves histNav/input untouched; ^P still recalls.
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.
Problem
Navigating the conversation history was practically impossible while the input box holds focus:
↑on an empty input always recalled a previous prompt and never scrolled the transcript — the transcript only got arrow keys in the sliver case "empty input + nothing to recall".--mouse), so it's dead in a default launch.PgUp/PgDn/^U/^D) were documented nowhere reachable —/helplisted only slash commands, and the welcome cheatsheet scrolls away.Fix
↑/↓at the input's edge lines always scroll the transcript (PgUp/PgDn/^U/^Dunchanged).^P/^N— the readline-standard binding, so shell muscle memory transfers.^P history · ↑ scrollhint in the input placeholder; a proper keys section in/help(scroll / page / recall /--mousewheel rows);PgUp moreadded to the footer's off-bottom badge (PgUp more · G latest · ↕ 42%); README key table updated.Trade-off
↑-for-history muscle memory breaks; recall is now^P, exactly like a shell prompt. Scrolling the transcript is the far more frequent intent while the input holds focus, so this is the right default.Verification
make fmt / vet / lint (0 issues) / test -race / cover— all green;handleKey,showHelp,footerat 100% coverage.histNav/input untouched);^Pstill recalls; existing multi-line cursor-movement and sticky-bottom autoscroll tests unchanged and passing.