Skip to content

architecture(layer-runtime): the runtime owns the one input hold (INV16) - #8595

Merged
cixzhang merged 4 commits into
mainfrom
spec/layer-runtime-input-hold
Nov 12, 2026
Merged

cixzhang merged 4 commits into
mainfrom
spec/layer-runtime-input-hold

Conversation

@cixzhang

@cixzhang cixzhang commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Record accuracy for architecture:layer-runtime. The Layer module's input hold, holdInput in Layer/inputHold.ts (on main), keeps input away from a layer while its presentation runs under a finger; layers that enter through CSS (Dialog, Drawer, MobileNav) take it through holdEntranceInput in Layer/holdEntranceInput.ts. No layer-runtime invariant names it; INV14's presentation hold is a different job, keeping a layer's chosen presentation until its close settles. This PR adds INV16:

  • The runtime owns the one input hold.
  • While a layer presents (spec:AST-094 FR35), it holds pointer input only. A shield catches taps and presses, a pinch still zooms the page, and keys and assistive technology stay live.
  • While a layer dismisses, its content is also inert. A component record may keep content that still holds focus live instead: a standalone BottomSheet stays neither inert nor aria-hidden while focus stays inside (component:BottomSheet FR9), while a leaving AlertDialog (component:AlertDialog FR7) and a closing BottomSheetSwitcher step are inert for their dismissal.
  • Components use this hold rather than building their own.

INV16 joins the record's list of required ownership not yet met, with two gaps: BottomSheet's own dismissal hold does not use the shared hold yet, and the shared hold has no mode that keeps focused content live (its dismissal scope makes content inert and blurs focus at once), which BottomSheet FR9 needs. The PR also adds the layering trigger, the owning-code line (Layer/inputHold.ts, Layer/holdEntranceInput.ts) and a verification row. It is rebased on main's INV17–INV22 text.

