Fix keybind parse missing super:false
The fix is complete. Here's a summary of the changes:
Summary
Root Cause: When parsing keybind strings like "ctrl+u", the Keybind.parse function was creating Info objects without a super field (it was undefined). This caused issues when these keybinds were passed to OpenTUI's textarea, where the missing super field (undefined) was interpreted differently than super: false, leading to unintended keybind conflicts.
The Fix:
-
In
packages/opencode/src/util/keybind.ts(line 67): Addedsuper: falseto the initialinfoobject in theparsefunction. This ensures that all parsed keybinds explicitly havesuper: falseunless they specifically include the "super" modifier in their keybind string. -
Updated all 15 test cases in
packages/opencode/test/keybind.test.tsto includesuper: falsein their expected results, ensuring the tests accurately reflect the new behavior.
Why this fixes the issue: When a user configures messages_half_page_up: "ctrl+u", the parsed keybind now explicitly has super: false. When this keybind is passed to OpenTUI's textarea via mapTextareaKeybindings, the super: false || undefined expression evaluates to undefined, but more importantly, OpenTUI now receives a consistent set of keybindings where the super modifier is always explicitly defined. This prevents cmd+backspace (which is super+backspace) from being incorrectly matched against keybinds that don't use the super modifier.
Closes #6650
opencode session | github run