refactor(cli): centralize TUI keybindings via bubbles/key#1060
Merged
Conversation
Introduce a shared keyMap (cmd/entire/cli/keys.go) so the activity, dispatch, and search TUIs all match keys and render help text from one source of truth, replacing scattered string literals like "esc", "ctrl+c", and "q". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 7611ae68730a
Contributor
There was a problem hiding this comment.
Pull request overview
This PR centralizes Bubble Tea TUI keybindings into a single shared keyMap so the activity, dispatch, and search TUIs match on the same bindings and can render consistent help text.
Changes:
- Added
cmd/entire/cli/keys.godefining sharedkeysbindings (quit/back/search/confirm/navigation). - Updated
search_tui.goto usekey.Matchesagainst shared bindings and to render help text using binding help metadata. - Updated
activity_tui.goanddispatch_tui.goto use the shared quit/back bindings instead of local string checks.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cmd/entire/cli/search_tui.go | Replaces scattered key string literals with shared bindings; updates footer/help rendering accordingly. |
| cmd/entire/cli/keys.go | Introduces the shared TUI key map as the single source of truth. |
| cmd/entire/cli/dispatch_tui.go | Uses shared quit/back bindings for cancel behavior and removes local tuiEscKey. |
| cmd/entire/cli/activity_tui.go | Uses shared quit/back bindings and updates footer help to use binding metadata. |
1e5d0e3 to
d3572b2
Compare
gtrrz-victor
approved these changes
Apr 28, 2026
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.
https://entire.io/gh/entireio/cli/trails/249
Introduce a shared keyMap (cmd/entire/cli/keys.go) so the activity, dispatch, and search TUIs all match keys and render help text from one source of truth, replacing scattered string literals like "esc", "ctrl+c", and "q".
Entire-Checkpoint: 7611ae68730a
Note
Low Risk
Low risk refactor that mainly replaces scattered key string comparisons and hardcoded help text with
bubbles/keybindings; potential risk is minor behavior drift if any prior key strings differed from the new bindings.Overview
Centralizes TUI keybindings by introducing
cmd/entire/cli/keys.goas a single source of truth for common actions (quit/back/search/confirm/navigation).Updates the activity, dispatch, and search TUIs to use
key.Matches(...)against the shared bindings instead of ad-hocmsg.String()checks, and rewires footer/help rendering to pull key labels/descriptions from the same bindings (removing local constants liketuiEscKey).Reviewed by Cursor Bugbot for commit 1e5d0e3. Configure here.