Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Changes requested: the resolve and reopen focus handoff reads correctly, but it adds a second copy of focus logic that Core already shares.
claimResolveFocus(CommentsContext.tsx:347-385) re-implements Core's focus-lost test (isFocusLost, which Lab already imports from@astryxdesign/core/internal/touch) and the replacement handoff thatuseFocusAcrossSwapowns, so callisFocusLost(null, element.ownerDocument)instead of the inline test and carry the swap throughuseFocusAcrossSwap(exported for Lab and taught to skip OverflowList's inert measuring copy), or explain in the description why the shared hook cannot serve this case.
Optional: the tests' OverflowList mock renders no inert measuring copy, so the [inert] skip at CommentsContext.tsx:354 is not covered by a test.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim, the change touches only Comments files and none of CommentPin's: verified, four files under
packages/lab/src/Comments/. - Claim, it applies cleanly to
main: verified, the commit merges onto the currentmainwithout conflict. - Claim, on the base focus falls to the page after Mark as resolved or Reopen: verified by code, the two buttons swap under different keys and the base resolve and reopen have no focus step.
- Claim, the Comments docs promise focus never drops to the page: verified,
Comments.doc.mjs:156. - Claim, the panel's other control swaps keep focus: verified for reply, edit, delete, history, the reaction picker and Load earlier comments.
- Claim, a press records the control it waits for: verified,
CommentsContext.tsx:371-377. - Claim, the replacement takes focus only when focus fell to the page, and focus moved elsewhere stays: verified by code,
CommentsContext.tsx:359-365. - Claim, a failed request records nothing: verified in effect, the record is cleared on failure at
CommentsContext.tsx:378-384. - Claim, the inert measuring copy is skipped: verified by code at
CommentsContext.tsx:354; no test covers it. - Claim, no API, visual or other behavior change: verified, only internal Comments types change and no style changes.
- Claim, Core Button uses
aria-disabled: verified inButton.tsx. - Claim, the new keyboard test fails without the fix: not run here; consistent with the code.
- Claim, the listed test, lint and browser runs pass: not reproduced here.
- Claim, the branch sits on the stated
maincommit: verified. - File
CommentsContext.tsx: the shared-path finding above. - File
CommentRow.tsx: clear. - File
CommentActions.tsx: clear. - File
Comments.test.tsx: clear; the optional coverage note above.
a72ff8b to
f90cbbd
Compare
|
Reworked to reuse Core's hand-off. Mark as resolved and Reopen now share one
|
There was a problem hiding this comment.
Changes requested: the Comments fix now reuses Core's focus hand-off as asked, but the hook's new inert check regresses focus for some Core controls, and the description no longer matches the code.
useFocusAcrossSwapdecides the inert skip once, when a node attaches (useFocusAcrossSwap.ts:80-85), so a Core control first mounted inside aninertregion, such as a link Item row or a Pagination link in a covered BottomSheet, drops focus to the page when it is later disabled or swapped while focused; please read inertness when the hand-off is taken and when it is recorded, and add a test that mounts underinert, removes it, focuses the control and swaps it.- The description's "Problem and solution fit" and "Smallest restoration" still describe the earlier
CommentsContextandclaimResolveFocusimplementation, so please rewrite them to the Core hook, its inert skip and the internal re-export (your latest comment already says this), list the Core files under Scope, and say that the Testing and Evidence runs were repeated on this head.
Non-blocking: the new comment in CommentRow.tsx reads better as two sentences (see the inline note).
Claims and files checked
Review mode: full; reason: author-not-engowner
- Changeset, the hand-off skips an inert copy: verified (
useFocusAcrossSwap.ts:80-85,useFocusAcrossSwap.test.tsx:295-302). - Changeset, the internal entry re-exports the hook: verified (
touch.ts:133,touch.test.ts:213-219). - Changeset, Comments carries focus from Mark as resolved to Reopen and back: verified (
CommentRow.tsx:383-400,Comments.test.tsx:1229). - Changeset, not part of the public API: verified (internal subpath only).
- Changeset, apps see no change: false for a control first mounted inside an inert region.
- Description, stacked on #13736 and touching no CommentPin files: verified.
- Description, applies cleanly to
main: verified. - Description, focus fell to the page body before the change: verified from the base code.
- Description, a press records which control it waits for: false.
- Description,
CommentsContextkeeps the intent and offersclaimResolveFocus, which skips the inert copy: false. - Description, the controls take a ref that calls it: false as worded; they take Core's hook ref.
- Description, focus is taken only when it has fallen to the page, and moved focus stays: verified (
Comments.test.tsx:1270). - Description, a failed request records nothing: true in effect, but it describes the removed mechanism.
- Description, no API or visual change: verified.
- Description, the regression tests exist and the first fails without the fix: the tests exist; the failure is consistent with the base code but was not run here.
- Description, test, lint and real-browser results: not re-run in this review.
- Files: the changeset (finding),
useFocusAcrossSwap.ts(finding),useFocusAcrossSwap.test.tsx(clear, but no inert-then-live test),touch.ts(clear),touch.test.ts(clear),scripts/touch-support-bundle.test.mjs(clear),CommentActions.tsx(clear),CommentRow.tsx(non-blocking comment note),Comments.test.tsx(clear).
40e589a to
a9f094d
Compare
f90cbbd to
ee9ee12
Compare
|
The hook now reads inertness when it records a hand-off and when it takes one, not when the element attaches. A control first mounted inside an inert region, such as a link row in a covered BottomSheet, keeps its hand-off once the region is live again. OverflowList's measuring copy is still ignored.
|
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. Mark as resolved and Reopen now hand focus to the control that replaces them through Core's shared useFocusAcrossSwap, and the hook reads inertness when it records or takes a hand-off, so the earlier focus regression for controls first mounted inside an inert region is gone and the description now matches the code.
Non-blocking: the grown header in useFocusAcrossSwap.ts can be one line shorter and in active voice (see the inline note).
Claims and files checked
Review mode: full; reason: author-not-engowner
- Changeset, the hand-off ignores an element inside an inert region: verified (
useFocusAcrossSwap.ts:83,:99; tests atuseFocusAcrossSwap.test.tsx:295and:304). - Changeset, the internal touch entry re-exports the hook for Astryx's own packages: verified (
touch.ts:133,touch.test.ts:213, the bundle guard's Lab-only list). - Changeset, Comments carries focus from Mark as resolved to Reopen and back: verified (
CommentRow.tsx:383-401,Comments.test.tsx:1229). - Changeset, not public API, and apps see no change: verified (internal subpath only; Core callers each run their own hand-off, and an inert element cannot hold focus).
- Description, focus fell to the page body before the change: verified from the base code.
- Description, the overflow list's inert measuring copy took or cleared the hand-off first: verified (
OverflowList.tsx:407-419). - Description, focus the viewer moved elsewhere stays, and a failed request moves nothing: verified (
Comments.test.tsx:1270; nothing is swapped without the host's update). - Description, inertness is read at record and take, so a control first mounted in an inert region keeps its hand-off: verified (
useFocusAcrossSwap.ts:83,:99, test at:304). - Description, the hook already serves Item, Pagination, Token, TreeList and NavMenu headings: verified.
- Description, the internal entry already carries the focus-lost and last-input helpers for Lab: verified (
touch.ts:100-101). - Description, Core Button already uses
aria-disabled: verified (Button.tsx:1111). - Description, Comments has no record yet, and a later record names the destination: the first half is verified; the second refers to a later pull request.
- Description, stacked on the previous Comments fix, touching no CommentPin file, and applying cleanly to main: verified.
- Description, the regression tests exist and fail without the fix: the tests exist, and the failures follow from the base code; not run here.
- Description, test, typecheck, lint, pre-review and real-browser results: not re-run in this review.
- Files: the changeset (clear),
touch.ts(clear),touch.test.ts(clear),useFocusAcrossSwap.ts(non-blocking header note),useFocusAcrossSwap.test.tsx(clear),CommentActions.tsx(clear),CommentRow.tsx(clear),Comments.test.tsx(clear),scripts/touch-support-bundle.test.mjs(clear).
There was a problem hiding this comment.
Changes requested: in wide panels, Mark as resolved and Reopen now hand focus to the control that replaces them, but three claims in the title, description and changeset do not hold at this head.
- Newly live check: in a Comments panel 480 CSS px wide or narrower, Reopen collapses into the more menu right after it takes focus, so focus still falls to the page body after Mark as resolved (reproduced locally at 420 and 480 px, while 560 px and wider keep focus on Reopen); send focus to the more-menu trigger when the focused resolve control collapses, as Add reaction already does, with a test at such a width, or narrow the title, description and changeset.
- Regression: the description says the change applies cleanly to
main, butmainhas since changeduseFocusAcrossSwap.tsand removedCommentActionSlotfromCommentActions.tsx, so both files now conflict; rebase through the stack and put the ref onmain's directIconButtonandButtonchildren, or correct the sentence. - Newly live check: "Comments keeps no focus state of its own" is false, because
CommentRow.tsx,CommentsContext.tsxandCommentComposer.tsxeach keep focus state; say "no focus state for this hand-off" instead.
The wide-panel fix checks out in a local run: the new tests fail on the base and pass on this head, and a real browser moves focus to Reopen and back. The earlier non-blocking note on the hook's file header still applies.
Claims and files checked
Review mode: full; reason: recipe-changed (many rules)
- Title (live): "fix(Comments): Mark as resolved and Reopen hand focus to the control that replaces them": false for panels 480 CSS px wide or narrower (first finding); verified for wider panels (the keyboard hand-off test, and a local real-browser run).
- Stacked on the previous Comments fix and touches no CommentPin file: verified (the changed-file list).
- Applies cleanly to main: false at current main (second finding).
- On the base, a keyboard user loses focus to the page body after resolve or reopen: reported; reproduced locally on the base.
- The pressed button unmounts when the host flips the resolved state, and nothing moves focus: verified (base code; the new Comments test fails on the base).
- The Comments docs promise focus never drops to the page: verified (
Comments.doc.mjs:156). - Every other action in the panel keeps focus: reported (a statement about the base).
- The overflow list renders an inert measuring copy first and the visible one second, both taking the same ref: verified (
OverflowList.tsx:407-421; a local browser probe finds both copies; the hook's inert-copy test fails on the base). - Item, Pagination, Token, TreeList and NavMenu headings already use the hook: verified (a repository-wide search finds exactly these five callers).
- The replacement takes focus when the pressed control leaves with focus: false for narrow panels (first finding); verified for wide panels.
- Focus the viewer moved elsewhere stays there: verified (
Comments.test.tsx:1270, passing locally). - A failed request moves nothing: verified (a local check with a rejecting host keeps focus on the same Mark as resolved button).
- The hook ignores an element inside an inert region and reads inertness when it records or takes a hand-off: verified (
useFocusAcrossSwap.ts:83,:99; tests atuseFocusAcrossSwap.test.tsx:295and:304; an attach-time variant fails the second test locally). - The focusable-disabled record's removal clause names where focus goes: verified (paraphrase of the current clause).
- Comments has no record yet: verified; a later draft record naming the destination: unverified (no such pull request is open), and not a claim about this code.
- Core Button already uses
aria-disabled: verified (Button.tsx:1111). - Mark as resolved and Reopen share one hook ref: verified (
CommentRow.tsx:383-401); Comments keeps no focus state of its own: false (third finding). - A control first mounted inside an inert region keeps its hand-off: verified (test at
useFocusAcrossSwap.test.tsx:304). - Core's other callers see no change: verified (each of the five callers drives one element per hook instance, so an inert copy only drives its own instance, whose element cannot hold focus).
- The internal touch entry re-exports the hook beside the focus helpers it already carries for Lab: verified (
touch.ts:100-101,:133;touch.test.ts:213). - Outside the public API, with an internal changeset: verified (the internal subpath rule; a local surface comparison lists no public change; the bundle guard).
- No public API, visual or other behavior change: verified, bounded by the diff and the hook's direct importers.
- Real-browser before and after results: reported; reproduced locally.
- The new tests fail without the fix: reported; confirmed locally (the Comments and inert-copy tests fail on the base; the inert-region test fails against an attach-time check).
- 138 tests pass: verified (local run, 138 passed).
- Typecheck, ESLint, Prettier and the changeset check pass: reported; re-run locally and passing; the pre-review checklist: reported.
- Validated on an earlier main: reported.
- Changeset, the hand-off ignores inert regions: verified; the internal entry re-exports it: verified; Comments carries focus from Mark as resolved to Reopen and back: false for narrow panels (first finding); not public API and apps see no change: verified.
- Files: the changeset (first finding),
touch.ts(clear),touch.test.ts(clear),useFocusAcrossSwap.ts(conflicts with current main; non-blocking header note),useFocusAcrossSwap.test.tsx(clear),CommentActions.tsx(first and second findings),CommentRow.tsx(first finding),Comments.test.tsx(its overflow mock never collapses, so it misses the first finding's case),scripts/touch-support-bundle.test.mjs(clear).
…that replaces them Resolving a thread replaces Mark as resolved with Reopen, and reopening it replaces Reopen with Mark as resolved, when the host's update arrives. The pressed control left the page, so keyboard focus fell to the page body. Both controls now take one ref from Core's focus hand-off, useFocusAcrossSwap: when the pressed control leaves while it has focus, the control that replaces it takes focus, unless focus has moved somewhere else. A failed request replaces nothing. OverflowList renders an inert copy of each action to measure it, so the hand-off ignores an element while it is inside an inert region. It reads inertness when it records or takes a hand-off, not when the element attaches, because a region can stop being inert later. Core's internal entry re-exports the hook for Lab. In a narrow panel, Reopen does not fit the actions row and collapses into the more menu right after it takes focus. While the resolve action sits in that menu, the menu's trigger takes the same ref, so focus moves to the trigger.
a9f094d to
e642a67
Compare
ee9ee12 to
22561bb
Compare
|
All three points are fixed, on
Repeated on this head: 139 tests passed (Comments, the hook, the touch entry, the touch bundle). The rest of the stack is unchanged apart from the rebase: #13702, #13735, #13736, #13738, #13739, #13740 and #13741 keep their patch IDs. |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. Mark as resolved and Reopen in Lab's Comments now hand focus to the control that replaces them, or to the more-menu trigger when that control collapses into the menu, and the three points from the last review are fixed. A local browser run puts focus on the trigger at 420 and 480 px and on Reopen, then Mark as resolved, at 560 and 920 px, where the base leaves it on the page body.
Non-blocking: the new comment above the more-menu trigger's ref reads better as two sentences (see the inline note).
Claims and files checked
Review mode: full; reason: author-not-engowner
- Title, Mark as resolved and Reopen hand focus to the control that replaces them: verified, local browser probe at 920 and 560 px (Reopen, then Mark as resolved) and at 480 and 420 px (the more-menu trigger, the destination the description names); tests at
Comments.test.tsx:1228and:1269. - Claim, the change touches none of CommentPin's files and applies cleanly to
mainon its own: verified, no CommentPin path among the nine files, and the commit merges without conflict onto the statedmaincommit and onto the currentmain. - Claim, before the change, focus fell to the page body after Mark as resolved and after Reopen: verified, local browser probe of the base (body after Mark as resolved at all four widths, after Reopen at 920 and 560 px), and the test at
:1228fails on the base. - Claim, the Comments docs promise focus never drops to the page: verified,
Comments.doc.mjs:156. - Claim, every other action in the panel keeps focus: reported (a statement about the base's existing behavior).
- Claim, the overflow list renders each action twice, its inert measuring copy first, so the copy took the hand-off first: verified,
OverflowList.tsx:416-431, the probe finds both copies, anduseFocusAcrossSwap.test.tsx:295fails without the inert check. - Claim, at 480 px and narrower Reopen collapses into the more menu after it takes focus: verified, local probe (visible action list empty after the resolve).
- Claim, item, Pagination, Token, TreeList and NavMenu headings already use the hook: verified (
Item.tsx:679,Pagination.tsx:424,TokenFocusHandoff.tsx:51,TreeListItem.tsx:448,NavHeadingMenuItem.tsx:174). - Claim, when the pressed control leaves while focused, the replacement takes focus: verified, probe and tests above.
- Claim, if the viewer moved focus first, focus stays where they put it: verified,
Comments.test.tsx:1310, and the record is taken only when the leaving control owns focus (useFocusAcrossSwap.ts:113-116). - Claim, a failed request replaces nothing, so focus does not move: verified, a local scratch test with a rejecting host keeps the same Mark as resolved element focused.
- Claim, while the resolve control sits in the more menu, the trigger takes the same ref, the destination Add reaction already uses: verified,
CommentActions.tsx:500-507and:315-318; the test at:1269fails locally without that ref. - Claim, the hook ignores an element inside an inert region and reads inertness each time it records or takes a hand-off: verified,
useFocusAcrossSwap.ts:97and:113; tests at:295and:304each fail locally against the matching mutation. - Claim, a control first mounted inside an inert region keeps its hand-off once the region is live: verified,
useFocusAcrossSwap.test.tsx:304. - Claim, core's other callers see no change: verified, the seven caller files (Button, Item, Link, NavHeadingMenuItem, Pagination, TokenFocusHandoff, TreeListItem) each give a hook one element per instance, and the head differs from the base only for an element inside an inert region, which holds no focus.
- Claim, the internal touch entry re-exports the hook beside
isFocusLostandfocusForLastInput, outside the public API, with a[chore] Internal:changeset: verified,touch.ts:100-101,:133,touch.test.ts:213, the bundle guard, and the surface generator run locally (0 public rows). - Claim, comments keeps no focus state for this hand-off, and the ref sits on the overflow list's direct
IconButtonandButtonchildren: verified,CommentRow.tsx:383,CommentActions.tsx:415,:428. - Claim, core Button marks disabled with
aria-disabled: verified,Button.tsx:1153. - Authority: the cited focus rule says the component's record names the destination; Comments has no record yet: verified, no Comments record at the head or on
main; the future record is reported. - Claim, no public API, visual or other behavior change: verified, the surface generator lists no row, and the only behavior change is the claimed Comments focus.
- Changeset, the hand-off ignores inert elements, the internal entry re-exports it, Comments carries focus to Reopen and back or to the more-menu trigger, apps see no change: verified, as above.
- Claim, rebased onto
main, keepingmain's hook header plus an inert-region note and renaming the helperisInInertRegion: verified (the note is two short sentences). - Testing: 139 tests pass and the keyboard and inert tests fail without the fix: verified locally (139 passed; 5 failed on the base with the head's tests; each mutation fails its test). Typecheck for Core and Lab, lint, Prettier and the changeset check: verified locally. Pre-review checklist and the author's browser runs and captures: reported.
- File
.changeset/comments-resolve-focus-handoff.md: clear - File
packages/core/src/internal/touch.ts: clear - File
packages/core/src/internal/touch.test.ts: clear - File
packages/core/src/utils/useFocusAcrossSwap.ts: clear - File
packages/core/src/utils/useFocusAcrossSwap.test.tsx: clear - File
packages/lab/src/Comments/CommentActions.tsx: non-blocking comment-style note at:501-503 - File
packages/lab/src/Comments/CommentRow.tsx: clear - File
packages/lab/src/Comments/Comments.test.tsx: clear - File
scripts/touch-support-bundle.test.mjs: clear
| // While Mark as resolved or Reopen sits in this menu, the | ||
| // trigger takes its hand-off, so a pressed control that | ||
| // collapses here gives focus to the trigger. |
There was a problem hiding this comment.
Non-blocking (comment style): this is one 27-word sentence with two topics. Two short sentences read more easily:
// While Mark as resolved or Reopen sits in this menu, the
// trigger takes its hand-off. A focused control that collapses
// here gives focus to the trigger.
Stacked on #13736 (the previous Comments fix) only so the Comments move includes it. It touches none of CommentPin's files and applies cleanly to
main(2608fe4) on its own.User impact
A keyboard user who presses Mark as resolved, or Reopen, loses focus to the page body. Resolving replaces Mark as resolved with Reopen, and reopening does the reverse, when the host's update arrives. The pressed control leaves the page, and focus goes with it. The user must tab from the top of the page back to the thread.
Problem and solution fit
Why does focus drop? The pressed button unmounts when the host flips
isResolved, and nothing moves focus to the control that replaces it.Why does it harm the task? Resolve and reopen are the last step of reviewing a thread. Losing focus after them breaks the keyboard path through the panel, and a screen reader announces nothing useful.
Why does it matter? The Comments docs promise "Focus never drops to the page", and every other action in the panel keeps it.
Why could Core's hand-off not serve as it stood? OverflowList renders each action twice: an inert copy to measure it, then the visible one. Both copies take the same ref, and the copy's ref detaches and attaches first, so it cleared or took the hook's hand-off before the visible replacement mounted.
Why did focus still drop in a narrow panel? In a panel 480 CSS px wide or narrower, Reopen is too wide for the actions row. It takes focus, then OverflowList collapses it into the more menu, and no element with the hand-off ref replaces it.
Mark as resolved and Reopen now take one ref from Core's focus hand-off,
useFocusAcrossSwap, which Item, Pagination, Token, TreeList and NavMenu headings already use when React replaces a focused element. When the pressed control leaves the page while it has focus, the control that replaces it takes focus. If the viewer has moved focus elsewhere by the time the host's update arrives, focus stays where they put it. A failed request replaces nothing, so focus does not move. While Mark as resolved or Reopen sits in the more menu, the menu's trigger takes the same ref, so a pressed control that collapses there gives focus to the trigger, the destination Add reaction already uses when it is not in the row. The hook now ignores an element while it is inside an inert region, and it reads inertness each time it records or takes a hand-off, not once when the element attaches.Expected behavior and authority
spec:AST-085FR4 (when a component removes a focused control, the component names where focus goes): for Mark as resolved and Reopen, it is the control that replaces it, or the more-menu trigger when that control sits in the more menu. Comments has no record in Lab; the draft record that comes with its move to Core names this destination.mainin Chromium before this change: after Enter on Mark as resolved, and after Enter on Reopen, the active element is the body. The other half of that BLOCK, native-disabled buttons, is already fixed onmain, since Core Button usesaria-disabled.Smallest restoration
useFocusAcrossSwapref. Comments keeps no focus state for this hand-off.mainremoved the action slots, so the ref sits on theIconButtonandButtonthat are OverflowList's direct children.button.ref, so a control that collapses into the menu after it takes focus gives focus to the trigger.useFocusAcrossSwapignores an element while it is inside an inert region, such as OverflowList's measuring copy: that element neither records a hand-off nor takes one. The hook reads inertness when it records a hand-off and when it takes one, not when the element attaches, so a control first mounted inside an inert region, such as a link row in a covered BottomSheet, keeps its hand-off once the region is live again. An element in an inert region can hold no focus, so Core's other callers see no change.@astryxdesign/core/internal/touchentry re-exports the hook for Astryx's own packages, beside the focus helpers it already carries for Lab (isFocusLost,focusForLastInput). It is outside the public API (spec:AST-017FR21). A[chore] Internal:changeset names it.No public API, visual, or other behavior change.
Evidence
Comments.test.tsx, "hands focus to Reopen after a keyboard resolve, and back after Reopen", which fails without the fix, and "leaves focus where the viewer moved it when the host resolves later"; inuseFocusAcrossSwap.test.tsx, "carries focus to the visible replacement past an inert copy of the element", which fails without the inert skip, and "keeps the handoff for a control first mounted inside an inert region", which fails when inertness is read only when the element attaches; and inComments.test.tsx, "hands focus to the more-menu trigger when Reopen collapses into the menu after a keyboard resolve", which fails without the trigger's ref.The captures below come from the first version of this fix, which kept its own hand-off in Comments. This head gives the same result in the same story (the re-run above).
Scope
Components: Comments, CommentThread.
Core files:
packages/core/src/utils/useFocusAcrossSwap.tsanduseFocusAcrossSwap.test.tsx,packages/core/src/internal/touch.tsandtouch.test.ts,scripts/touch-support-bundle.test.mjs, and the changeset.changeset/comments-resolve-focus-handoff.md.Testing
Repeated on this head.
vitest run packages/lab/src/Comments packages/core/src/utils/useFocusAcrossSwap.test.tsx packages/core/src/internal/touch.test.ts scripts/touch-support-bundle.test.mjs: 139 passed. The two Comments keyboard tests and the hook's two inert tests fail without the fix.tsc --noEmitfor@astryxdesign/coreand@astryxdesign/lab: pass.ASTRYX_STRICT_LINT=1 eslintandprettier --checkon the changed files: clean.pnpm review:pre: 0 findings.node scripts/check-changesets.mjs: valid.Real Chromium (Playwright) on a static Storybook build of this head, scoped to
#storybook-root, readingdocument.activeElementafter each Enter, at 420, 480, 560 and 920 px panel widths.Rebased onto
mainat 2608fe4, with the pull requests below this one.mainhad changeduseFocusAcrossSwap.ts(a shorter header andfocusTargetWithin) and removedCommentActionSlot; the hook's header keepsmain's text plus one sentence on inert regions, and the helper is renamedisInInertRegion, as that sentence now says.