charmbracelet / charmbracelet/bubbles
Bug: v is bound to Quit but displayed as Select in the list keymap
- Dominant language
- Go
- Stars
- 8.9k
- Forks
- 457
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 5
Description
**Describe the bug**
The `Quit` key binding in the list component appears to have been changed from `q`/`esc` to `v`, while the help text was changed to `v, select`.
However, the binding is still the `Quit` binding, and pressing `v` triggers the quit behavior instead of selecting an item.
This change can be seen in [this commit](https://github.com/charmbracelet/bubbles/commit/e97af08ee293131e7b71f7e3006c06a81a2584b8#r197766602)
**Setup**
* OS: Linux
* Shell: zsh
* Terminal Emulator: kitty
* Terminal Multiplexer: None
* Locale: en_US.UTF-8
* Bubbles version: Latest commit containing this change
**To Reproduce**
1. Create a Bubble Tea application using the Bubbles list component.
2. Use the default list key bindings.
3. Focus the list.
4. Press `v`.
5. The application/list exits through the `Quit` binding.
**Source Code**
The relevant change is:
```go
// Before
Quit: key.NewBinding(
key.WithKeys("q", "esc"),
key.WithHelp("q", "quit"),
),
// After
Quit: key.NewBinding(
key.WithKeys("v"),
key.WithHelp("v", "select"),
),
```
**Expected behavior**
If `v` is intended to select an item, pressing `v` should trigger selection rather than the `Quit` behavior.
Alternatively, if `v` is intentionally a quit key, the help text should indicate `v, quit` rather than `v, select`.
**Screenshots**
Not applicable.
**Additional context**
The field is still named `Quit`, and the surrounding code is still under the `// Quitting.` section. This makes it unclear whether the key was intentionally changed to `v` or whether the key/help text was accidentally changed.
The issue was also raised in the review discussion of the commit:
https://github.com/charmbracelet/bubbles/commit/e97af08ee293131e7b71f7e3006c06a81a2584b8#r197766602
Contributor guide
Research direction
Start by inspecting the list component's default key bindings and the change in commit e97af08ee293131e7b71f7e3006c06a81a2584b8. Confirm whether v should select an item or quit, then make the binding name, key, help text, and surrounding quitting behavior consistent. Reproduce the default list interaction and verify that v performs the intended action.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100