Skip to content

fix(useContainerReveal): a touchscreen laptop used with a mouse reveals on hover - #11218

Merged
cixzhang merged 4 commits into
meta:mainfrom
shashank03-dev:fix/container-reveal-hybrid-pointer
Nov 13, 2026
Merged

cixzhang merged 4 commits into
meta:mainfrom
shashank03-dev:fix/container-reveal-hybrid-pointer

Conversation

@shashank03-dev

@shashank03-dev shashank03-dev commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #7689

User impact

On a laptop with a touchscreen that is used with a mouse or trackpad, every useContainerReveal container shows its revealed content all the time. Row actions meant to appear on hover take space at rest, a Thumbnail's hover remove button never hides, and every Markdown heading link shows its #. Many Windows laptops ship with a touchscreen. After this change those laptops reveal on hover and keyboard focus like any other mouse device. Phones and tablets stay always revealed.

Problem and solution fit

  • Why the defect occurs: the always-revealed branch keys on @media (any-pointer: coarse). It matches when any input is coarse, so a touchscreen matches even when the mouse is the primary pointer.
  • Why it harms the task: the hover reveal is turned off on a device that can hover, so hidden secondary actions crowd the row and can cut off the labels beside them.
  • Why that matters: the hook exists to keep secondary actions out of the way until the pointer asks for them. On these laptops it never does.

The fix keys the branch on the primary pointer, @media (pointer: coarse).

Expected behavior and authority

  • spec:AST-094 FR13: a touch presentation applies under a coarse primary pointer, and a style keyed on the literal touch media query conforms. Core's touch query is TOUCH_QUERY = '(pointer: coarse)' in utils/touchQueries.ts.
  • architecture:interaction-modality (System model): hover behavior is for hover-capable pointers and stays an enhancement over keyboard, click and touch paths. A touchscreen laptop driven by a mouse is hover-capable.
  • The hook's contract from feat(hooks): useContainerReveal — composable hover/focus reveal primitive #4573: content is "never gated behind an unavailable hover". On these laptops hover is available.

Smallest restoration

  • containerReveal.stylex.ts: the 15 '@media (any-pointer: coarse)' keys in container, stateInactive and stateActive become '@media (pointer: coarse)'. One comment says why it is the primary pointer.
  • No public API, prop, default or new style. The hover, focus, inverted and forced-state branches are unchanged.
  • HeadingLinksRenderer's own any-pointer keys size the tap target, not the reveal, so they stay.

Evidence

Real Storybook builds of main and of this branch, 2x pixels, Playwright 1.61.1. A touchscreen laptop is emulated in Chromium 149 with --blink-settings=primaryPointerType=4,availablePointerTypes=6,primaryHoverType=2,availableHoverTypes=3 (fine primary pointer with hover, a coarse pointer also present), the technique apps/docsite/e2e/blog-heading-links.spec.ts uses, and in Firefox 151 with ui.primaryPointerCapabilities=6 and ui.allPointerCapabilities=7. Each board shows the story on main and on this branch, with the count of visible controls measured from computed opacity. The cursor and the red circle mark the mouse and the finger.

1-reveal 2-thumbnail 3-heading-links
Firefox 151 and WebKit 26.5 boards

Firefox emulates the touchscreen laptop and gives the same counts as Chromium in every case. WebKit cannot report a fine primary pointer with a touchscreen, so its boards cover the mouse-only laptop and the phone, which are the same on main and on this branch.

1-reveal 2-thumbnail 3-heading-links 1-reveal 2-thumbnail 3-heading-links
  • Reproduction before the change: touchscreen laptop, mouse away. main shows 6 of 6 row actions, 3 of 3 remove buttons and 12 of 12 heading links.
  • Result after the change: 0 of 6, 0 of 3 and 0 of 12 at rest. Hovering one item or tabbing into it shows only that item's controls. A finger tap on an item shows its controls when the finger is the first input.
  • Representative unchanged path: a mouse-only laptop shows 0 at rest and a phone profile (coarse primary pointer, no hover) shows every control at rest, on main and on this branch alike.
  • Regression test: useContainerReveal.test.tsx reads the rules StyleX injects for each container state (auto, inactive, active) and checks that every pointer branch of the five touch properties is keyed on TOUCH_QUERY. It fails on main ((any-pointer: coarse)) and passes here.

