Repository navigation
fix: publish focus departures when component entry fails - #4406
Merged
Merged
Conversation
A non-null focusout relatedTarget does not guarantee a subsequent focusin: component focus forwarding can leave the body active instead. Run the existing end-of-task reading for those departures too, so shortcut projections and other current-location readers learn that focus left. The new runtime regression fails before the change and passes after it. The review-a-fix stale-shortcut sweep also reproduces the reported zoom-step failure before this change and passes afterward. Closes #4245
This was referenced Oct 27, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 27, 2026
A native pointer focus transfer checkpoints microtasks between departure and arrival. #4406's deferred departure check could read the body in that gap and fold the margin options under a held press, excluding the retained action from the accessibility tree despite its correct label. Read the departure after the focus task finishes and discard it when a newer location reading has superseded it. This preserves #4406's failed-arrival cleanup while keeping the options open and the retained action focused through the press and label update. The existing browser regression now explicitly checks that intermediate focus and disclosure state. Validation: the reported test fails before the change and passes afterward; all 682 runtime tests pass, including failed-arrival cleanup. The review-a-fix stale-shortcut sweep, inline-margin retention case and three focused focus cases pass. The kernel build/type check passes. Local ESLint, Prettier and Ruff executables are unavailable; CI will run lint. A served review-a-plan startup comparison retains 31 code requests through widget upgrade and first server-state presentation, with 148 more code bytes and no console errors or startup layout shifts. The change adds no startup task or dependency. Parallel triage sessions reproduced and verified the same correction for suggestion presses, keyboard arrival and thread-preview opening in #4423, #4424, #4425 and #4426; their exact cases and head-pinned results are recorded in the PR comments. Closes #4423, closes #4424, closes #4425, closes #4426, closes #4427 — automated triage Co-authored-by: leaf-agent <[email protected]>
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.
A component can accept a focus transfer and then leave the document body active without emitting a matching
focusin. The shared focus reader returned early wheneverfocusout.relatedTargetnamed a destination, leaving command hints attached to the previous widget. This caused the trace's Previous and Next controls to retain arrow shortcuts after the zoom step in the review-a-fix sweep.Run the existing deferred departure reading for these transfers too. Successful arrivals still suppress it, and focus holds and drop classification retain their existing checks. This preserves the central focus publication model from #1967 instead of adding a trace-specific repaint.
The new runtime regression fails before the change and passes afterward. The reported review-a-fix sweep likewise fails before and passes after; the nested-surface Escape journey also passes. Generated kernel files are rebuilt.
Closes #4245 — automated triage