Skip to content

fix(tui): keep keyboard hints bar always visible#511

Merged
edwinyjlim merged 1 commit into
mainfrom
posthog-code/always-show-keyboard-hints
Jun 5, 2026
Merged

fix(tui): keep keyboard hints bar always visible#511
edwinyjlim merged 1 commit into
mainfrom
posthog-code/always-show-keyboard-hints

Conversation

@gewenyu99
Copy link
Copy Markdown
Collaborator

Problem

The bottom row of key controls (KeyboardHintsBar) auto-dismissed 3 seconds after the first keypress. The freed-up row was never reused — KeyboardHintsBar keeps 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 — the visible flag, the dismiss timer (timerRef / DISMISS_DELAY), the useInput trigger that started the countdown, the unmount cleanup, and the per-screen visibility reset. The context no longer exposes visible.
  • 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 in provision-cli.test.ts, which passes in isolation)
  • pnpm lint ✅ (0 errors) and Prettier clean on the changed files

Created with PostHog Code

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
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

🧙 Wizard CI

Run 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:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci error-tracking-upload-source-maps
  • /wizard-ci misc
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci error-tracking-upload-source-maps/android
  • /wizard-ci error-tracking-upload-source-maps/flutter
  • /wizard-ci error-tracking-upload-source-maps/ios
  • /wizard-ci error-tracking-upload-source-maps/next
  • /wizard-ci error-tracking-upload-source-maps/next-no-posthog
  • /wizard-ci error-tracking-upload-source-maps/node-raw
  • /wizard-ci error-tracking-upload-source-maps/node-rollup
  • /wizard-ci error-tracking-upload-source-maps/node-rollup-typescript-plugin
  • /wizard-ci error-tracking-upload-source-maps/node-webpack
  • /wizard-ci error-tracking-upload-source-maps/nuxt-3-6
  • /wizard-ci error-tracking-upload-source-maps/nuxt-4-3
  • /wizard-ci error-tracking-upload-source-maps/react-native
  • /wizard-ci error-tracking-upload-source-maps/react-vite
  • /wizard-ci error-tracking-upload-source-maps/rust
  • /wizard-ci misc/quack-quack
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

@gewenyu99 gewenyu99 marked this pull request as ready for review June 5, 2026 00:46
@gewenyu99 gewenyu99 requested a review from a team June 5, 2026 00:46
Copy link
Copy Markdown
Member

@edwinyjlim edwinyjlim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def the right move

@edwinyjlim edwinyjlim merged commit 8711f02 into main Jun 5, 2026
19 checks passed
@edwinyjlim edwinyjlim deleted the posthog-code/always-show-keyboard-hints branch June 5, 2026 01:37
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.

2 participants