Not tested and limits:

  • Not tested on real touchscreen hardware. Every touchscreen laptop result here comes from browser emulation in Chromium and Firefox. A check on a real Windows touchscreen laptop in Chrome or Edge would confirm it.
  • WebKit cannot emulate a touchscreen laptop, so it covers only the mouse-only and phone profiles. macOS Safari does not run on a touchscreen.
  • On a touchscreen laptop, a finger tap after the mouse has moved did not reveal the Thumbnail's remove button in Chromium's emulation. This is how every hover reveal behaves on these laptops, and AST-094 already treats them as pointer devices (for example Dialog and Drawer entrances).
  • A finger tap on the middle of a Thumbnail removes it on main and on this branch alike, because touch adjustment moves the tap onto the remove button. That is separate from this change.

Scope

Components: useContainerReveal

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

#6865 also edits containerReveal.stylex.ts (default motion and delay). This change only touches the pointer keys, so either can land first with a small rebase.

Writing rubric results

Record changed: component:Thumbnail (FR5, AR6 and the removable-hover state row).

  • R1 narration: none. FR5 and AR6 state the reveal in the present tense.
  • R2 research: none.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives: none.
  • R5 pull request or issue references: none.
  • R6 open questions: none added.
  • R7 project status: none.

Testing

At 7cadc34, on macOS:

  • pnpm lint:strict: 0 errors. pnpm typecheck: pass. pnpm review:pre --base upstream/main: 0 findings, merges cleanly.
  • node scripts/release/changeset-coverage.mjs pr --base upstream/main --explain: pass, ships to @astryxdesign/core.
  • Browser contracts on the branch Storybook. Chromium (--project=chromium): the 25 specs a11y-pr-contracts.mjs --dry-run selects plus the specs for the hooks, Markdown and Thumbnail folders, including headingLinks.a11y.chromium.spec.ts (fine pointer hidden at rest, touch visible): 204 passed, 4 skipped (RTL cases the ListMarkers spec skips itself). WebKit (--project=webkit), the selected browser specs: 14 passed.
  • Vitest for hooks, Thumbnail, Markdown, and Lab ListInput and Comments: 2,710 passed.
  • Full pnpm test on Node 24.22.1 (the .nvmrc version): 43,360 passed, 72 failed. Rerun alone, 13 of the failing files pass (1,399 tests); they timed out while the machine was loaded. The other 9 files (30 tests) are CLI install, postinstall and vibe-test setup tests that fail on macOS (/var against /private/var, BSD cp without --reflink). They fail the same with main's containerReveal.stylex.ts swapped back in, and none of them tests this hook.
  • The visual baseline for the Reveal story is a fine-pointer capture with the actions hidden; this change paints it the same.

…ls on hover

The always-revealed branch keyed on any-pointer: coarse, which matches any
device with a touchscreen. It now keys on the coarse primary pointer, the
same query as Core's touch presentation, so phones and tablets stay revealed
and a mouse-driven touchscreen laptop follows hover and focus.

Fixes meta#7689
@vercel

vercel Bot commented Nov 11, 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 13, 2026 5:02am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 11, 2026
@astracat-bot

astracat-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 13, 2026, 5:40 AM UTC

@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge needs:design-review Affects visuals — Design should review labels Nov 11, 2026
@shashank03-dev
shashank03-dev marked this pull request as ready for review November 11, 2026 11:41

@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 waits on an engineering owner decision; there are no blocking code findings.

  • To settle: whether AST-094 FR13's primary-pointer rule governs useContainerReveal's always-revealed branch, or whether the Thumbnail spec's "always on touch devices" (FR5, AR6) keeps a finger on a touchscreen laptop always revealed; your emulation shows that, on such a laptop, a finger tap after mouse use no longer reveals Thumbnail's remove button.
  • Non-blocking: once that is settled, align the hook's docs ("always shows on touch" in useContainerReveal.ts and "stays visible on touch" in useContainerReveal.doc.mjs) with the ruling.

An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and you may do so yourself if you are an engineering owner. CI has not run on this head yet: a maintainer adds the ci:run label so it runs. Thanks for the red-first test and the clear before-and-after evidence.

Automated review (maintainer link)

…ws a coarse primary pointer

Thumbnail FR5 and AR6 and the hook's docs said "on touch". The reveal follows
spec:AST-094 FR13, so a touch presentation applies under a coarse primary
pointer: a touchscreen laptop used with a mouse reveals on hover, as this
pull request makes it.

