Repository navigation
feat(tui): keep the footer key hints visible after the first response - #157
Merged
Merged
Conversation
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>
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.
Summary
The prompt footer's right slot rendered the
shift+tab modes/tab agentshints and the context/cost readout as an either/orSwitch: 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:
FOOTER_HINTS_AND_USAGE_MIN_WIDTH): key hints and the usage readout show side by side.Implementation: two memos (
usageMeta,showKeyHints) replace the innerSwitch/Matchpair with two siblingShowgates, 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-usageMatcharm" 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