fix(tui): keep keyboard hints bar always visible#511
Merged
Conversation
The KeyboardHintsBar auto-dismissed 3s after the first keypress, leaving an empty reserved row that was never reused. Remove the dismiss machinery (visibility state, the dismiss timer, the useInput trigger, and the per-screen visibility reset) so the bottom row of key controls stays visible for as long as a screen has registered hints. This drops the extra state the provider had to maintain and makes the hints always available. Generated-By: PostHog Code Task-Id: 8c63fceb-5398-459e-b210-1b4f318b7821
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
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
The bottom row of key controls (
KeyboardHintsBar) auto-dismissed 3 seconds after the first keypress. The freed-up row was never reused —KeyboardHintsBarkeeps reserving its row to prevent layout shift, so dismissing the hints just left an empty line. On top of that, the dismiss behavior was extra state for the provider to carry. Always showing the key controls is simpler and more useful.Changes
useKeyboardHints.tsx: removed the auto-dismiss machinery — thevisibleflag, the dismiss timer (timerRef/DISMISS_DELAY), theuseInputtrigger that started the countdown, the unmount cleanup, and the per-screen visibility reset. The context no longer exposesvisible.KeyboardHintsBar.tsx: renders the active hints whenever a screen has registered any; still reserves its single row to avoid layout shift.KeyboardHintsDemo.tsx: updated the doc comment that described the old dismiss behavior.Test plan
pnpm build✅pnpm test✅ (keyboard-hints suite green; the only failure in the full run was an unrelated load-timeout flake inprovision-cli.test.ts, which passes in isolation)pnpm lint✅ (0 errors) and Prettier clean on the changed filesCreated with PostHog Code