Pressing an arrow key to move the cursor into a Callout or Accordion…#175
Merged
Conversation
…ponents (S1c flake) (#1905) * fix(open-knowledge): deterministic arrow descent into compound jsxComponents (S1c) S1c (selection-indicator.e2e.ts:172, 'ArrowDown into compound Callout descends into body') flaked because PM's native caret motion across the jsxComponent's isolating contentEditable=false->true boundary commits the PM selection only asynchronously via DOMObserver readback, and under load intermittently not at all, so the descent into the Callout body silently failed and the assertion timed out. Adds L2d tryEnterCompoundJsx: the bare-arrow ENTRY mirror of the existing L2c ArrowUp exit handler (tryExitCompoundJsxUp), generalized over all four arrows the way tryL0NodeSelect is. Dispatches a deterministic TextSelection at the body's first (forward) / last (backward) inner caret instead of deferring to selectVertically + browser-native motion. Wired into all four arrow handlers. Same-wave A3 parity sweep: ArrowDown/Right/Left/Up across Callout + Accordion jsxComponent types. * test(open-knowledge): update keyboard-nav catch-path contract for the L2d site The new L2d tryEnterCompoundJsx handler renamed the ArrowUp/ArrowDown handler comments that the precedent #48 structural contract anchors on, and added a fifth catch site. Re-anchor the L2 ArrowUp/Down tests to the updated comments, add an L2d contract test pinning the new catch site, and bump the catch-count floor 4->5. GitOrigin-RevId: 21a29f6dcc3aea60212a0975601ed4f3c66da766
Contributor
There was a problem hiding this comment.
Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/27664399596). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.
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.
Pressing an arrow key to move the cursor into a Callout or Accordion body now lands reliably. Previously the descent across the component boundary relied on the browser's native caret motion, which under load could intermittently fail to place the cursor inside the body (leaving the selection stuck outside). A deterministic handler now drives the descent for all four arrow directions (down, up, left, right).