Co-authored-by: shashank03-dev <[email protected]>
@github-actions github-actions Bot added 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.

Approval waits on an engineering owner decision, and two fixes are needed.

  • To settle: whether useContainerReveal's always-revealed branch follows the primary pointer (AST-094 FR13), with the Thumbnail spec's FR5 and AR6 rewritten to "under a coarse primary pointer" as the latest commit does, since no engineering owner has approved this head and a finger on a touchscreen laptop then no longer sees Thumbnail's remove button at rest.
  • Miss: Thumbnail's prop docs still say the remove button stays visible on any touch-capable device (showRemoveOn JSDoc in Thumbnail.tsx line 114, Thumbnail.doc.mjs lines 52 and 156), so say "under a coarse primary pointer (a phone or tablet)" there.
  • The description needs a ## Writing rubric results section for the Thumbnail spec change, which the knowledge-record rules require before review.

An engineering owner records the decision by commenting /approve-spec <full head SHA>, and you may do so yourself if you are an engineering owner. Non-blocking: the Reveal story hint and the hook's template block still say actions stay visible "on touch". CI has not run on this head yet: a maintainer adds the ci:run label so it runs.

Claims and files checked

Claims:

  • Changeset: content stays always visible only under a coarse primary pointer — verified (all 15 keys in containerReveal.stylex.ts; new test).
  • Changeset: a touchscreen laptop used with a mouse reveals on hover and keyboard focus — verified (hover and focus-within branches; emulated capture shows 0 of 6 actions at rest and 2 after hovering a row).
  • Changeset: previously any touchscreen kept Thumbnail remove buttons, heading links and row actions visible — verified (base keys; emulated base capture shows every control at rest).
  • Phones and tablets stay always revealed — verified (phone frames identical on base and head).
  • AST-094 FR13 puts touch presentations under a coarse primary pointer and accepts literal media keys — verified text; whether it covers this reveal is the open decision.
  • Core's touch query is (pointer: coarse) in utils/touchQueries.ts — verified.
  • The interaction-modality architecture treats hover as an enhancement for hover-capable pointers — verified text.
  • The hook's original contract promised content is never gated behind an unavailable hover — verified in the pull request that added the hook.
  • Fifteen keys across container, stateInactive and stateActive change, with one comment — verified.
  • No public API, prop, default or new style — verified (built API surfaces compared).
  • Hover, focus, inverted and forced-state branches are unchanged — verified.
  • The heading-links renderer's own coarse keys size the tap target and stay — verified.
  • The new test fails on main and passes here — verified (run on both).
  • Mouse-only laptop and phone are unchanged, and the Reveal story's fine-pointer baseline paints the same — verified (pixel-identical frames).
  • Emulated touchscreen-laptop counts before and after — consistent with this review's own emulation.
  • A finger tap after mouse use does not reveal the remove button, and touch adjustment can remove a thumbnail — not reproduced here; stated from the author's emulation.
  • The other pull request that edits the same file — outdated: it is closed.
  • Testing results — reported for the earlier head; the hook, Thumbnail, Markdown and TreeList suites pass on this head.

Files:

  • .changeset/container-reveal-hybrid-pointer.md — clear.
  • docs/specs/components/Thumbnail/Thumbnail.spec.md — needs an engineering owner's approval; rubric results missing.
  • packages/core/src/hooks/containerReveal.stylex.ts — code clear; behavior awaits the owner decision.
  • packages/core/src/hooks/useContainerReveal.doc.mjs — clear.
  • packages/core/src/hooks/useContainerReveal.test.tsx — clear.
  • packages/core/src/hooks/useContainerReveal.ts — clear; the Thumbnail prop docs it pairs with are not updated (finding above).

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec ad89f65

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 2026
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) 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: two small fixes remain now that an engineering owner has approved the primary-pointer reading and the Thumbnail spec rewrite.

  • Miss: Thumbnail's prop docs still say the remove button stays visible on any touch-capable device (showRemoveOn JSDoc in Thumbnail.tsx line 114, Thumbnail.doc.mjs lines 52 and 156), which this change makes false on a touchscreen laptop, so say "under a coarse primary pointer (a phone or tablet)" there.
  • The description needs a ## Writing rubric results section (R1–R7) for the Thumbnail spec change, which the knowledge-record rules require for any pull request that changes a record.

Non-blocking: the Reveal story hint and the hook's template block still say actions stay visible "on touch". CI has not run on this head yet: a maintainer adds the ci:run label so it runs.

