input: Cover UI workflows and fix disabled focus and vertical selection - #3256
Merged
Merged
Conversation
huacnlee
marked this pull request as ready for review
September 26, 2026 16:03
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.
Summary
Expand Input, Textarea and Editor interaction regressions from 82 to 159 UI cases, with an operation matrix and a single local gate:
script/test-input. The aim is to replace the routine manual editing tour with reproducible assertions and make this suite an example for future component UI tests.Coverage includes typing/replacement, character/word/line/document/page movement, forward/reverse selection, Unicode and CRLF, pointer/word/paragraph selection, drag autoscroll, clipboard, Undo/Redo, validation and masks, readonly/disabled transitions, focus/lifecycle, wrapping/resizing, pairs/indentation, folding, multi-cursor editing, search/replace, deterministic completion/code-action/inline/definition providers, and IME protocol transitions on all three controls. Assertions inspect text together with selections, caret geometry, focus, history or host callbacks as appropriate.
Production fixes exposed by the tests
The runtime changes are limited to these paths. No public API signatures change. The existing
presshelper correction pairs key-down/up and avoids simulated IME text injection for Enter/Tab; its regressions remain included.The branch starts from main after #3253 and does not depend on #3254's accessibility behavior. It also carries the isolated gallery-fixture CI correction shared with #3254: materialize registered surfaces in separate frames without changing production execution budgets.
Verification (Linux)
script/test-input: 536 passed, comprising Base 300, Component 44, Input UI 159, focus 4, keyboard helpers 16, touch selection 13; no failures or ignored cases in the selected runs.cargo clippy -p gpui-kit --features test-support,assets --test input --test input_focus --test interactions --test touch_selection --locked -- --deny warnings: passed.bash -n script/test-input, andgit diff --check: passed.The existing CI matrix runs the relevant targets on Linux, macOS and Windows. Results for the new head must be checked before merging.
Review gate and boundaries
See
crates/kit/tests/input/README.mdfor the operation matrix, fixtures, exact commands and instructions for adding a failing regression for each changed interaction. For ordinary editing changes, use that regression plus the full gate and platform CI.This covers repeatable interaction contracts, not every possible document/configuration/event ordering. Composition tests call the public
ElementInputHandlerbridge for mounted controls; they do not drive a real OS input method or the platform-installed handler. Native IME/candidate windows, accessibility dispatch, clipboard/menu adapters and pixel rendering retain their relevant platform checks. The in-flight completion disposal fixture is inactive because TestPlatform retains the active window's input handler after removal; it does not certify active-window platform disposal.Unicode movement preserves the existing scalar-boundary contract; grapheme movement, regex search, duplicate/move-line commands and Shift-Page selection are not introduced by these tests.
AI assistance
Implementation, tests, documentation and review were assisted by OpenAI Codex.