Repository navigation
Merged
Conversation
…ine of the Field left hides (#100) The adapter closed the prompt a task after its input blurred through openDialog's bare close: it called cm.focus(), the Session's focus of the Field, which took focus back from what the person clicked, and it ran none of the engine's cancel, so vim.status kept the prompt's key and the bar read --NORMAL--: until the Session next handled a key. The mirror now wraps cm.openDialog (Mirror.cancelOnBlur): the adapter's close on blur is off, and the blur is answered a task later with an Escape keydown on the prompt's input, the engine's own cancel path, its re-focus dropped. The Session then hides the Status Line unless focus went to its Field. A blur that leaves the input the active element of its own tree closes nothing, the adapter's check made where it can hold. Tests: 30 e2e (textarea, Single-line, contenteditable, shadow root, the Notion shape; : / ?; Normal, Visual, Insert and Replace through Ctrl-o) and two unit tests, all red on main's source (npm run red-on-main). The #97 click-away test is now one of them, with the bar asserted. docs/engine-seams.md: "Dialog lifetime" gains the blur close; "Selection and focus" and "Focus" are corrected where they described the engine's re-focus after a click, which no longer happens. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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
A click outside the open command line was undone: the Field took focus back from what the person clicked, on every Field kind, and the Status Line kept reading
--NORMAL--:after the prompt was gone. Both came from the adapter's own close on blur, which re-focuses the Field and runs none of the engine's cancel.Esc, Enter and an Enter that ends in a notice close in the same call as before, with the Field focused and the Cursor where it was (#88, #90, #97).
docs/engine-seams.md: "Dialog lifetime" gains the blur close; "Focus" and "Selection and focus" are corrected where they described the engine's re-focus after a click.Closes #100
Evidence
Before:
npm run red-on-main -- tests/e2e/command-line.spec.ts tests/e2e/site-shapes.spec.ts tests/e2e/shadow-contenteditable.spec.ts tests/unit/session.test.tsexits 0: the 30 new e2e tests (every one named#100) and both new unit tests fail onmain's source.After:
npm run checkpasses: 581 unit tests, 300 e2e, 0 flaky.npm run test:e2e:editors: 295 passed, 0 flaky.Covered through the built extension: a textarea, a Single-line Field, a contenteditable, a contenteditable in a shadow root and the Notion shape (another block, the header's controls, text outside the root);
:and/, and?on the textarea; Normal mode, and on the textarea Visual mode and Insert and Replace mode through Ctrl-o; coming back by a click, by focus, and by the caret moving into the block.Merge Danger
Door: two-way
Two source files; reverting the commit restores the adapter's close.
Blast Radius: command-line
tests/unit/chromium-facts.test.ts: the fix does not tell the person's click from a selection the page writes, the brief's candidate. That distinction is still Notion: the command line opened right after a cursor move loses focus back to the page #98's, which has a note on what changed under it.🤖 Generated with Claude Code