Skip to content

fix(tui): free arrow keys for transcript scroll, move recall to ^P/^N - #21

Merged
jkyberneees merged 1 commit into
mainfrom
fix/transcript-scroll-keys
Aug 7, 2026
Merged

fix(tui): free arrow keys for transcript scroll, move recall to ^P/^N#21
jkyberneees merged 1 commit into
mainfrom
fix/transcript-scroll-keys

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Problem

Navigating the conversation history was practically impossible while the input box holds focus:

  • With prompt history present, bare 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 wheel scrolling is opt-in (--mouse), so it's dead in a default launch.
  • The keys that did work (PgUp/PgDn/^U/^D) were documented nowhere reachable — /help listed only slash commands, and the welcome cheatsheet scrolls away.

Fix

  • / at the input's edge lines always scroll the transcript (PgUp/PgDn/^U/^D unchanged).
  • Prompt-history recall moves to ^P/^N — the readline-standard binding, so shell muscle memory transfers.
  • Discoverability: ^P history · ↑ scroll hint in the input placeholder; a proper keys section in /help (scroll / page / recall / --mouse wheel rows); PgUp more added 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, footer at 100% coverage.
  • Regression test: ↑ scrolls the transcript even with prompt history present (leaves histNav/input untouched); ^P still recalls; existing multi-line cursor-movement and sticky-bottom autoscroll tests unchanged and passing.

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.
@jkyberneees
jkyberneees merged commit c65eab2 into main Aug 7, 2026
5 checks passed
@jkyberneees
jkyberneees deleted the fix/transcript-scroll-keys branch August 7, 2026 13:08
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