Skip to content

feat(tui): keep the footer key hints visible after the first response - #157

Merged
quickbeard merged 2 commits into
mainfrom
footer-key-hints
Aug 2, 2026
Merged

quickbeard merged 2 commits into
mainfrom
footer-key-hints

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Summary

The prompt footer's right slot rendered the shift+tab modes / tab agents hints and the context/cost readout as an either/or Switch: as soon as the session had any assistant message with output tokens, usage() flipped truthy and permanently swapped the hints for the readout, so the shortcuts stopped being discoverable after the very first response.

The slot now renders the two independently:

  • ≥ 120 columns (FOOTER_HINTS_AND_USAGE_MIN_WIDTH): key hints and the usage readout show side by side.
  • Narrower: the hints show while the session is idle (when you'd press them) and the usage readout while it is busy (when the numbers are moving), with the hints as the fallback before any usage exists.

Implementation: two memos (usageMeta, showKeyHints) replace the inner Switch/Match pair with two sibling Show gates, alongside the existing width-tiered busy-footer constants from #155.

Housekeeping

  • DIVERGENCES.md: new row for the hints-and-usage slot; fixed the shift+tab row's now-stale "no-usage Match arm" wording.
  • CHANGELOG.md: Unreleased entry.

Testing

  • bun typecheck (full monorepo via pre-push hook) is clean.
  • packages/tui/test/footer-width.view.test.tsx: extended the three busy-width tests and added two idle tests (120 columns shows both; 80 columns keeps hints and drops usage). 5/5 pass, every row fits its terminal width on one line.

🤖 Generated with Claude Code

quickbeard and others added 2 commits August 2, 2026 19:00
The prompt footer's right slot swapped the shift+tab modes / tab agents
hints for the context/cost readout as soon as the session had any
assistant output tokens, and they never came back for the rest of the
session.

The slot now renders the two independently instead of either/or: from
120 columns up it shows the key hints and the usage readout side by
side; on narrower terminals it shows the hints while the session is
idle and the usage readout while it is busy, with the hints as the
fallback before any usage exists.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@quickbeard
quickbeard merged commit 1481ad0 into main Aug 2, 2026
0 of 5 checks passed
@quickbeard
quickbeard deleted the footer-key-hints branch August 2, 2026 12:03
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