Claims and files checked

Claims:

  • Changeset: revealed content stays always visible only under a coarse primary pointer — verified (all 15 keys in containerReveal.stylex.ts; new test).
  • Changeset: a touchscreen laptop used with a mouse or trackpad reveals on hover and keyboard focus — verified (emulated capture: 0 of 3 remove buttons at rest, hovering one reveals only its own; focus branches unchanged).
  • Changeset: previously any touchscreen kept remove buttons, heading links and row actions visible — verified (emulated base capture shows every control at rest).
  • Any-pointer matches a touchscreen even when the mouse is primary, and the fix keys on the primary pointer — verified (base and head keys).
  • The touch-presentations spec puts a touch presentation under a coarse primary pointer and accepts literal media keys — verified (record text).
  • Core's touch query is (pointer: coarse) in utils/touchQueries.ts — verified.
  • The interaction-modality architecture treats hover as an enhancement for hover-capable pointers — verified (record text).
  • The hook's original contract promised content is never gated behind an unavailable hover — verified (the pull request that added the hook).
  • Fifteen keys across container, stateInactive and stateActive change, with one comment — verified.
  • No public API, prop, default or new style — verified (built API surfaces compared).
  • Hover, focus, inverted and forced-state branches are unchanged — verified (diff).
  • The heading-links renderer's own coarse keys size the tap target and stay — verified (HeadingLinksRenderer.tsx lines 64, 81, 85).
  • Before the change a touchscreen laptop shows 6 of 6 row actions, 3 of 3 remove buttons and 12 of 12 heading links — verified in direction (this review counts 6, 3 and 21 in the same stories).
  • After the change none show at rest, and hover or keyboard focus reveals only that item — verified (0 of 6, 0 of 3, 0 of 21; hover reveals one thumbnail's button).
  • A finger tap reveals only when the finger is the first input — not reproduced here (the author's emulation).
  • A mouse-only laptop and a phone are unchanged, and the Reveal story's fine-pointer baseline paints the same — verified (pixel-identical frames).
  • The new test fails on main and passes here — verified (run on both).
  • Firefox and WebKit give the same counts — not reproduced here (Chromium only).
  • Another open pull request also edits the style file — verified that it edits the file; it is now closed.
  • Lint, typecheck, pre-review, changeset coverage, browser contracts and the full test run pass — not rerun; the hooks, Thumbnail, Markdown plugin and TreeList suites pass here.

Files:

  • .changeset/container-reveal-hybrid-pointer.md — clear.
  • docs/specs/components/Thumbnail/Thumbnail.spec.md — approved; Writing rubric results missing from the description.
  • packages/core/src/hooks/containerReveal.stylex.ts — clear.
  • packages/core/src/hooks/useContainerReveal.doc.mjs — clear.
  • packages/core/src/hooks/useContainerReveal.test.tsx — clear.
  • packages/core/src/hooks/useContainerReveal.ts — clear; Thumbnail's own prop docs (unchanged files) now contradict it.

Automated review (maintainer link)

…ry pointer

The showRemoveOn docs and the Reveal and heading links story hints said the
content stays visible on any touch device. It follows the coarse primary
pointer, so they now say a phone or tablet.
@shashank03-dev

Copy link
Copy Markdown
Contributor Author

Updated the showRemoveOn docs in Thumbnail.tsx and Thumbnail.doc.mjs to "under a coarse primary pointer (a phone or tablet)", and the Reveal and heading links story hints to match. Thanks for adding the rubric results.

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 96ddb64

@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 run on this head yet. An engineering owner has approved the primary-pointer reading and the Thumbnail spec rewrite for this exact head, and the Thumbnail prop docs and rubric results from the last review are fixed. Next step: a maintainer adds the ci:run label so CI runs.

  • Non-blocking: the shipped hook template block still says "On touch they stay visible" (packages/cli/assets/templates/blocks/components/Hooks/useContainerRevealHookUsage.tsx lines 67–68), where "On a phone or tablet" would match the new rule.
Claims and files checked

Claims:

  • Changeset: revealed content stays always visible only under a coarse primary pointer — verified (all 15 keys in containerReveal.stylex.ts; new test).
  • Changeset: a touchscreen laptop used with a mouse or trackpad reveals on hover and keyboard focus — verified (emulated capture: 0 of 6 row actions, 0 of 3 remove buttons and 0 of 21 heading links at rest; hovering one thumbnail reveals only its own; focus branches unchanged).
  • Changeset: previously any touchscreen kept remove buttons, heading links and row actions visible — verified (emulated base capture shows every control at rest).
  • Any-pointer matches a touchscreen even when the mouse is primary, and the fix keys on the primary pointer — verified (base and head keys; emulation).
  • Phones and tablets stay always revealed — verified (phone profile shows every control on base and head).
  • The touch-presentations spec puts a touch presentation under a coarse primary pointer and accepts literal media keys — verified (record text).
  • Core's touch query is (pointer: coarse) in utils/touchQueries.ts — verified (line 16).
  • The interaction-modality architecture treats hover as an enhancement for hover-capable pointers — verified (record text).
  • The hook's original contract promised content is never gated behind an unavailable hover — verified (the pull request that added the hook).
  • Fifteen keys across container, stateInactive and stateActive change, with one comment — verified.
  • No public API, prop, default or new style — verified (built API surfaces compared).
  • Hover, focus, inverted and forced-state branches are unchanged — verified (diff).
  • The heading-links renderer's own coarse keys size the tap target and stay — verified (HeadingLinksRenderer.tsx lines 64, 81, 85).
  • Before the change a touchscreen laptop shows 6 of 6 row actions, 3 of 3 remove buttons and 12 of 12 heading links — verified in direction (21 heading links counted in the same story).
  • After the change none show at rest, and hover or Tab reveals only that item — verified for hover; the keyboard path keeps its unchanged focus branches.
  • A finger tap reveals only when the finger is the first input, and a tap after mouse use does not reveal Thumbnail's button — not reproduced here (the author's emulation).
  • A mouse-only laptop and a phone are unchanged — verified (Thumbnail frames pixel-identical; the Reveal and Heading links frames differ only by the rewritten hint text).
  • The new test fails on main and passes here — verified (run on both).
  • Firefox and WebKit give the same counts — not reproduced here (Chromium only).
  • A finger tap on a thumbnail's middle removes it on main and here alike — not reproduced here; outside this change.
  • Another open pull request also edits the style file — verified that it did; it is now closed.
  • Writing rubric results for the Thumbnail record report nothing for R1–R7 — verified (record diff).
  • Lint, typecheck, pre-review, changeset coverage, browser contracts and the full test run pass — not rerun; the hooks, Thumbnail, Markdown plugin, TreeList, ListInput and Comments suites pass here.
  • The Reveal story's visual baseline paints the same — true for the earlier commit it names; at this head the story's hint wording changes, so that shot changes in its text.

Files:

  • .changeset/container-reveal-hybrid-pointer.md — clear.
  • apps/storybook/stories/MarkdownHeadingLinks.stories.tsx — clear.
  • apps/storybook/stories/UseContainerReveal.stories.tsx — clear.
  • docs/specs/components/Thumbnail/Thumbnail.spec.md — clear; approved for this head.
  • packages/core/src/Thumbnail/Thumbnail.doc.mjs — clear.
  • packages/core/src/Thumbnail/Thumbnail.tsx — clear.
  • packages/core/src/hooks/containerReveal.stylex.ts — clear.
  • packages/core/src/hooks/useContainerReveal.doc.mjs — clear.
  • packages/core/src/hooks/useContainerReveal.test.tsx — clear.
  • packages/core/src/hooks/useContainerReveal.ts — clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 8fd89f8

@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 waits on an engineering owner's ruling for the current commit; there are no blocking code findings. The only change since the last review is a merge of main that touches none of this pull request's files, but a new commit voids the earlier /approve-spec.

  • To settle: whether useContainerReveal's always-revealed branch follows the primary pointer (AST-094 FR13), so that a mouse on a touchscreen laptop sees Thumbnail's remove button, Markdown heading links and row actions hidden at rest until hover or keyboard focus. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request for the current commit; the author may do so if they are an engineering owner.
  • CI has not run on this commit yet; a maintainer adds the ci:run label so it runs.
  • Non-blocking: the shipped hook template block still says "On touch they stay visible" (packages/cli/assets/templates/blocks/components/Hooks/useContainerRevealHookUsage.tsx lines 67–68), where "On a phone or tablet" would match the new rule.
Claims and files checked

Claims:

  • Changeset: revealed content stays always visible only under a coarse primary pointer — verified (all 15 keys in containerReveal.stylex.ts; new test).
  • Changeset: a touchscreen laptop used with a mouse or trackpad reveals on hover and keyboard focus — verified (emulated capture: 0 of 6 row actions, 0 of 3 remove buttons and 0 of 21 heading links at rest; hovering one thumbnail reveals only its own; focus branches unchanged).
  • Changeset: previously any touchscreen kept remove buttons, heading links and row actions visible — verified (emulated base capture shows every control at rest).
  • Any-pointer matches a touchscreen even when the mouse is primary, and the fix keys on the primary pointer — verified (base and head keys; emulation).
  • Phones and tablets stay always revealed — verified (phone profile shows every control on base and head).
  • The touch-presentations spec puts a touch presentation under a coarse primary pointer and accepts literal media keys — verified (record text).
  • Core's touch query is (pointer: coarse) in utils/touchQueries.ts — verified (line 16).
  • The interaction-modality architecture treats hover as an enhancement for hover-capable pointers — verified (record text).
  • The hook's original contract promised content is never gated behind an unavailable hover — verified (the pull request that added the hook).
  • Fifteen keys across container, stateInactive and stateActive change, with one comment — verified.
  • No public API, prop, default or new style — verified (built API surfaces compared).
  • Hover, focus, inverted and forced-state branches are unchanged — verified (diff).
  • The heading-links renderer's own coarse keys size the tap target and stay — verified (HeadingLinksRenderer.tsx lines 64, 81, 85).
  • Before the change a touchscreen laptop shows 6 of 6 row actions, 3 of 3 remove buttons and 12 of 12 heading links — verified in direction (21 heading links counted in the same story).
  • After the change none show at rest, and hover or Tab reveals only that item — verified for hover; the keyboard path keeps its unchanged focus branches.
  • A finger tap reveals only when the finger is the first input, and a tap after mouse use does not reveal Thumbnail's button — not reproduced here (the author's emulation).
  • A mouse-only laptop and a phone are unchanged — verified (Thumbnail frames pixel-identical; the Reveal and Heading links frames differ only by the rewritten hint text).
  • The new test fails on main and passes here — verified (fails on the base, passes at this commit with the hook, Thumbnail, Markdown plugin and TreeList suites).
  • Firefox and WebKit give the same counts — not reproduced here (Chromium only).
  • A finger tap on a thumbnail's middle removes it on main and here alike — not reproduced here; outside this change.
  • Another open pull request also edits the style file — verified that it did; it is now closed.
  • Writing rubric results for the Thumbnail record report nothing for R1–R7 — verified (record diff).
  • Lint, typecheck, pre-review, changeset coverage, browser contracts and the full test run pass — not rerun; the suites named above pass here.
  • The Reveal story's visual baseline paints the same — true for the earlier commit it names; the rewritten story hint changes that shot in its text.

Files:

  • .changeset/container-reveal-hybrid-pointer.md — clear.
  • apps/storybook/stories/MarkdownHeadingLinks.stories.tsx — clear.
  • apps/storybook/stories/UseContainerReveal.stories.tsx — clear.
  • docs/specs/components/Thumbnail/Thumbnail.spec.md — clear; spec approval carries to this commit.
  • packages/core/src/Thumbnail/Thumbnail.doc.mjs — clear.
  • packages/core/src/Thumbnail/Thumbnail.tsx — clear.
  • packages/core/src/hooks/containerReveal.stylex.ts — clear; the desktop ruling waits on an engineering owner for this commit.
  • packages/core/src/hooks/useContainerReveal.doc.mjs — clear.
  • packages/core/src/hooks/useContainerReveal.test.tsx — clear.
  • packages/core/src/hooks/useContainerReveal.ts — clear.

Automated review (maintainer link)

@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 run on this head yet; a maintainer adds the ci:run label so CI runs.

An engineering owner's ruling for this exact commit settles the primary-pointer reading of the touch rule and the Thumbnail spec rewrite, and there are no blocking findings. On a touchscreen laptop driven by a mouse, hook-revealed controls now hide at rest and reveal on hover and keyboard focus, while phones and tablets keep them visible.

  • Non-blocking: Lab ListInput's docs still say Remove and the reorder handle "stay visible on touch screens" (ListInput.doc.mjs lines 98, 215 and 221), and the hook's template block still says "On touch they stay visible"; "under a coarse primary pointer (a phone or tablet)" would match the new rule.
Claims and files checked

Claims:

  • The hook keeps revealed content always visible only under a coarse primary pointer (changeset): verified, all 15 always-revealed keys now read (pointer: coarse) and the new test pins them.
  • A touchscreen laptop used with a mouse now reveals on hover and keyboard focus (changeset): verified in an emulated touchscreen-laptop capture, nothing shows at rest, hovering one thumbnail shows only its button, and the focus-within branch is unchanged.
  • Before, any touchscreen kept the Thumbnail remove button, heading links and row actions visible at rest (changeset): verified on the base, 3 of 3, 21 of 21 and 6 of 6 at rest.
  • The old branch matched any coarse input, so a touchscreen matched even with a mouse as the primary pointer: verified, the base keys on any-pointer: coarse.
  • Core's touch query is (pointer: coarse): verified in the touch-query utility.
  • The touch rule applies under a coarse primary pointer, and a literal touch media query conforms: verified against the touch-presentation spec.
  • Hover is an enhancement for hover-capable pointers: verified against the interaction-modality architecture.
  • The hook's original contract says content is never gated behind an unavailable hover: verified in the pull request that introduced the hook.
  • Fifteen keys across three style blocks change and one comment says why: verified in the diff.
  • No public API, prop, default or new style, and the hover, focus, inverted and forced-state branches are unchanged: verified, the API generator lists no change and the diff touches only the pointer keys.
  • The heading-links renderer's own any-pointer keys size the tap target, not the reveal: verified, they set the coarse target size only.
  • A touchscreen laptop shows every control at rest before the change and none after: verified in substance; this review counts 21 heading links where the description says 12.
  • Hovering or tabbing into one item shows only that item's controls: verified for hover; the focus path is unchanged.
  • A finger tap reveals an item's controls when the finger is the first input: not reproduced, the emulation cannot model which input came first.
  • A mouse-only laptop and a phone behave the same before and after: verified, the frames differ only in the story hint text.
  • The regression test fails on main and passes here: verified by running it on both.
  • Dialog's touch presentation already keys on the primary pointer: verified.
  • The Thumbnail record's FR5, hover state row and AR6 change, with writing-rubric results in the description: verified.
  • Lint, typecheck and targeted tests pass: verified for lint on the changed files, Core's typecheck, and 2,916 tests across the hook, Thumbnail, Markdown, TreeList and the two Lab consumers.
  • The Reveal story's visual baseline paints the same: holds for the earlier commit it names; the story hint text has changed since (non-blocking).

Files:

  • .changeset/container-reveal-hybrid-pointer.md: clear
  • apps/storybook/stories/MarkdownHeadingLinks.stories.tsx: clear
  • apps/storybook/stories/UseContainerReveal.stories.tsx: clear (visual-baseline note)
  • docs/specs/components/Thumbnail/Thumbnail.spec.md: clear (owner-approved)
  • packages/core/src/Thumbnail/Thumbnail.doc.mjs: clear
  • packages/core/src/Thumbnail/Thumbnail.tsx: clear
  • packages/core/src/hooks/containerReveal.stylex.ts: clear
  • packages/core/src/hooks/useContainerReveal.doc.mjs: clear
  • packages/core/src/hooks/useContainerReveal.test.tsx: clear
  • packages/core/src/hooks/useContainerReveal.ts: clear

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as draft November 13, 2026 07:54
@cixzhang
cixzhang marked this pull request as ready for review November 13, 2026 07:54
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 8fd89f8

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
lab/CommentThread 360.3 kB (+3 B) · 2.4 kB CSS (0) — — · — · —
Markdown 195.4 kB (+8 B) · 21.0 kB CSS (−7 B) — — · — · —
lab/Comments 367.4 kB (0) · 2.5 kB CSS (0) — — · — · —
2 more components
Component Size LoC Visual · A11y · RTL
lab/ListInput 92.9 kB (0) · 922 B CSS (0) — — · — · —
Thumbnail · Storybook 68.8 kB (+3 B) · 11.9 kB CSS (−6 B) 370 (0) — · — · —

Package size: @astryxdesign/core 7.49 MB packed (+217 B); no new dependencies.

Wide change (shared styles: packages/core/src/hooks/containerReveal.stylex.ts): add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.


Generated by PR Enrichment workflow | View full report

This branch was successfully deployed

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

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team) needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] useContainerReveal is always revealed on touchscreen laptops used with a mouse (any-pointer: coarse)

3 participants