Writing rubric results

  • R1 present tense: pass; INV16 states what the runtime owns, and the BottomSheet shortfall is a gap line.
  • R2 research: none in the record.
  • R3 evidence: the INV16 verification row names test files, not changes.
  • R4 rejected alternatives: none.
  • R5 change references: none in the record.
  • R6 open questions: none.
  • R7 project status: none; the unmet parts are restated as two "INV16 gap:" lines (BottomSheet's adoption, and the hold mode FR9 needs).

@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 12, 2026 5:11pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 12, 2026, 5:27 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 26, 2026
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · e9f3c77

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval of this record change waits on an engineering owner: INV16 adds a runtime-owned input hold, a presenting rule for every layer and a dismissal-time inert rule, and the current specs state only part of it (spec:AST-094 FR35 covers a Popover or anchored menu growing under a finger). An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner. Separately, please list INV16 beside INV14 and INV15 in the record's opening scope sentence and in Current gaps until it is met, since Layer/inputHold.ts is not on main before #8342 lands and BottomSheet still makes its own closing dialog inert. It would also help for INV16 to say where focus goes when a dismissal makes the content inert.

[Automated review]

Comment thread docs/architecture/layer-runtime.md Resolved
Comment thread docs/architecture/layer-runtime.md Resolved
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 96aab51

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Oct 27, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested on the INV16 record. An engineering owner has approved the direction, but three things in the text need fixing before it merges:

  • INV16 makes a dismissing layer's content inert and requires every component to use that hold, which contradicts component:BottomSheet FR9 on main (a sheet closing with focus inside stays out of inert while focus stays), so either let the dismissal hold leave content live while focus stays inside or amend FR9 in this pull request.
  • The record's opening scope sentence and Current gaps still list only INV14 and INV15 as unmet, but Layer/inputHold.ts is not on main until #8342 lands and BottomSheet still builds its own closing inertness, so name INV16 beside them until it is met.
  • INV16 names useInputHold, which #8342 does not have; its components call holdEntranceInput from Layer/holdEntranceInput.ts, so name that helper and file instead.

The branch also conflicts with main, which added INV17 in the same lines. After the rebase, an engineering owner records approval again with /approve-spec <full head SHA>.

[Automated review]

Comment thread docs/architecture/layer-runtime.md Resolved
Comment thread docs/architecture/layer-runtime.md Resolved
Comment thread docs/architecture/layer-runtime.md Resolved
…eet FR9

Takes main's record (INV17-INV22, the new gap and owning-code text) and adds INV16 on it: the shared hold is holdInput in Layer/inputHold.ts, and layers that enter through CSS take it through holdEntranceInput. A dismissing layer's content stays neither inert nor aria-hidden while focus stays inside it, as component:BottomSheet FR9 requires. INV16 joins the unmet list, with the gap that BottomSheet's own dismissal hold does not use the shared hold yet.
@cixzhang
cixzhang marked this pull request as draft November 12, 2026 15:30
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 2026
@cixzhang
cixzhang marked this pull request as ready for review November 12, 2026 15:30
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 52b6d1d

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested on the INV16 record. An engineering owner approved this head's direction, and the rewrite settles the earlier BottomSheet focus conflict, the scope sentence and the hook name; one accuracy problem remains:

  • INV16 now keeps a dismissing layer's focused content live, but the shipped holdInput dismissal scope makes the content inert at once and blurs focus (makeContentInert in Layer/inputHold.ts), the tests the INV16 verification row cites assert that blur, and Current gaps lists only BottomSheet's adoption, so please add that gap and a row failure for content made inert or blurred while focus stays inside.

DropdownMenu also takes the hold through holdEntranceInput and could join the list in INV16. A new commit needs a fresh /approve-spec <full head SHA> from an engineering owner.

Claims and files checked
  • The shared input hold lives in the Layer module on main and holds input while a presentation runs under a finger: verified.
  • Dialog, Drawer and MobileNav take it through the entrance helper: verified; DropdownMenu does too.
  • No layer-runtime invariant named the hold, and the presentation hold is a different job: verified.
  • While a layer presents, only pointer input is held, a pinch still zooms, and keys and assistive technology stay live: verified against the hold's shield and press hold.
  • The dismissal rule matches the BottomSheet focus rule: the record text matches; the shipped hold does not.
  • INV16 has one gap, BottomSheet's own dismissal hold: not accurate, the shared hold's dismissal scope also falls short.
  • The change adds the layering trigger, the owning-code line and a verification row: verified.
  • The record sits on main's current INV17 to INV22 text: verified.
  • docs/architecture/layer-runtime.md: one blocking finding, one non-blocking note.

Automated review (maintainer link)

Comment thread docs/architecture/layer-runtime.md Resolved
Comment thread docs/architecture/layer-runtime.md Resolved
Comment thread docs/architecture/layer-runtime.md Resolved
…u takes the entrance hold

The shared hold's dismissal scope makes content inert at once and blurs the focused element (makeContentInert), so INV16's focus-stays-inside rule is a gap there too; the verification row fails content made inert or blurred while focus stays inside. DropdownMenu joins the holdEntranceInput users.
@cixzhang
cixzhang marked this pull request as draft November 12, 2026 16:07
@cixzhang
cixzhang marked this pull request as ready for review November 12, 2026 16:07
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 8e09d89

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested on the INV16 record. An engineering owner approved this head, and the record now names the shared hold's dismissal gap, fails it in the verification row and lists DropdownMenu; two items remain:

  • Miss: INV16 keeps a dismissing layer's focused content neither inert nor hidden and fails inert content that holds focus, but the current AlertDialog record (FR7 and DEC-1) makes a leaving alert's content inert for its dismissal fade while its focus stays inside until the dialog is hidden, and BottomSheet FR9 limits the same exception to standalone sheets while BottomSheetSwitcher keeps a closing step inert, so please either amend those records in this pull request to follow INV16 or scope INV16's exception to name them.
  • The pull request description still says INV16 has "one gap" and restates only BottomSheet's adoption under R7, while the record now lists two INV16 gaps (docs/architecture/layer-runtime.md:747 and :749-751), so please update it to name both gaps and to list DropdownMenu beside Dialog, Drawer and MobileNav.

A new commit needs a fresh /approve-spec <full head SHA> from an engineering owner, and the author may record it if they are one.

Claims and files checked
  • The shared input hold lives in the Layer module on main and holds input while a presentation runs under a finger: verified.
  • Dialog, Drawer and MobileNav take it through the entrance helper: verified; DropdownMenu does too.
  • No layer-runtime invariant named the hold, and the presentation hold is a different job: verified.
  • While a layer presents, only pointer input is held, a pinch still zooms, and keys and assistive technology stay live: verified.
  • The dismissal rule matches the BottomSheet focus rule: verified for standalone sheets; the record drops that rule's limit to standalone sheets, and the shipped hold's shortfall is now a listed gap.
  • Components use this hold rather than building their own: verified.
  • INV16 has one gap, BottomSheet's own dismissal hold: false; the record lists a second gap for the shared hold's dismissal scope.
  • The change adds INV16 to the layering trigger, an owning-code line and a verification row: verified.
  • The record sits on main's current INV17 to INV22 text: verified.
  • The writing rubric results R1 to R6: verified; R7 names one of the two gap lines.
  • docs/architecture/layer-runtime.md: one blocking finding (the dismissal exception against AlertDialog and the switcher); the other finding is in the description.

Automated review (maintainer link)

Comment thread docs/architecture/layer-runtime.md Resolved
A dismissing layer's content is inert, and a component record may keep focused content live instead: a standalone BottomSheet (component:BottomSheet FR9) stays live while focus stays, and a leaving AlertDialog (component:AlertDialog FR7) and a closing BottomSheetSwitcher step are inert. The hold-mode gap names what FR9 needs; the verification failure is scoped to layers whose record keeps focused content live.
@cixzhang
cixzhang marked this pull request as draft November 12, 2026 17:02
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 2026
@cixzhang
cixzhang marked this pull request as ready for review November 12, 2026 17:02
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec e9f3c77

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not finished on this head yet. INV16 is approved by an engineering owner at this head, its dismissal rule now agrees with the AlertDialog and BottomSheet records, and the description matches the record.

Two optional follow-ups: the switcher clause in INV16 cites BottomSheet FR9, but the rule that a closing switcher step stays inert lives in the BottomSheetSwitcher record; and the description's list of layers that enter through CSS could add DropdownMenu, which the record names.

Claims and files checked
  • Claim: the Layer module's input hold keeps input away from a layer while it presents under a finger: verified in the hold's source.
  • Claim: layers that enter through CSS take the hold through the entrance helper (Dialog, Drawer, MobileNav): verified; DropdownMenu also calls it.
  • Claim: no layer-runtime invariant named the hold before, and the presentation hold is a different job: verified against the record on main.
  • Claim: the runtime owns the one input hold, and components use it rather than building their own: verified in the new invariant.
  • Claim: while a layer presents, only pointer input is held, a pinch still zooms, and keys and assistive technology stay live: verified in the record and the hold's source.
  • Claim: while a layer dismisses, its content is inert, a component record may keep focused content live (a standalone BottomSheet), and a leaving AlertDialog and a closing switcher step stay inert: verified against the record and the three component records.
  • Claim: the invariant joins the unmet list with two gaps (BottomSheet's own hold, and no hold mode that keeps focused content live): verified in the record and the hold's source.
  • Claim: the change adds the layering trigger, the owning-code line and a verification row: verified.
  • Claim: the record keeps main's later invariants: verified.
  • Claim: writing rubric results (present tense, evidence names tests, no project status, both gaps as gap lines): verified.
  • File: docs/architecture/layer-runtime.md: clear, with one non-blocking citation note.

Automated review (maintainer link)

Comment on lines +651 to +652
(`component:AlertDialog` FR7) and a closing BottomSheetSwitcher step
(`component:BottomSheet` FR9) are inert for their dismissal. The component

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: component:BottomSheet FR9 only excludes switcher steps from its focus exception ("A standalone sheet (not a switcher step)"). The rule that a closing step stays inert is component:BottomSheetSwitcher's Closing state ("Outgoing child is retained inert while exit motion completes") and AR2. Consider citing that record here.

@cixzhang
cixzhang merged commit 7197c58 into main Nov 12, 2026
75 of 123 checks passed
@cixzhang
cixzhang deleted the spec/layer-runtime-input-hold branch November 12, 2026 17:40

This branch was successfully deployed

1 active deployment
Preview — e9f3c772 Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant