Skip to content

feat(AlertDialog): short actions share a row on compact touch screens - #8095

Draft
vjeux wants to merge 12 commits into
meta:mainfrom
vjeux:uikit/c18-alerts-pr3
Draft

vjeux wants to merge 12 commits into
meta:mainfrom
vjeux:uikit/c18-alerts-pr3

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

User need

On a phone, AlertDialog stacks its two buttons at full width, so "Cancel" and "Delete" take two rows. An iOS alert puts two short actions in one row.

Problem and solution fit

  1. Under a finger on a compact screen, two actions whose labels each fit half of the row share it in equal halves, Cancel leading.
  2. A label too long for its half stacks them, the destructive action above Cancel. On a landscape phone or a small tablet this replaces the trailing row.
  3. A rotation, a zoom, a web font that finishes loading or a label change decides again. An alert mounted closed decides when it opens.
  4. With a mouse nothing changes: the actions stack at 640 px and below.

Current specification

The spec owner's decision of 2026-11-04: component:AlertDialog DEC-5, with FR3 and PR1. The rule is per label, never the sum (alertController.actions.rowShare, measured on iOS 26.2). spec:AST-012 FR9 defines a compact window.

Public delta and caller burden

No API change and no caller decision. Visual, DOM and tab order agree in every layout, and Cancel keeps initial focus. The row is Astryx Buttons on the footer's gap token.

Design and alternatives

CSS flex-wrap wraps on the sum of both widths and keeps DOM order, so Cancel would land on top. A container query can't see each label. So a hook measures each label against half of the row, once when the alert is shown, before its first frame. It watches the title, whose size the actions never change. A decision that a title resize starts waits for the next frame, so it starts no resize observer loop.

Evidence

Scope

Components: AlertDialog

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

Local gates at 7fb15d3, on main 3e58ae0. 14afa4d adds only a two-line SYNC reminder to the hook's header. The units, the builds and the motion spec ran at 595ccb7, five layout-spec lines earlier:

  • The hook's unit tests, AlertDialog.test.tsx, the UIKit constants and the group tracker's tests: 465 passed.
  • The layout and motion specs: 36 passed in Chromium. In WebKit, in CI's container profile, 33 passed and 3 Chromium-only cases were skipped.
  • The layout spec again at 7fb15d3: 17 passed in each engine.
  • The first-open case passes 5 of 5 in each engine. It reads the row's width once before the first paint, and no resize observer loop is reported.
  • AlertDialog's accessibility spec: 5 passed.
  • The build, Storybook, both typechecks, strict ESLint and Prettier on the changed files, the comment-provenance check and check:knowledge pass.
  • Red first, for the measurement: 372d4e1's hook reads the row twice on a first open. The new unit case fails there, and the browser case fails 3 of 3 in each engine.
  • Red first, for the row, on main's AlertDialog.tsx under these tests: 94ee38c, a fork branch not for landing. There, 2 of 55 AlertDialog.test.tsx cases fail: the row and a label change. 11 of the layout spec's 17 cases fail.
  • The first rebuild, b56ebdd, reported a resize observer loop on the first open, 3 of 3 times in each engine; main reports none.

At 8df0838, which merges main 248e91d and ports the judge change onto main's busyMotionJudge.ts:

  • busyMotionJudge.test.ts passes 5 of 5. Its new case fails on main's judge: a frame whose pixels change while their mean luma barely moves.
  • The busy-main-thread case passes 20 of 20 in Chromium.
  • The units (470), the layout and motion specs (Chromium 36, WebKit 33 plus 3 skipped) and the accessibility spec (5) pass.
  • Both typechecks, strict ESLint, Prettier, the comment-provenance check, check:knowledge and check:sync pass.

At e1dd5d3, which merges main 4a8df8b, where the title became a plain <h2> with its own theme target:

  • The units (470), the layout and motion specs (Chromium 36, WebKit 33 plus 3 skipped) and the accessibility spec (5) pass.
  • The first-open case passes 5 of 5 in each engine, with the hook watching the new <h2>.
  • Both typechecks, strict ESLint, Prettier, the comment-provenance check, check:knowledge and check:sync pass.
  • Five theme-edit tests in packages/cli, in two files, fail. They fail the same way on main 4a8df8b on the same machine, which draws none of their preview pictures.
  • In a first run on the loaded machine, six more timed out; all six passed in four later runs here and on main.

At c0cb7a2, which merges main 47faabe, this pull request's own changes differ only in a comment in the busy proof's test helper. Main's changes in that merge reach no code AlertDialog renders. Its gates pass as at e1dd5d3, and the busy case passes 20 of 20 in Chromium.

At 97dae91, which merges main 20a222d, this pull request's own diff is unchanged. Main's changes include Dialog.tsx, which AlertDialog imports directly: an autofocus request now belongs to its nearest dialog. That is a runtime change, so the device comparison was taken again.

  • The units (632), Dialog's own included, and the accessibility spec (5) pass.
  • The layout and motion specs pass: Chromium 36, WebKit 33 plus 3 skipped. The busy case passes 20 of 20, and the first-open case 5 of 5 in each engine.
  • Both typechecks, strict ESLint, Prettier, the comment-provenance check, check:knowledge and check:sync pass.

At 685d7be, which adds d929eee and merges main d1d6bd1:

  • d929eee changes only the turn-back proof's driving. Under load, its 100 ms close could land after the theme's 400 ms entrance, and WebKit could paint no frame of its 125 ms exit.
  • The proof now sets a 2000 ms entrance and a 1200 ms exit, as the other close proofs do. Its claim and its bounds are unchanged.
  • Four WebKit workers on four CPUs fail the old proof in 37 of 40 runs at 97dae91, and 40 of 40 on main 20a222d. The new proof passes 40 of 40 under that load.
  • Main's changes in the merge reach AlertDialog only through two files three imports away: a mouse-only pointer fix and a font-weight type widening. The pointer fix is in the gesture system, so the device comparison was taken again.
  • The units (632), the layout and motion specs (Chromium 36, WebKit 33 plus 3 skipped) and the accessibility spec (5) pass. The busy case passes 20 of 20 in Chromium, and the first-open case 5 of 5 in each engine.
  • Both typechecks, strict ESLint, Prettier, the comment-provenance check, check:knowledge and check:sync pass.

At eed836a, which merges main 8c52e3b, this pull request's own diff is unchanged.

  • That merge changes Button/Button.tsx, which AlertDialog imports directly, so the device comparison was taken again.
  • In Button.tsx, primary and destructive buttons now pass their color pair to their content through two private variables.
  • The units (876), Button's own included, the layout and motion specs (Chromium 36, WebKit 33 plus 3 skipped) and the accessibility spec (5) pass.
  • The turn-back proof passes 40 of 40 under load and 20 of 20 at one worker in WebKit. The busy case passes 20 of 20 in Chromium, and the first-open case 5 of 5 in each engine.
  • Both typechecks, strict ESLint, Prettier, the comment-provenance check, check:knowledge and check:sync pass.

At f55122d, which merges main 8554b67, this pull request's own diff is unchanged.

  • Two files that AlertDialog and its test import directly change only in comments. Their compiled output is identical.
  • AlertDialog's code reaches one other change: the dark theme's secondary text color. The comparison below was taken again at this head.
  • The units (916), Heading's and the group press tracker's own included, pass.
  • Both typechecks, strict ESLint, Prettier, the comment-provenance check, check:knowledge and check:sync pass.

A same-device comparison of f55122d with 8226b5e, the builds interleaved, with each take's build version read on the device:

  • Physical iPhone 14, iOS 26.2, Safari: six stories have the same layout and button boxes on both builds. That holds in portrait, landscape and back.
  • The delete, custom cancel label and desktop fine-pointer stories are rows. The long-content, mobile-touch and narrow fine-pointer stories are stacks.
  • On the iPhone each state's buttons are read from the accessibility tree. Its rotations were not checked frame by frame.
  • Android 17 emulator, Chrome 145, coarse pointer, Storybook builds of both heads: the same six stories have identical layouts and boxes. That holds in portrait, landscape and back.
  • Each Android take records at least 3.8 s past each rotation command. The page logs the buttons' box and the viewport width on every animation frame.
  • In every take, that log changes exactly once per rotation, 164–275 ms after the command, then holds still for at least 3.6 s. In the desktop fine-pointer story only the width changes; its box stays where it was.
  • On screen, each rotation is one burst of 5 to 17 frames on both builds, then a fainter tail of at most 0.21 s. So neither build shows a two-step layout.
  • In one base take, the recording has no frame for 0.26 s mid-turn. The next frame shows the turn's end, and the turn counts as one burst of 11 frames.
  • Across all 24 rotations, no frame changes between the tail and the end marker.
  • Below the browser's address bar, each Android screenshot pair matches within 3 of 255 per channel, so the button colors match too.

What changed from 8226b5e, the last head on #8084:

  • AlertDialog.tsx keeps main's 320 px phone width and its group pointers, and adds the row beside them.
  • alert.ts gains rowShare in main's slimmer table.
  • The record takes FR3, PR1 and DEC-5 as approved. DEC-5 keeps its number; main's record has DEC-1 to DEC-3.
  • The docs, the test file and the stories change only their layout lines. Main's touch-tracking wording stays.
  • The hook's timing, for the owners: it decides right after the alert opens, before its first frame. A rotation or a zoom now lands one frame later than at 8226b5e.
    • This avoids a resize observer loop report. On main the group tracker watches the actions row, and the old hook laid the row out inside the title's resize callback.
    • The layout rule and the approved FR3, PR1 and DEC-5 text are unchanged, and so is each open's first frame.
  • The decision measures the row once per open: committing it no longer runs the open-time check again (7fb15d3).
  • The hook's title ref sits on main's new title <h2> (e1dd5d3).
  • The turn-back proof sets a long entrance and exit, so it still closes mid-presentation and sees the fade on a loaded engine (d929eee).
  • The record's Ownership boundary says why no shared engine fits the layout hook: useOverflow sums the items' widths and measures hidden copies.
  • The busy-main-thread proof's judge is now main's busyMotionJudge.ts. It counts a frame as changed by the mean absolute change of the region's pixels, not by their mean's change. A shorter alert's mean luminance can stand still while its content moves. Main's 0.005 cut stays: a repeated frame reads 0 exactly.

Writing rubric results

component:AlertDialog: FR3 states the compact touch layout, with visual, DOM and tab order together and Cancel's initial focus in every layout. PR1 adds the title observation and the web-font listener. DEC-5 records the decision and the rejected alternative. The Behavior row and the FR1–FR5 verification row name the layout and its tests. The Compatibility bullet adds FR3, on a landscape phone or a small tablet. The Ownership boundary names useAlertActionLayout.ts and why no shared engine fits it (architecture:react-component-runtime INV19).

  • R1 narration, R2 research, R4 rejected alternatives, R5 change references: none in the record.
  • R3 evidence: the per-label rule's source is alertController.actions.rowShare (measured, iOS 26.2); the decision's is DEC-5.
  • R6 open questions: none.

@vercel

vercel Bot commented Oct 24, 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 19, 2026 6:37am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 19, 2026, 6:39 AM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 24, 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 owner decision: the compact two-action row (Cancel leading while each label fits half the row) and the narrower-than-744 px or shorter-than-500 px compact condition have no governing spec yet, because draft component:AlertDialog FR3 still stacks the action above Cancel on small screens and draft AST-094's FR1–FR23 are unapproved. An engineering owner needs to provide or identify that rule (for example the FR3 amendment in the description) and approve or reject AST-094, then record the decision by commenting /approve-spec 5a2e10f269b1c79e5a9c4422c080991b1fed9b82 on this pull request; the author may do so as an engineering owner. Two fixes are needed whatever is decided:

  • The first open of a mounted dialog on a compact viewport paints one stacked frame (188 px tall) before the row (148 px) in useAlertActionLayout.ts L80–115; decide the layout before that frame paints and add a first-frame test.
  • The PR also carries its 24 predecessor commits (#8052–#8084); retarget it after they land so it contains only the AlertDialog commit.

[Automated review]

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@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 decision: the compact two-action row and its 744 px / 500 px condition have no governing spec, contradict the draft AlertDialog FR3, and arrive with the unapproved draft AST-094 (FR1–FR23). Any engineering owner, the author included, can record that decision by commenting /approve-spec 89bac54ae97a8fae47160d28972519a8c5263d7e on this pull request. Whatever the decision, two changes are still needed:

  • The first open of a compact alert paints one stacked frame before the row (useAlertActionLayout.ts L80–107), so settle the layout before the opening frame paints and add a first-frame test.
  • The diff carries the whole stack (27,161 authored lines) for a 624-line change, so retarget onto #8084 or rebase once it and its predecessors land.

[Automated review]

@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 decision: the compact two-action row and its 744 px / 500 px condition have no governing spec, contradict the draft AlertDialog FR3, and arrive with the unapproved draft AST-094 (FR1–FR23). Any engineering owner, the author included, can record that decision by commenting /approve-spec 7fcc382ceb97adae5e5ea2fd6eb73dd439537bab on this pull request. Whatever the decision, two changes are still needed:

  • The first open of a compact alert paints one stacked frame before the row (useAlertActionLayout.ts L80–115), so settle the layout before the opening frame paints and add a first-frame test.
  • The diff carries the whole stack (28,139 authored lines) for a 624-line change, so retarget onto #8084 or rebase once it and its predecessors land.

[Automated review]

cixzhang added a commit that referenced this pull request Oct 24, 2026
… platform (#8274)

## Exact decision needed

What "compact" means when a component picks a presentation by screen size, and whether it differs by platform.

## Existing authority searched

- `spec:AST-012` FR1–FR2: width points (`md` is 768) and a closed `when` vocabulary with no height field.
- `architecture:public-component-api` INV14 and change coupling: components keep no parallel hardcoded breakpoint table.
- `component:Selector` FR4: `adaptive` uses the sheet on "compact coarse-pointer screens", with no number.
- `design:mobile-typography` DR3 uses `(width < 1024px) and (pointer: coarse)` for text sizing, a separate concern this PR leaves alone.
- No current record defines compact. Code uses `(max-width: 768px) and (pointer: coarse)`.
- Search terms: compact, 744, 768, height 500, size class, adaptive, coarse pointer, breakpoint. Overlapping open pull requests: #8062 (shared touch resolver and its compact query), #8052 (AST-094 resolver), #8015 (NumberInput steppers on coarse pointers; not a size test), #6817 (compact density, a different meaning), #8089, #8104, #8095 (phone presentations that consume the resolver).

## Decision

- `spec:AST-012` FR9 / DEC-6: a screen is compact while its width is below the effective `md` point or its height is below 500, with the same numbers on every platform (CSS px on the web, pt on iOS, dp on Android); native does not map compact to platform size classes. The theme exports this one definition; the web touch presentation resolver, Selector's `adaptive` presentation, and `@astryxdesign/native` all use it.
- `spec:AST-012` FR2: `when` gains `height`, accepting only `{below: 500}`.
- `architecture:public-component-api` INV17: a component that chooses a presentation by screen size uses that definition and keeps no numbers of its own.
- `spec:AST-082` FR18: `PortableTheme` carries the compact definition, so native reads the same numbers; FR11 and `spec:AST-093` FR3: a native choice between presentations by screen size uses it, not size classes, while the platform's own control still presents the surface.
- Compact governs presentation choice only; a layout width a caller picks, such as AppShell's `mobileNav.breakpoint`, is not compact.
- `component:Selector` records the `adaptive` edge change as pending and compatible under `spec:AST-017` FR1.

## Rejected alternatives

- Mapping compact to each platform's size classes: the same screen would be compact on one platform and not another.

## Claim scope and non-goals

The compact definition and the height condition only. Text sizing under `design:mobile-typography`, which surfaces adopt a touch presentation, and resolver code are outside this PR.

## Evidence and implementation relationship

The touch presentation resolver contract lives only in the open `spec:AST-094` revision (#8052), which this PR does not edit; it must use FR9. Native adopts FR9 when it gains a compact resolver. Behavior delta when the code conforms: a coarse-pointer screen exactly 768 wide and at least 500 tall opens the popover, and a landscape phone wider than 768 but under 500 tall opens the bottom sheet. Code follow-up belongs to separate implementation PRs. INV16 is the caller-control invariant from #8273 (merged); this PR adds INV17. No implementation is included.

## Writing rubric results

- R1 narration: none.
- R2 research in the record: none.
- R3 evidence naming a change: none; verification names edge states.
- R4 rejected alternatives over one line or outside a decision: one, inside DEC-6, one line.
- R5 pull request or issue references remaining: none added.
- R6 ruled open questions still listing options: none.

## Scope

- [x] This PR contains specification records only.
- [x] It records observable behavior and preserves equivalent internal implementations.
- [x] Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
- [x] Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
- [x] It records one intentional durable decision, not a rescue for a separable tagalong.
- [x] The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
- [x] Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
- [x] Public text and artifacts contain no internal Meta context.

## Validation

- `pnpm check:knowledge` (CI lint)
- Prettier
- `git diff --check`
@vjeux
vjeux force-pushed the uikit/c18-alerts-pr3 branch from 7fcc382 to 1a2438d Compare October 24, 2026 21:29
@vjeux vjeux changed the title fix(AlertDialog): on a phone two short actions share a row, Cancel leading, as iOS's do fix(AlertDialog): on iPhone and iPad two short actions share a row, Cancel leading, as iOS's do Oct 24, 2026
@vjeux
vjeux force-pushed the uikit/c18-alerts-pr3 branch from 1a2438d to a243866 Compare October 24, 2026 22:07
@vjeux

vjeux commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Addressed at a243866:

  • The first open paints the decided layout: the resize observer commits it between layout and paint, with a first-frame browser case in Chromium and WebKit (failed before the fix).

Waiting in the reviewers' queue: the spec decision on the compact row and its 744 px / 500 px condition (the FR3 amendment in the description). This pull request carries its stack until it lands; review the last commit.

@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 decision. The iOS compact two-action row has no governing spec (the draft AlertDialog FR3 still stacks on small screens), and the draft AST-094 (FR1–FR23) is unapproved. Its 744 px compact condition and the alert's reduced-motion spring fade contradict the current AST-012 FR9 and reduced-motion DR2 and DR4, so either an owner updates those specs or the code conforms to them. Any engineering owner, the author included, can record that decision by commenting /approve-spec a243866944f89a0aa16501b83b06d6c8deac1402 on this pull request. Whatever the decision, these still need changes:

  • The first compact open on iOS raises a "ResizeObserver loop completed with undelivered notifications" error because the observer's callback resizes the row it observes, and re-deciding while open logs three React flushSync errors (useAlertActionLayout.ts L105–129).
  • The docs and changeset say clicks, keys and assistive technology are ignored during both transitions, but while the alert appears only touches are.
  • The diff carries the whole stack (32,443 authored lines) for a 775-line change; retarget onto #8084, or rebase once the stack lands.

[Automated review]

@vjeux
vjeux force-pushed the uikit/c18-alerts-pr3 branch from a243866 to aa32c53 Compare October 24, 2026 23:30
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 24, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 14afa4d

@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. The compact touch row follows this head's owner-approved AlertDialog record, the first open now measures the action row once before it paints, and the layout hook is under the shared-engine size threshold. Next, mark the pull request ready for review, and a maintainer adds the ci:run label so CI runs.

  • Non-blocking: the record's Design relationships row for the action button still says it is "stacked above Cancel on small screens", while under a finger on a compact window two short actions now sit side by side (FR3).
Claims and files checked

Review mode: full; reason: spec-record

  • Claims:
    • Under a finger on a compact screen, two actions whose labels each fit half of the row share it in equal halves, Cancel leading: verified (layout spec at 320 and 390 px; base and head frames).
    • A label too long for its half stacks them, the action above Cancel, and on a landscape phone or a small tablet this replaces the trailing row: verified (layout spec; landscape phone and 744 px tablet frames).
    • A rotation, a zoom, a web-font load or a label change decides again, and an alert mounted closed decides when it opens: verified (unit tests; the large-text, zoom, label-change, mounted-closed and viewport cases).
    • With a mouse nothing changes, and the actions stack at 640 px and below: verified (pixel-identical fine-pointer frames; both mouse cases).
    • The rule is per label, never the sum: verified in the code and unit tests; the measured iOS source behind the threshold was not checked.
    • No API change and no caller decision: verified (the API surface generator lists no rows).
    • Visual, DOM and tab order agree in every layout, and Cancel keeps initial focus: verified (unit tests).
    • The row is the library's buttons on the footer's gap token: verified (source).
    • The hook decides once when the alert is shown, before its first frame, watches only the title, and defers a resize-started decision a frame with no observer loop: verified (row-read probe, first-open case, unit tests, no page errors).
    • The decision measures the row once per open: verified (row-read probe; unit case).
    • The record takes FR3, PR1 and DEC-5 with the spec owner's approval: verified (spec approval at this exact head).
    • The record says why no shared engine fits the hook: verified (the overflow hook measures hidden copies and fits items by their sum).
    • The busy-main-thread proof counts per-pixel change: verified (motion spec; lossless frames; passes).
    • Local gates: verified here for 137 unit tests, the package and Storybook builds, 17 layout and 30 motion and tracking cases in Chromium, the core typecheck, lint on the changed files, and the changeset and knowledge checks; WebKit, Prettier, the accessibility spec and the comment-provenance check were not run.
    • Red-first runs, screenshots and the owner's real-phone check at earlier heads: not checked (they describe other revisions).
    • Changeset: a shared row when each label fits, a stack as before on a portrait phone and new on a landscape phone or small tablet, Cancel on the right in right to left, and no change with a mouse: verified.
  • Files:
    • .changeset/alertdialog-compact-action-row.md: clear.
    • apps/storybook/stories/AlertDialog.stories.tsx: clear.
    • docs/specs/components/AlertDialog/AlertDialog.spec.md: non-blocking note (Design relationships row).
    • packages/core/src/AlertDialog/AlertDialog.doc.mjs: clear.
    • packages/core/src/AlertDialog/AlertDialog.test.tsx: clear.
    • packages/core/src/AlertDialog/AlertDialog.tsx: clear.
    • packages/core/src/AlertDialog/__tests__/AlertDialog.layout.interaction.browser.spec.ts: clear.
    • packages/core/src/AlertDialog/__tests__/AlertDialog.motion.interaction.browser.spec.ts: clear.
    • packages/core/src/AlertDialog/useAlertActionLayout.test.tsx: clear.
    • packages/core/src/AlertDialog/useAlertActionLayout.ts: clear.
    • packages/core/src/motion/uikit/alert.ts: clear.

Automated review (maintainer link)

The busy-main-thread proof now counts a frame as motion by the mean
absolute change of the alert region's pixels, not by the change of their
mean luma, which text crossing the region's edge can cancel. A repeated
frame still reads 0 exactly, so the 0.005 cut stays.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 8df0838

@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. The compact touch row follows this head's owner-approved AlertDialog record, the first open paints the decided layout after one measurement, and a mouse renders exactly as before. Next, mark the pull request ready for review, and a maintainer adds the ci:run label so CI runs.

  • Non-blocking: the record's Design relationships row for the action button still says only "stacked above Cancel on small screens", while under a finger on a compact window two short actions now sit side by side (FR3).
Claims and files checked

Review mode: full; reason: merge-touches-pr-files

  • Claims:
    • Under a finger on a compact screen, two short labels share the row in equal halves, Cancel leading: verified (layout browser spec at 320 and 390 px; frames at 390 × 844, 844 × 390 and 744 × 1133).
    • A label too long for its half stacks them, the destructive action above Cancel, and on a landscape phone or a small tablet this replaces the trailing row: verified (layout spec; the long-label frame matches the base; landscape and tablet frames).
    • A rotation, a zoom, a web-font load or a label change decides again, and an alert mounted closed decides when it opens: verified (unit tests; the large-text, zoom, label-change, mounted-closed and leaving-compact browser cases).
    • With a mouse nothing changes, and the actions stack at 640 px and below: verified (pixel-identical mouse frame; both mouse browser cases).
    • The spec owner's decision governs the change through FR3, PR1 and DEC-5: verified (spec approval at this exact head).
    • The rule is per label, never the sum, from a measured iOS constant: verified in the code and unit tests; the iOS measurement itself was not checked.
    • The theme's compact definition decides compact: verified (768 px wide or 500 px tall by default, read from the theme).
    • No API change and no caller decision: verified (the API surface generator lists no rows).
    • Visual, DOM and tab order agree in every layout, and Cancel keeps initial focus: verified (unit tests; right-to-left and DOM-order frames).
    • The row is the library's buttons on the footer's gap token: verified (source).
    • The hook measures each label against half of the row once when the alert is shown, before its first frame, watches only the title, and defers a resize-started decision a frame with no observer loop: verified (first-frame probe: equal button tops, one row read, no page errors; unit tests).
    • The change builds on main and applies to the landed touch motion: verified (history).
    • Screenshots and the owner's real-phone check at earlier revisions, and a later same-device comparison: not checked (other revisions; device evidence stays with maintainers).
    • Local gates at earlier revisions: not checked as stated; re-run here at this head: 142 unit tests, 17 layout, 19 motion and 5 accessibility browser cases in Chromium, the core typecheck, Prettier and ESLint on the changed files, the comment-provenance baseline and the knowledge check pass; WebKit was not run.
    • The 320 px phone width and the group pointers stay, rowShare joins the constants table, and the record takes FR3, PR1 and DEC-5 with DEC-5 keeping its number: verified.
    • The docs, the unit test file and the stories change only their layout lines, and the touch-tracking wording stays: verified.
    • The decision lands right after the alert opens, before its first frame, and a rotation or zoom one frame later: verified in the code.
    • The row is measured once per open: verified (probe; unit case).
    • The record says why no shared engine fits the layout hook: verified.
    • The busy-main-thread proof counts per-pixel change instead of the change of the mean: verified (code; unit tests; the busy browser case passes).
    • Writing rubric results for FR3, PR1, DEC-5, the Behavior and verification rows, the Compatibility bullet, the Ownership boundary and no open questions: verified; the Design relationships row is the non-blocking note above.
    • Changeset: a shared row in equal halves when each label fits, the stack as before on a portrait phone and new on a landscape phone or small tablet, Cancel on the right in right to left, and no change with a mouse: verified.
  • Files:
    • .changeset/alertdialog-compact-action-row.md: clear.
    • apps/storybook/stories/AlertDialog.stories.tsx: clear.
    • docs/specs/components/AlertDialog/AlertDialog.spec.md: non-blocking note (Design relationships row).
    • packages/core/src/AlertDialog/AlertDialog.doc.mjs: clear.
    • packages/core/src/AlertDialog/AlertDialog.test.tsx: clear.
    • packages/core/src/AlertDialog/AlertDialog.tsx: clear.
    • packages/core/src/AlertDialog/__tests__/AlertDialog.layout.interaction.browser.spec.ts: clear.
    • packages/core/src/AlertDialog/__tests__/AlertDialog.motion.interaction.browser.spec.ts: clear.
    • packages/core/src/AlertDialog/__tests__/busyMotionJudge.test.ts: clear.
    • packages/core/src/AlertDialog/__tests__/busyMotionJudge.ts: clear.
    • packages/core/src/AlertDialog/useAlertActionLayout.test.tsx: clear.
    • packages/core/src/AlertDialog/useAlertActionLayout.ts: clear.
    • packages/core/src/motion/uikit/alert.ts: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec e1dd5d3

@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. The compact touch row follows the AlertDialog record edits an engineering owner approved for this head, its unit, layout, motion and accessibility tests pass here, and a mouse renders exactly as before. Next, mark the pull request ready for review, and a maintainer adds the ci:run label so CI runs.

  • Non-blocking: the record's Design relationships row for the action button still says only "stacked above Cancel on small screens", while under a finger on a compact window two short actions now share a row (FR3).
Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • Release note: under a finger on a compact screen (the theme's compact definition), two actions share a row in equal halves, Cancel leading, when each label fits its half: verified (the hook's rule, unit tests, layout browser spec, portrait frames).
  • Release note: otherwise they stack, the action above Cancel, as before on a portrait phone and new on a landscape phone or small tablet: verified (landscape and 744 px tablet frames, layout spec).
  • Release note: right to left, Cancel leads on the right: verified (right-to-left frame, layout spec).
  • Release note and description: with a mouse nothing changes, the actions stack at 640 px and below: verified (mouse frame identical to the base, mouse unit and browser cases).
  • Description: a rotation, zoom, web-font load or label change decides again, and an alert mounted closed decides when it opens: verified (unit tests; layout spec text-size, zoom, label-change and mounted-closed cases).
  • Description: the rule is per label, never the sum: verified (resolveAlertActionLayout and its unit cases).
  • Description: no API change and no caller decision: verified (the API generator lists no row).
  • Description: visual, DOM and tab order agree, and Cancel keeps initial focus: verified (AlertDialog.tsx order swap, unit test, accessibility spec).
  • Description: the row is measured once when the alert shows, before its first frame, with no resize-observer loop: verified (the first-frame browser case).
  • Description: the row is Astryx Buttons on the footer's gap token: verified (AlertDialog.tsx).
  • Description: the record's ownership section says why no shared engine fits the hook: verified (the Ownership boundary bullet naming useAlertActionLayout.ts).
  • Description: the row is measured once per open, and a rotation or zoom re-decides one frame later: verified (the open-time effect commits once; resize reports defer to the next frame in useAlertActionLayout.ts).
  • Description: the busy-main-thread judge counts a frame as changed by its pixels' mean absolute change, keeping the 0.005 cut: verified (busyMotionJudge.ts and its new unit case).
  • Description: it builds on main after an earlier pull request's touch motion landed: verified in part (the base is main and the patch adds no motion code; the landing itself was not checked).
  • Description: an owner's real-phone check passed at an earlier head: stated in text, not repeated here (maintainer evidence that the layout's verification row does not require).
  • Description: test results stated for earlier commits: verified in part at this head in Chromium (units, layout, motion and accessibility specs, lint, typecheck, knowledge check); WebKit and device runs were not repeated.
  • Description: the record takes FR3, PR1 and DEC-5 as approved: verified (an engineering owner's approval at this exact head).

Files:

  • .changeset/alertdialog-compact-action-row.md: clear
  • apps/storybook/stories/AlertDialog.stories.tsx: clear
  • docs/specs/components/AlertDialog/AlertDialog.spec.md: owner-approved at this head; optional Design relationships note
  • packages/core/src/AlertDialog/AlertDialog.doc.mjs: clear
  • packages/core/src/AlertDialog/AlertDialog.test.tsx: clear
  • packages/core/src/AlertDialog/AlertDialog.tsx: clear
  • packages/core/src/AlertDialog/__tests__/AlertDialog.layout.interaction.browser.spec.ts: clear
  • packages/core/src/AlertDialog/__tests__/AlertDialog.motion.interaction.browser.spec.ts: clear
  • packages/core/src/AlertDialog/__tests__/busyMotionJudge.test.ts: clear
  • packages/core/src/AlertDialog/__tests__/busyMotionJudge.ts: clear
  • packages/core/src/AlertDialog/useAlertActionLayout.test.tsx: clear
  • packages/core/src/AlertDialog/useAlertActionLayout.ts: clear
  • packages/core/src/motion/uikit/alert.ts: clear

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec c0cb7a2

@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. The compact touch row follows the AlertDialog record edits an engineering owner approved for this head, its unit, layout, motion and accessibility tests pass here, and a mouse renders exactly as before. Next, mark the pull request ready for review, and a maintainer adds the ci:run label so CI runs.

  • Non-blocking: the record's Design relationships row for the action button still says only "stacked above Cancel on small screens", while under a finger on a compact window two short actions now share a row (FR3).
Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none

Claims:

  • Release note: under a finger on a compact screen (the theme's compact definition), two actions share a row in equal halves, Cancel leading, when each label fits its half: verified (the hook's rule, unit tests, layout browser spec, portrait frames).
  • Release note: otherwise they stack, the action above Cancel, as before on a portrait phone and new on a landscape phone or small tablet: verified (landscape frame, layout spec).
  • Release note: right to left, Cancel leads on the right: verified (right-to-left frame, layout spec).
  • Release note and description: with a mouse nothing changes, the actions stack at 640 px and below: verified (mouse frame identical to the base, mouse unit and browser cases).
  • Description: a rotation, zoom, web-font load or label change decides again, and an alert mounted closed decides when it opens: verified (unit tests; layout spec text-size, zoom, label-change and mounted-closed cases).
  • Description: the rule is per label, never the sum: verified (resolveAlertActionLayout and its unit cases).
  • Description: no API change and no caller decision: verified (the API generator lists no row).
  • Description: visual, DOM and tab order agree, and Cancel keeps initial focus: verified (AlertDialog.tsx order swap, unit test, accessibility spec).
  • Description: the row is Astryx Buttons on the footer's gap token: verified (AlertDialog.tsx).
  • Description: the row is measured once as the alert shows, before its first frame, with no resize-observer loop, and a rotation or zoom re-decides one frame later: verified (the first-frame browser case; the hook defers resize reports to the next frame).
  • Description: the record's ownership section says why no shared engine fits the hook: verified (the Ownership boundary bullet naming useAlertActionLayout.ts).
  • Description: the busy-main-thread judge counts a frame as changed by its pixels' mean absolute change, keeping the 0.005 cut: verified (busyMotionJudge.ts and its new unit case).
  • Description: at this head the pull request's own changes differ from the previous revision only in a comment in the busy proof's helper, and the merged main changes reach no code AlertDialog renders: verified (per-file patch comparison; the merged change to the shared focus-ring module is a comment), with the busy case passing here.
  • Description: it builds on main after an earlier pull request's touch motion landed: verified (the base contains it).
  • Description: device checks at earlier revisions: stated in text, not repeated here (maintainer evidence that the layout's verification row does not require).
  • Description: test results stated for earlier revisions: verified in part at this head in Chromium (units, layout, motion and accessibility specs, lint, typecheck, knowledge check); WebKit and device runs were not repeated.
  • Description: the record takes FR3, PR1 and DEC-5 as approved: verified (an engineering owner's approval at this exact head).

Files:

  • .changeset/alertdialog-compact-action-row.md: clear
  • apps/storybook/stories/AlertDialog.stories.tsx: clear
  • docs/specs/components/AlertDialog/AlertDialog.spec.md: owner-approved at this head; optional Design relationships note
  • packages/core/src/AlertDialog/AlertDialog.doc.mjs: clear
  • packages/core/src/AlertDialog/AlertDialog.test.tsx: clear
  • packages/core/src/AlertDialog/AlertDialog.tsx: clear
  • packages/core/src/AlertDialog/__tests__/AlertDialog.layout.interaction.browser.spec.ts: clear
  • packages/core/src/AlertDialog/__tests__/AlertDialog.motion.interaction.browser.spec.ts: clear
  • packages/core/src/AlertDialog/__tests__/busyMotionJudge.test.ts: clear
  • packages/core/src/AlertDialog/__tests__/busyMotionJudge.ts: clear
  • packages/core/src/AlertDialog/useAlertActionLayout.test.tsx: clear
  • packages/core/src/AlertDialog/useAlertActionLayout.ts: clear
  • packages/core/src/motion/uikit/alert.ts: clear

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 97dae91

@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. The compact touch row follows the AlertDialog record edits an engineering owner approved for this head, the merge of main leaves this pull request's own changes untouched, and its unit, layout, motion and accessibility tests pass here, with a mouse rendering exactly as before. Next, mark the pull request ready for review; it already carries ci:run, so CI then runs.

  • Non-blocking: the record's Design relationships row for the action button still says only "stacked above Cancel on small screens", while under a finger on a compact window two short actions now share a row (FR3).
Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none

Claims:

  • Release note: under a finger on a compact screen (the theme's compact definition, by default narrower than 768 px or shorter than 500 px), the two actions share a row in equal halves, Cancel leading, when each label fits its half on one line: verified (the hook's rule, unit tests, layout browser spec, portrait and tap-opened frames).
  • Release note: otherwise they stack, the destructive action above Cancel, as before on a portrait phone and new on a landscape phone or a small tablet: verified (landscape frame, layout spec).
  • Release note: right to left, Cancel leads on the right: verified (right-to-left frame, layout spec).
  • Release note and description: with a mouse nothing changes, the actions stack at 640 px and below: verified (mouse frame identical to the base, mouse unit and browser cases).
  • Description: a rotation, a zoom, a web font that finishes loading or a label change decides again, and an alert mounted closed decides when it opens: verified (unit tests; layout spec text-size, zoom, label-change and mounted-closed cases).
  • Description: the rule is per label, never the sum, from a measured iOS constant: verified (resolveAlertActionLayout and its unit cases).
  • Description: no API change and no caller decision: verified (no export, prop, type, data attribute or default changes).
  • Description: visual, DOM and tab order agree in every layout, and Cancel keeps initial focus: verified (AlertDialog.tsx order swap, unit test, accessibility spec, focus probe on the tap-opened story).
  • Description: the row is Astryx Buttons on the footer's gap token: verified (AlertDialog.tsx).
  • Description: the hook measures each label once as the alert is shown, before its first frame, watches only the title, and defers a resize-started decision to the next frame: verified (hook source, unit cases, the first-frame browser case).
  • Description: the record takes FR3, PR1 and DEC-5 as approved, and its Ownership boundary says why no shared engine fits the hook: verified (an engineering owner's approval for this exact head; the Ownership bullet).
  • Description: the busy-main-thread judge counts a frame as changed by its pixels' mean absolute change and keeps the 0.005 cut: verified (busyMotionJudge.ts, its new unit case, the busy browser case).
  • Description: at this head the pull request's own diff is unchanged by the merge of main: verified (the patch is byte-identical and the merge resolved no conflict).
  • Description: the merged main changes Dialog, which AlertDialog imports, so that an initial-focus request belongs to its nearest dialog: verified (the Dialog change); it leaves Cancel's initial focus as it was (unit tests, focus probe).
  • Description: the units, the accessibility spec and the layout and motion specs pass at this head: verified in Chromium (597 unit tests in the AlertDialog, Dialog and UIKit folders, 5 accessibility cases, 36 layout and motion cases); WebKit, typecheck and lint were not repeated, since the pull request's files are unchanged from the last reviewed revision.
  • Description: earlier screenshots, device checks and test runs at earlier revisions: stated in text, not repeated here (maintainer evidence that the layout's verification row does not require).

Files:

  • .changeset/alertdialog-compact-action-row.md: clear
  • apps/storybook/stories/AlertDialog.stories.tsx: clear
  • docs/specs/components/AlertDialog/AlertDialog.spec.md: owner-approved at this head; optional Design relationships note
  • packages/core/src/AlertDialog/AlertDialog.doc.mjs: clear
  • packages/core/src/AlertDialog/AlertDialog.test.tsx: clear
  • packages/core/src/AlertDialog/AlertDialog.tsx: clear
  • packages/core/src/AlertDialog/__tests__/AlertDialog.layout.interaction.browser.spec.ts: clear
  • packages/core/src/AlertDialog/__tests__/AlertDialog.motion.interaction.browser.spec.ts: clear
  • packages/core/src/AlertDialog/__tests__/busyMotionJudge.test.ts: clear
  • packages/core/src/AlertDialog/__tests__/busyMotionJudge.ts: clear
  • packages/core/src/AlertDialog/useAlertActionLayout.test.tsx: clear
  • packages/core/src/AlertDialog/useAlertActionLayout.ts: clear
  • packages/core/src/motion/uikit/alert.ts: clear

Automated review (maintainer link)

Under load, the proof's 100 ms close can land after the default 550 ms
entrance, and WebKit can paint no frame of the 175 ms exit. The proof
now sets a 2000 ms entrance and a 1200 ms exit, as the other close
proofs do, so the close lands mid-presentation and the fade spans
frames. Its claim and its bounds are unchanged.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 685d7be

@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. The compact touch row follows the AlertDialog record edits an engineering owner approved for this head, the new commit only lengthens one motion proof's entrance and exit, and the unit, layout, motion and accessibility tests pass here, with a mouse rendering exactly as before. Next, mark the pull request ready for review; it already carries ci:run, so CI then runs.

  • Non-blocking: the record's Design relationships row for the action button still says only "stacked above Cancel on small screens", while under a finger on a compact window two short actions now share a row (FR3).
Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none

Claims:

  • Release note: under a finger on a compact screen (the theme's compact definition, by default narrower than 768 px or shorter than 500 px), the two actions share a row in equal halves, Cancel leading, when each label fits its half on one line: verified (the hook's rule, unit tests, layout browser spec, portrait and tap-opened frames).
  • Release note: otherwise they stack, the destructive action above Cancel, as before on a portrait phone and new on a landscape phone or a small tablet: verified (landscape frame, layout spec).
  • Release note: right to left, Cancel leads on the right: verified (right-to-left frame, layout spec).
  • Release note and description: with a mouse nothing changes, the actions stack at 640 px and below: verified (mouse frame identical to the base, mouse unit and browser cases).
  • Description: a rotation, a zoom, a web font that finishes loading or a label change decides again, and an alert mounted closed decides when it opens: verified (unit tests; layout spec text-size, zoom, label-change and mounted-closed cases).
  • Description: the rule is per label, never the sum, from a measured iOS constant: verified (resolveAlertActionLayout and its unit cases).
  • Description: no API change and no caller decision: verified (the repository's API generator lists no row for Core, the build package or the seven themes).
  • Description: visual, DOM and tab order agree in every layout, and Cancel keeps initial focus: verified (AlertDialog.tsx order swap, unit test, accessibility spec, focus probe on the tap-opened story).
  • Description: the row is Astryx Buttons on the footer's gap token: verified (AlertDialog.tsx).
  • Description: the hook measures each label once as the alert is shown, before its first frame, watches only the title, and defers a resize-started decision to the next frame: verified (hook source, unit cases, the first-frame browser case).
  • Description: the new commit changes only the turn-back proof's driving, giving it a long entrance and exit as the other close proofs have, with its claim and bounds unchanged: verified (the motion spec's close helper and the unchanged assertions; the proof passes in Chromium).
  • Description: the merged main reaches AlertDialog only through two files three imports away, a mouse-only pointer fix and a font-weight type widening: verified (AlertDialog's import graph at this head).
  • Description: the record takes FR3, PR1 and DEC-5 as approved, DEC-5 keeps its number while main's record has DEC-1 to DEC-3, and its Ownership boundary says why no shared engine fits the hook: verified (an engineering owner's approval for this exact head; the record's decisions; the Ownership bullet).
  • Description: the busy-main-thread judge counts a frame as changed by its pixels' mean absolute change and keeps the 0.005 cut: verified (busyMotionJudge.ts, its new unit case, the busy browser case).
  • Description: the units, the layout and motion specs and the accessibility spec pass at this head: verified in Chromium (722 unit tests across AlertDialog, Dialog, the UIKit constants, the group tracker and the touch presentation; 36 layout and motion cases; 5 accessibility cases); WebKit and the repeated load runs were not repeated here.
  • Description: the typechecks, strict ESLint, Prettier, the comment-provenance check, the knowledge check and the SYNC check pass: Core's typecheck, Prettier on the changed files, ESLint on the changed source and tests, the comment-provenance check, the knowledge check and the SYNC check verified at this head; the Storybook typecheck reports errors only in chart, Vega and probe-theme stories whose packages were not built here, none in AlertDialog's story.
  • Description: earlier screenshots, device checks and load runs at earlier revisions: stated in text, not repeated here (maintainer evidence that the layout's verification row does not require).

Files:

  • .changeset/alertdialog-compact-action-row.md: clear
  • apps/storybook/stories/AlertDialog.stories.tsx: clear
  • docs/specs/components/AlertDialog/AlertDialog.spec.md: owner-approved at this head; optional Design relationships note
  • packages/core/src/AlertDialog/AlertDialog.doc.mjs: clear
  • packages/core/src/AlertDialog/AlertDialog.test.tsx: clear
  • packages/core/src/AlertDialog/AlertDialog.tsx: clear
  • packages/core/src/AlertDialog/__tests__/AlertDialog.layout.interaction.browser.spec.ts: clear
  • packages/core/src/AlertDialog/__tests__/AlertDialog.motion.interaction.browser.spec.ts: clear
  • packages/core/src/AlertDialog/__tests__/busyMotionJudge.test.ts: clear
  • packages/core/src/AlertDialog/__tests__/busyMotionJudge.ts: clear
  • packages/core/src/AlertDialog/useAlertActionLayout.test.tsx: clear
  • packages/core/src/AlertDialog/useAlertActionLayout.ts: clear
  • packages/core/src/motion/uikit/alert.ts: clear

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec eed836a

@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, because the pull request is still a draft; the ci:run label is already set, so marking it ready for review starts CI.

The compact touch row follows the AlertDialog record's FR3, PR1 and DEC-5 edits, which an engineering owner approved for this head, and the latest push only merges the base branch with this pull request's own changes unchanged. The unit, layout, motion and accessibility tests pass here, and a mouse and long labels render exactly as before. One optional record fix remains: the action button's design-relationships row still says only "stacked above Cancel on small screens" and could name the shared row under a finger too.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Claim, release note: under a finger on a compact screen (by default narrower than 768 px or shorter than 500 px), two actions share a row in equal halves, Cancel leading, when each label fits its half. Verified: useAlertActionLayout.ts:43-56, AlertDialog.tsx:274-279, the layout spec's row cases, and the portrait and landscape touch frames.
  • Claim, release note: a label too long for its half stacks them, the destructive action above Cancel, as before on a portrait phone and new on a landscape phone or small tablet that used a trailing row. Verified: the layout spec's stack cases; the long-label frame is unchanged and the landscape frame loses its trailing row.
  • Claim, release note: right to left, Cancel leads on the right. Verified: the layout spec's right-to-left case and the right-to-left frame.
  • Claim, release note: with a mouse nothing changes, and the actions stack at 640 px and below. Verified: the mouse cases in AlertDialog.test.tsx and the layout spec; the mouse frame is pixel-identical.
  • Claim: a rotation, a zoom, a web font that loads or a label change decides again, and an alert mounted closed decides when it opens. Verified: useAlertActionLayout.ts:98-179, the hook's font-load and label-change unit cases, and the layout spec's zoom, large-text, label-change and mounted-closed cases.
  • Claim: no API change and no caller decision. Verified: the API surface generator lists 0 rows over the built base and head.
  • Claim: visual, DOM and tab order agree in every layout, and Cancel keeps initial focus. Verified: AlertDialog.tsx:376, the unit autofocus case, and the tap-opened frame, where focus is on Cancel.
  • Claim: the row is Astryx Buttons on the footer's gap token. Verified: AlertDialog.tsx:367-373.
  • Claim: the hook measures the row once when the alert is shown, before its first frame, watches only the title, and a decision that a title resize starts waits for the next frame. Verified: useAlertActionLayout.ts:130, :137, :168, the hook's "measures the row once" and "next frame" unit cases, and the layout spec's first-open case.
  • Claim: the latest push merges the base branch and leaves this pull request's own diff unchanged. Verified: the diff is byte-identical to the previous head's.
  • Claim: that merge changes Button, which AlertDialog imports directly; primary and destructive Buttons pass their colour pair through two private variables. Verified: the merged Button change; every probe and frame is as before.
  • Claim: the unit tests, the layout and motion specs and the accessibility spec pass at this head. Verified in Chromium: 727 unit tests in the AlertDialog, Button, UIKit and touch selection, 36 browser cases, 5 accessibility cases; the WebKit counts are the author's.
  • Claim: a new device comparison at this head is pending. Verified as stated; the record's verification row for this layout asks for unit and browser tests, not device takes.
  • Claim: the phone width and group pointers stay, rowShare joins the UIKit alert table, the record takes the layout, listener and decision edits, and the docs, tests and stories change only their layout lines. Verified against the diff (alert.ts:38, AlertDialog.tsx:227).
  • Claim: the turn-back proof gets a long entrance and exit, and the busy proof counts each pixel's change with the same 0.005 cut. Verified: the motion spec (:326-327), busyMotionJudge.ts:21 and :49, and the judge's new unit case.
  • Claim: the record's ownership boundary says why no shared engine fits the layout hook. Verified: AlertDialog.spec.md:111.
  • Claim: the writing rubric results list the record's edits. Verified against the record diff.
  • File .changeset/alertdialog-compact-action-row.md: clear.
  • File apps/storybook/stories/AlertDialog.stories.tsx: clear.
  • File docs/specs/components/AlertDialog/AlertDialog.spec.md: one optional note (the action button's design-relationships row names only the stack).
  • File packages/core/src/AlertDialog/AlertDialog.doc.mjs: clear.
  • File packages/core/src/AlertDialog/AlertDialog.test.tsx: clear.
  • File packages/core/src/AlertDialog/AlertDialog.tsx: clear.
  • File packages/core/src/AlertDialog/__tests__/AlertDialog.layout.interaction.browser.spec.ts: clear.
  • File packages/core/src/AlertDialog/__tests__/AlertDialog.motion.interaction.browser.spec.ts: clear.
  • File packages/core/src/AlertDialog/__tests__/busyMotionJudge.test.ts: clear.
  • File packages/core/src/AlertDialog/__tests__/busyMotionJudge.ts: clear.
  • File packages/core/src/AlertDialog/useAlertActionLayout.test.tsx: clear.
  • File packages/core/src/AlertDialog/useAlertActionLayout.ts: clear.
  • File packages/core/src/motion/uikit/alert.ts: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec f55122d

@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, because the pull request is still a draft; the ci:run label is already set, so marking it ready for review starts CI.

The compact touch row follows the AlertDialog record's layout, listener and decision edits, which an engineering owner approved for this head, and the latest push only merges the base branch with this pull request's own changes unchanged. The AlertDialog unit tests pass on this head, and a mouse and long labels render exactly as before. One optional record fix remains: the action button's design-relationships row still says only "stacked above Cancel on small screens" and could name the shared row under a finger too.

Claims and files checked

Review mode: carry-forward; reason: none

  • Claim, release note: under a finger on a compact screen (by default narrower than 768 px or shorter than 500 px), two actions share a row in equal halves, Cancel leading, when each label fits its half. Verified: useAlertActionLayout.ts:43-56, AlertDialog.tsx:274-279, the layout spec's row cases and the touch frames.
  • Claim, release note: a label too long for its half stacks them, the destructive action above Cancel, as before on a portrait phone and new on a landscape phone or small tablet that used a trailing row. Verified: the layout spec's stack cases; the long-label frame is unchanged and the landscape frame loses its trailing row.
  • Claim, release note: right to left, Cancel leads on the right. Verified: the layout spec's right-to-left case and frame.
  • Claim, release note: with a mouse nothing changes, and the actions stack at 640 px and below. Verified: AlertDialog.tsx:274-275 and the mouse cases in AlertDialog.test.tsx and the layout spec.
  • Claim: a rotation, a zoom, a web font that loads or a label change decides again, and an alert mounted closed decides when it opens. Verified: useAlertActionLayout.ts:98-179 and the hook's unit cases.
  • Claim: no API change and no caller decision. Verified: no prop changes, and the hook is imported only inside the AlertDialog folder.
  • Claim: visual, DOM and tab order agree in every layout, and Cancel keeps initial focus. Verified: AlertDialog.tsx:376 and the unit autofocus case.
  • Claim: the row is Astryx Buttons on the footer's gap token. Verified: AlertDialog.tsx:367-373.
  • Claim: the hook measures the row once when the alert is shown, before its first frame, watches only the title, and waits a frame to decide after a title resize. Verified: useAlertActionLayout.ts:130-137 and :151-179, and the hook's "measures the row once" and "next frame" unit cases.
  • Claim: the pull request builds on the main branch. Verified: the diff applies to the main branch's AlertDialog.
  • Claim: earlier screenshots show rows, stacks and edge cases under a coarse pointer at 320 and 390 px. Verified: the layout spec covers the same states.
  • Claim: the owner's real-phone check passed at an earlier head, and a later head renders the same on those devices. Verified as stated; the layout's verification asks for unit and browser tests, not device takes.
  • Claim: the latest push merges the base branch and leaves this pull request's own diff unchanged. Verified: the diff is byte-identical, and the merge changes none of its files.
  • Claim: two files that AlertDialog and its test import directly change only in comments. Verified: the group press tracker and the press-group marker change only in comments.
  • Claim: AlertDialog's code reaches one other change, the dark theme's secondary text colour. Verified: tokens.stylex.ts changes that dark stop; Heading's change is not rendered by AlertDialog.
  • Claim: the unit tests pass, Heading's and the group press tracking's included. Verified: 816 tests over AlertDialog, Heading, Button, the UIKit constants and the touch tracking pass on this head; the larger count is the author's selection.
  • Claim: Prettier, the knowledge check and the sync check pass. Verified on this head; the typechecks, ESLint and comment-provenance results are the author's.
  • Claim: the layout, motion and accessibility browser specs pass in Chromium and WebKit, including the turn-back proof under load and the busy-main-thread case. Verified in Chromium on the identical patch; the WebKit counts are the author's.
  • Claim: the phone width and group pointers stay, rowShare joins the UIKit alert table, the record takes the layout, listener and decision edits, and the docs, tests and stories change only their layout lines. Verified: alert.ts:38, AlertDialog.tsx:227 and the diff.
  • Claim: a rotation or zoom lands one frame later, to avoid a resize observer loop, and each open's first frame is unchanged. Verified: useAlertActionLayout.ts:130-133 and the first-open browser case.
  • Claim: the title ref sits on the title heading. Verified: AlertDialog.tsx:334.
  • Claim: the turn-back proof gets a long entrance and exit, and the busy proof counts each pixel's change with the same 0.005 cut. Verified: the motion spec (:326-327), busyMotionJudge.ts:21 and :49, and the judge's new unit case.
  • Claim: the record's ownership boundary says why no shared engine fits the layout hook. Verified: AlertDialog.spec.md:111.
  • Claim: the writing rubric results list the record's edits. Verified against the record diff.
  • File .changeset/alertdialog-compact-action-row.md: clear.
  • File apps/storybook/stories/AlertDialog.stories.tsx: clear.
  • File docs/specs/components/AlertDialog/AlertDialog.spec.md: one optional note (the action button's design-relationships row names only the stack).
  • File packages/core/src/AlertDialog/AlertDialog.doc.mjs: clear.
  • File packages/core/src/AlertDialog/AlertDialog.test.tsx: clear.
  • File packages/core/src/AlertDialog/AlertDialog.tsx: clear.
  • File packages/core/src/AlertDialog/__tests__/AlertDialog.layout.interaction.browser.spec.ts: clear.
  • File packages/core/src/AlertDialog/__tests__/AlertDialog.motion.interaction.browser.spec.ts: clear.
  • File packages/core/src/AlertDialog/__tests__/busyMotionJudge.test.ts: clear.
  • File packages/core/src/AlertDialog/__tests__/busyMotionJudge.ts: clear.
  • File packages/core/src/AlertDialog/useAlertActionLayout.test.tsx: clear.
  • File packages/core/src/AlertDialog/useAlertActionLayout.ts: clear.
  • File packages/core/src/motion/uikit/alert.ts: clear.

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — f55122de Deployed Nov 19, 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) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants