fix(tui): let focused text fields receive standard editing keys (#158) - #160
Merged
Conversation
Two panes bound keys that the focused bubbles text field already owns, so the field never saw them: - The card editor due-date stepper claimed alt+left and alt+right, which are the word motions textinput binds by default. The stepper keeps [ and ]; the alt+arrows now reach the input. - The issue import source and count steppers claimed left/right/h/l for every focus, so the reference input could not take a cursor motion or the letters h and l. The steppers now run only for their own focus. Regression tests per field class assert Home and End move the cursor in the card editor fields, the board filter input, the kill-reason prompt, the settings inputs, the ADR split inputs, the issue import reference, and the card detail comment and link inputs.
|
This was referenced Aug 20, 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.



Closes #158. Part of #136.
Scope, as corrected mid-flight
The user corrected the ticket: the convention here is Home/End for line start/end - "no need to add extra keybinding". So this PR adds no readline aliases. It only makes sure the keys bubbles text fields already bind by default actually reach the focused field, and removes the kb-level bindings that shadowed them. Ctrl+A-as-select-all is a separate open question and is untouched here.
Root cause
The root key routing was already clean -
internal/tui/model.goforwards every key to the open overlay (onlyctrl+cstays global). The swallowing was inside two panes, where a stepper control claimed keys that belong to whatever field currently has focus:internal/tui/cardeditor/model.go) boundalt+left/alt+rightto date -1/+1. Those aretextinputsWordBackward/WordForward, so word motion was dead in the due field. The stepper keeps[and], which nothing in the default keymap wants.internal/tui/issueimport/model.go) handledleft/right/h/lbefore dispatching to the reference input, for every focus. With the reference field focused, cursor motion was dead and the lettershandlcould not be typed at all -owner/reponames containing either were unenterable.Both are the same class: a pane shortcut that collides with a focused field now yields to the field.
Frozen v1.0.1 bindings made focus-conditional
left/right/h/lin the issue import overlay: still step the source and count controls, but only while those controls hold focus, never while the reference input does.alt+left/alt+rightin the card editor: no longer step the due date at all.[/]remain the date stepper, so the keyboard path to adjust a date is intact.Surfaces audited and found already correct
Board filter input, kill-reason prompt, settings AI and integration-row inputs, ADR split paste/file-path/row-title inputs, card detail comment and link inputs. All forward unconsumed keys straight to the focused field. They now carry regression tests so they stay that way.
Verification
go build ./...cleango vet ./...cleango test -race ./internal/tui/...672 passsh scripts/check-go-coverage.sh96.9% total (gate 96.4%); no package below its floorBoth fixes were caught by a red test first: the due field stepped the date on
alt+left, and the import reference field stayed empty after typinghl.