Skip to content

feat: user configurable tui keybindings#2415

Open
joshbarrington wants to merge 4 commits intodocker:mainfrom
joshbarrington:tui-configurable-keybindings
Open

feat: user configurable tui keybindings#2415
joshbarrington wants to merge 4 commits intodocker:mainfrom
joshbarrington:tui-configurable-keybindings

Conversation

@joshbarrington
Copy link
Copy Markdown
Contributor

As referenced here: #1626 and the subsequent closed MR: #1629

First stage implementation for allowing user configurable keybindings.

@krissetto would like to get your thoughts and then we can discuss potential extensions/alternative implementations.

@joshbarrington joshbarrington requested a review from a team as a code owner April 14, 2026 21:43
@joshbarrington joshbarrington force-pushed the tui-configurable-keybindings branch from f9fd084 to ac8aadf Compare April 20, 2026 10:59
@joshbarrington joshbarrington changed the title allow user to set tui keybindings in config file feat: user configurable tui keybings Apr 27, 2026
@joshbarrington joshbarrington force-pushed the tui-configurable-keybindings branch 2 times, most recently from 6d04cff to dd0d120 Compare April 29, 2026 11:32
@aheritier
Copy link
Copy Markdown
Contributor

/review

Any thoughts @krissetto ?

Copy link
Copy Markdown
Contributor

@aheritier aheritier left a comment

Choose a reason for hiding this comment

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

Good foundation for configurable keybindings. The architecture (centralized KeyMap, defaults + override merge, caching) is sound and the refactoring of tui.go to use the shared KeyMap is a clear improvement.

Blocking items:

  1. Type naming: KeybindingsKeybinding (singular for a single entry)
  2. Undocumented behavioral change: The quit key now opens an exit confirmation dialog — this changes existing UX and should be explicitly noted/discussed
  3. Missing docs: No user-facing documentation for how to configure keybindings

CI: Still running at review time — please confirm tests pass.

Also noting (non-blocking): PR title has a typo — "keybings" → "keybindings".

Comment thread pkg/userconfig/userconfig.go
Comment thread pkg/tui/tui.go
keys := core.GetKeys()
switch {
case key.Matches(msg, key.NewBinding(key.WithKeys("ctrl+z"))):
case key.Matches(msg, keys.Quit):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocking: This adds new behavior beyond configurable keybindings — pressing the quit key now opens an exit confirmation dialog instead of quitting directly (which was the previous ctrl+c behavior via bubbletea's default handling).

This is a meaningful UX change. Before: ctrl+c → immediate quit. After: ctrl+c → confirmation dialog → confirm → quit.

Should this behavioral change be in a separate commit or at minimum called out in the PR description? It's easy to miss during review otherwise.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@aheritier can you confirm that this indeed does change the current behaviour? I also seem to get the confirmation dialog when building from main branch and pressing ctrl+c.

Comment thread pkg/tui/core/keys.go Outdated
Comment thread pkg/tui/core/keys.go
Comment thread pkg/tui/core/keys.go Outdated
Comment thread pkg/tui/dialog/exit_confirmation.go Outdated
Comment thread pkg/tui/core/keys.go
Comment thread pkg/tui/core/keys_test.go
@docker-agent
Copy link
Copy Markdown

docker-agent Bot commented May 6, 2026

PR Review Failed — The review agent encountered an error and could not complete the review. View logs.

@joshbarrington joshbarrington changed the title feat: user configurable tui keybings feat: user configurable tui keybindings May 6, 2026
@aheritier aheritier added kind/feat PR adds a new feature (maps to feat: commit prefix) area/tui For features/issues/fixes related to the TUI priority:medium Normal priority, standard sprint work effort:medium Multiple files or components, some design decisions needed go Pull requests that update go code and removed priority:medium Normal priority, standard sprint work labels May 6, 2026
@joshbarrington joshbarrington force-pushed the tui-configurable-keybindings branch from dd0d120 to 9642489 Compare May 7, 2026 21:32
@joshbarrington
Copy link
Copy Markdown
Contributor Author

@aheritier this can be re-reviewed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tui For features/issues/fixes related to the TUI effort:medium Multiple files or components, some design decisions needed go Pull requests that update go code kind/feat PR adds a new feature (maps to feat: commit prefix)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants