Repository navigation
Conversation
This update modifies the key handling in the field editor to allow the Tab key to accept visible inline completions within list items, preventing the default behavior of nesting items. Shift-Tab continues to outdent while a completion is visible. New tests have been added to verify this behavior, ensuring that inline completions are correctly accepted and that list item indentation works as expected. Breaking changes: None.
Member
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9f6e6ed. Configure here.
janglad
requested review from
MatteoGauthier,
krijnrijshouwer and
noudadrichem
October 6, 2026 16:58
janglad
deleted the
fix/web-4235-editor-tab-autofill-conflicts-with-bullet-list-indentation
branch
October 6, 2026 19:26
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.
Before
tabboth accepted suggestion and moves bulletScreen.Recording.2026-10-06.at.18.32.26.mov
After
accepts suggestion first, then bullet
Screen.Recording.2026-10-06.at.18.32.09.mov
Summary
Tab under a visible autocomplete ghost nested the list item instead of accepting the ghost. The default keymap (
Tab→pen.indent) ran before the inline-completion check, so it won the key in any list item that could nest. Fixes WEB-4235.spec/rules/commands.mdgains K5 for this precedence; the new tests claim it inscripts/rule-coverage-claimed.txt.Evidence
Before:
K5: accepts a visible inline completion instead of nesting a list itemfailsAfter: the same test passes, with indent unchanged at 0
K5: outdents a list item on Shift-Tab while an inline completion is visibleis a regression guard; it passes before and after.Not checked in a browser or in the input composer.
Merge Danger
Door: two-way
Reverting restores the old key order. Nothing is persisted and no public API changes.
Blast Radius: keyboard
handleFieldEditorKeyDown.Tabcan no longer win the key while a ghost is visible.@input/pen-dom.Note
Medium Risk
Keyboard routing change in the shared field-editor path: host keymap Tab bindings cannot win while a ghost is visible, and failed accept may leave Tab inert in lists where indent used to run.
Overview
Tab precedence for inline autocomplete (K5) — When a visible autocomplete ghost is shown, unmodified Tab now accepts the suggestion before the default keymap runs, so
pen.indentno longer nests list items under the hint. Shift-Tab is unchanged: it still hits the keymap first so outdent works with a ghost visible; Tab with no ghost still indents/nests as before.Implementation is in
handleFieldEditorKeyDown(keyHandling.ts): an early Tab branch plus sharedacceptVisibleInlineCompletion/isTabOrShiftTabhelpers. Spec rule K5 documents the behavior; new React tests cover list-item accept and Shift-Tab outdent;@input/pen-domgets a patch changeset.Reviewed by Cursor Bugbot for commit 9f6e6ed. Bugbot is set up for automated code reviews on this repo. Configure here.