Skip to content

refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) - #11205

Draft
cixzhang wants to merge 47 commits into
mainfrom
fix/hit-area-checked-at-press
Draft

cixzhang wants to merge 47 commits into
mainfrom
fix/hit-area-checked-at-press

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

Supersedes #11083: this replaces the page watch that #11083 extended with a check at press.

Every phone visitor stops paying for page-wide measuring of touch hit areas; each small control keeps its 44 px reach. Hit areas are checked at the press, not watched.

Behavior module: touch hit area (utils/hitArea.ts, utils/touchHitArea.ts, internal/touchHitArea.stylex.ts)

User or maintainer impact

  • Who: every visitor with a coarse primary pointer (phones, tablets), on any page with Astryx controls.
  • Before: from page load, the hit-area module observed every control (4 observers, 389 observed elements on the List docs page), read 901 element boxes before the first press, and forced 14 layouts during load and scroll.
  • After: before a press, the module reads nothing and observes nothing. A tap that lands outside the control's own box reads one box and asks the browser once what lies under the finger. The 44 px reach is CSS.
  • Kept: a small control still takes taps up to 44 px. A group's members (ButtonGroup, ToggleButtonGroup, SegmentedControl, List rows, RadioList options, the reorder hint's buttons) split their gap at its middle. InfoTip does not grow sideways into the text around it.
  • A tap that works without the band works the same with it. A visible box under the finger wins; the band only claims empty space:
    • where a band lies over another target's visible box, that target takes the tap, as it does on main;
    • a control in a List row's end slot grows no taller than itself, so the row takes the taps above and below it;
    • in empty space where bands overlap, the target whose box is nearest the finger takes the tap (the gap's midpoint result main gave), whichever band paints on top;
    • only a tap on a band with no nearer target acts on the band's control.

Problem and solution fit

  1. Why do phones pay? The module kept every control's hit inset up to date by watching layout, mutations, scroll and animations, from load, whether or not anyone pressed.
  2. Why does that hurt? Each watched change forced layout reads on the main thread during load and scroll, the moments a phone has least time to spare.
  3. Why does it matter? Touch is the primary input on phones; the cost lands on the people the hit area serves.

The fix moves the size into CSS and moves the only judgement left, "is another target's box under the finger?", to the one moment it matters: the click.

  • Primary: utils/hitArea.ts and utils/touchHitArea.ts (press check), internal/touchHitArea.stylex.ts (CSS band).
  • Supporting: callers switch from measured insets to the band and the group room styles; tests and records follow.
  • Tagalongs: none.

Authority

  • Owner decision, 2026-11-10: Option B, "checked at press", from the goal "better performance and less loc". Recorded as spec:AST-094 DEC-33 with its four rules:
    1. no hit-target logic runs before a press begins;
    2. nothing observes DOM mutations, and no page registry is kept;
    3. only the pressed control and its neighbours are measured, at the press's click;
    4. the check never reacts to layers or animations.
  • spec:AST-110 FR3/FR7: the module keeps no module-level state.

Change and evidence

Design

  • CSS band (internal/touchHitArea.stylex.ts): under a coarse pointer, a control's ::after grows each side toward 44 px, and no further than that side's room (--_hit-room-*, private CSS variables). The band sits below the control's content (z-index: -1 in an isolated host).
    • Default room: 22 px on every side.
    • A row's end slot (Item, so every List and RadioList row): block room 0. The row's edge is the boundary. Switch's grown input follows the same room.
    • Group members: half the gap toward the next member. The group root picks a room style for its axis and gap token. End members still grow outward.
    • InfoTip: sideways room 0, since it sits in running text.
  • Press check (utils/touchHitArea.ts): each host subscribes one passive pointerdown subscriber through the shared input listener. While the primary pointer is coarse (the band exists only then), it records the press of a finger, a pen or a mouse, and reads nothing. The shared input stream, which delivers that click, now records the pointer type, the mouse point and the down presses from pointer events only: WebKit gives the click of a finger's tap the pointer type "mouse", so a recorded click would make a layer the tap opens let a mouse through its shield.
    • At the click it reads the host's box. If the finger was inside it, it reads nothing more.
    • If the finger was in the band, it asks the browser once for the elements under the finger, up to the host's container. When another target's own box holds the finger, the click goes to that target instead (one click() on it), as the tap does without the band. In empty space, the click goes to the target whose box is nearest the finger, measured on the same box reads; the host acts when no other box is nearer. A target marked as a grown hit input counts by its parent's box (the visible switch), not by its grown box. The mark is explicit: a private attribute, data-astryx-grown-hit-input, with one owner module (privateAttributes/grownHitInput.stylex.ts), which Switch puts on its transparent, grown 44 px input. No style is sniffed, so a visible target, even one positioned past its parent, always counts by its own box. Reading the mark costs no layout.
    • State lives per press, in closures. No module-level maps, timers or registries (swizzle-safe).
  • Caller API kept: useTouchHitArea(enabled, options) keeps its call shape. TouchHitAreaOptions keeps ownsDescendantTouches. The growth option is gone; CSS room replaces it.

Swipe rows are no longer raised. Before this change, an interactive List row that served swipe actions raised itself above the rows after it under a coarse pointer (z-index: 1), and a row's touch band raised itself above later rows. Both raises kept a measured hit area from being covered by the next row. This PR removes them because they are no longer needed. Every interactive row with a touch band is now its own stacking context, and its band sits below its own content. At a tap, the press check gives the tap to whichever target's visible box is under the finger (spec:AST-094 DEC-33): a band only claims empty space. A later row that paints over part of a band therefore takes exactly the taps that land on its own box, as it does without the band, and no row has to rise above its neighbours. The reorder raise, where a row crossing other rows rides above them, is unchanged.

Done criteria

Criterion Result
0 layout reads and 0 observers before a press Met: 0 reads, 0 observers on the List docs page and on the Touch targets story (Chromium trace, 9 runs and 3 runs)
At most 1 forced layout per tap Met: a band tap reads the host's box, makes 1 elementsFromPoint call, and reads the box of each target candidate it finds, all after the same layout flush. 0 forced layouts were measured in the tap window
The two modules total about 320 lines or fewer Not met: 355 lines (hitArea.ts 111 + touchHitArea.ts 244). The review rounds added the hand-off to a native target, the field-frame and grown-input marks, the nearest-entry choice and the pointer gate; the review fixes added the hand-off and the field frame, from 1,647

Performance

Chromium, phone emulation (402 × 714, DPR 3, coarse pointer), static Storybook builds of main and this branch, the same base.

Load + fling (List docs page; 3 fast touch scrolls; 9 runs each; median, range):

Measure main this branch
Hit-area box reads before the first press 901 (680–901) 0
Hit-area observers before the first press 4 observers, 389 elements 0
Forced layouts with a script stack, whole page 32 (27–37) 18 (16–21)
…of which from hit-area code 14 (14–15) 0
Hit-area scripting time 17.1 ms (12.8–27) 0.1 ms (0–10.4)
Long tasks, whole page 9 (6–36) 13 (6–26)

The long-task count is dominated by docs-page render and by machine load during the runs (the host's load average was 40–110). It shows no reliable difference either way. On this branch, hit-area code contributes no forced layout and about no scripting time to it.

Tap (measured at the first head; Button Touch targets story; a finger 3 px above a small icon button's edge; 3 runs each; every run took the tap on Bold):

Measure main this branch
Hit-area box reads before the tap 45 (4 observers, 22 elements) 0
Hit-area reads during the tap 16 box reads 1 box read + 1 elementsFromPoint
Forced layouts in the tap window 0 0

Bundle (gzip, import closure, .github/scripts/lib/component-size.js method):

Component main JS branch JS Δ JS main CSS branch CSS Δ CSS
Button 64,393 B 60,564 B −3,829 B (−5.9%) 10,258 B 10,388 B +130 B
Switch 108,829 B 105,066 B −3,763 B (−3.5%) 10,231 B 10,277 B +46 B
ListItem 74,774 B 70,990 B −3,784 B (−5.1%) 11,779 B 11,878 B +99 B

The table compares main and the first head of this PR on the same base. At c5e20f5 (after more main merges and the review rounds' changes), the JS is Button 61,510 B, Switch 105,956 B and ListItem 72,059 B. The CSS is 10,498 B, 10,439 B and 12,074 B. main has moved since the table's base too, so these are not a same-base comparison.

Lines of code

  • The two modules: 1,647 → 355 lines.
  • This PR overall: 3,544 lines added and 5,288 removed in 118 files, against the main this branch last merged (9d19da9). Most of it is tests and the old measuring code.

Tests

Red-first. The new unit tests ran against main's modules first: 8 of 17 failed, for the right reasons: no touchTargetRect or distanceTo; 3 observers started before a press; nothing read at the click; a band tap over a neighbour's box was not handled; no per-side room or sideways room 0 for inline controls. All 17 pass on this branch.

Unit (Vitest, jsdom):

  • New or rewritten: no listener, observer or read before a press; a tap on the band over another target's box goes to that target; a row's end slot gives its controls no block room; per-side room; InfoTip does not grow sideways; group room on ButtonGroup, ToggleButtonGroup, SegmentedControl, List, RadioList and the reorder hint; InputClearButton room beside a field's parts; Switch, ListItem and PageControl draw the band.
  • Run: the affected folders plus scripts/shared-identity.test.mjs and theme/derivedVarRegistry.test.ts: 221 files, 4,956 tests. Two timing tests (a ListReorder settle and a DateInput calendar arrow) failed once under machine load and pass on rerun; the final rerun of utils/, those two files and the other changed suites passes.

Red-first for the overlap rule (Chromium, against a Storybook build of the previous head with the new story, then against this head):

Case Previous head (cancel at press) This head
A Switch end control in a 33 px List row: a tap 3 px into the row above the row never activates (0 clicks) the row activates; the switch keeps its state
A button 4 px under a List: a tap 1 px into the last row the row never activates (0 clicks) the row activates
Two loose 24 px buttons 4 px apart: a tap 1 px inside the first button's edge, under the second's band nothing acts (Cut 0) the first button acts; a tap 1 px inside the second's edge acts on the second

Nearest box in an empty gap (Chromium, two loose 24 px buttons 4 px apart, in both paint orders; red = the previous head):

Paint order Tap 1 px past A's edge Tap 1 px before B's edge
B over A, previous head went to B (the test stops here) not reached
A over B, previous head A went to A
Both orders, this head A B

The unit cases "a tap on the band over another target's box goes to that target" and "a tap in the empty gap goes to the candidate whose box is nearest" also fail on the earlier modules and pass here.

A button 4 px after a small Switch (Chromium; red = the previous head): a tap 1 px before the button's edge turned the Switch on, because its grown input counted as its visible box. On this head the tap presses the button, and a tap on the Switch's own box turns it on. A unit case with a grown input clipped to its parent fails on the previous module and passes here.

Handing a tap to another target (how the press check sends a tap on): I evaluated two ways.

  • (a) Let the native event land on the real target, by making the band not take the press when another target's box is under the finger. Not possible: a touch's target is fixed at touchstart, and the click follows it, so changing hit-testing after the press begins does not move that touch. Deciding before the press would also need a layout read at pointerdown, which DEC-33 rules out.
  • (b) Chosen: a complete hand-off at the click, inside the same user gesture. click() runs the native activation of a button, link, label, checkbox, radio and submit. The check adds what a synthetic click loses: a focusable target takes the focus first (preventScroll), so a text field raises the keyboard and the band's control keeps no focus. A select or a date, time, month, week or colour input also opens its picker (showPicker()). A field's box counts as the field's only when it carries an explicit private mark, data-astryx-field-frame, from one owner module (privateAttributes/fieldFrame.stylex.ts). A marked frame gives the tap to its entry nearest the finger (a text-like input, a textarea, a contenteditable, a date, time, datetime-local, month, week or colour input, or a select); a marked box that holds no entry, such as a field's description or a file input's drop zone, takes the tap itself, so its own click forwards it, as without the band. A label tied to the field is a target already (label[for]), so a tap on it focuses the field, as without the band. A field's status message, the space beside its frame, and any container that holds a checkbox, radio, file or submit input count as empty space. The coverage pass below lists every Core field, so a tap on the frame's edge focuses the entry, as the frame's own click does without the band.
  • Still not reproduced: caret placement at the tap point (the field keeps its last caret position), native text selection, and the long-press callout. Before the hand-off, the browser's own tap gives the band's control a momentary focus (focus in, then out, before the click). It shows no focus ring (:focus-visible does not match a touch focus, checked in Chromium), Astryx tooltips do not open on touch focus, and with a screen reader's touch exploration on, a double tap activates the focused element at its centre, so this sequence does not occur. A caller's own onFocus and onBlur on the band's control still run once each. No Astryx control relies on caret placement or selection from a first tap that lands within a band's overlap of a field edge. A long press on a field edge under a band still goes to the band's control.

Red-first (Chromium; red = the previous head):

Case Previous head This head
A tap on a TextInput frame's edge under a neighbouring Button's band the Button acts; the field does not take focus the field is focused; the Button gets no click
A tap on a checkbox's edge under a neighbouring Button's band toggles once (a guard: click() already toggled it) toggles once; the Button gets no click
A tap 1, 3 and 5 px inside a native DateInput frame's edge under a neighbouring Button's band (the farm's failure on iPhone and Pixel) the Button acts; the date field is not focused the date field is focused and its picker is asked for; the Button gets no click
A finger's tap on a control 4 px beside a ButtonGroup or a ToggleButtonGroup, inside the end member's band, left to right and right to left (unit, hooks/__tests__/groupBandHandOff.test.tsx) the group takes the press, runs the end member and swallows the click; the control gets nothing (4 of 4 fail) the group leaves the press, and the press check gives the tap to the control; the member runs nothing
A tap on a field's status message or beside its frame, under a neighbouring button's band (unit) the field takes focus the button acts; the field stays unfocused. A tap inside the marked frame still focuses the field
A tap on the Email field's status message under the Check button's band (Chromium, new "Field with a status message" row) not run (the row is new) Check acts; the field stays unfocused
A finger's tap on a band host whose click WebKit reports as pointerType: "mouse", and a layer the click opens (unit, plus an input-stream unit case: a click records no pointer type, mouse point or press) the input stream records a mouse, so the layer's hold lets the tap through its shield (WebKit PopoverTouchMotion lines 1231, 1257, 1334 fail) the stream keeps the touch, and the shield takes the tap
A pen tap and a mouse click on a band over a neighbour's box, primary pointer coarse (unit) the band's control acts (only a finger was checked) the neighbour takes the tap
A finger, a pen and a mouse under a fine primary pointer (unit) a finger was still checked no check: the browser's own hit test, as without the band
A tap on a Typeahead's frame under a neighbour's band (unit) the frame is not marked; the band's control acts the Typeahead's entry takes the focus
A tap on a marked box that holds no entry, such as a field's description (unit) the band's control acts the box's own click runs
Each Core field marks its box (touchFieldFrames.test.tsx, 22 cases) 16 of the 20 cases run fail (only TextInput, TextArea, NumberInput and native DateInput were marked); the Tokenizer sheet and layer cases came later all 22 pass

A visible absolutely positioned button that reaches past its parent (Chromium; red = the previous head): a tap on its visible overhang, where a neighbour's band lies over it, went to the neighbour. On this head the tapped button acts. The Switch case stays green. A unit case (an unmarked absolute button measured by its own box) fails on the previous module and passes here.

No hit-area work during a NavigationStack push (Chromium, the Settings story; from the tap's click until 1.5 s after the pushed screen lands): on main the hit-area code makes 20 layout reads and 32 hit-size style writes on the rows of both screens; on this head it makes 0 and 0.

Chromium (local, phone project, against this branch's static Storybook):

  • New utils/__tests__/touchHitArea.interaction.browser.spec.ts:
    • a 24 px button takes taps 10 px past its edge and not 11 px;
    • a group's 4 px gap splits at its middle;
    • a tap on a link right before an InfoTip opens the link, not the tip;
    • no hit-area layout read and no observer before a press;
    • the three overlap cases above, the nearest-box gap case in both paint orders, a button 4 px after a small Switch, a visible absolute button past its parent, a text field edge and a checkbox edge under a neighbour's band, and the NavigationStack push case.
  • Updated and passing: ButtonHitArea, TouchTargets, ListTouchHitArea, SegmentedControlHitArea, ToggleButtonGroupTracking, the Switch hit-area tests, the reorder handle test, PageControl's band tap, and InfoTipTouch.
  • Not run locally: 2 tests that open a second browser context, and the InfoTip audit, which needs a stamped Storybook build. CI runs them. The local Chromium needs --single-process, which cannot open a second context.

Checks: pnpm -F @astryxdesign/core typecheck, the lab package's tsc (its docs-blocks step needs a built lab dist, which this checkout lacks; CI builds it), eslint on every changed file (0 errors), pnpm check:knowledge, pnpm specs:for --diff origin/main, pnpm review:pre (0 findings).

Swizzle safety (spec:AST-110 FR3/FR7)

The rework keeps no module-level state. It resolves and deletes all 15 triage entries for these modules in scripts/shared-identity.baseline.json; none remain, and no two-load test is needed:

  • utils/hitArea.ts: frame, interactive, interactiveDocument, isCoarse, observedSizes, pending, pointer, pressDocument, resize, scopeTimers, stopInteractiveWatch, view, visibility, watched
  • utils/touchHitArea.ts: heldWatches

Lightbox caption toggle (from #9810, now merged)

#9810 merged before this PR. Its caption toggle uses useTouchHitArea with no growth option and the default room, so it needs no change. Its browser spec read the removed --astryx-hit-inset-* values; this PR updates that spec to probe the toggle's 44 × 44 px square directly (a tap 1 px inside each edge of the square reaches the toggle).

Coverage pass

Pointers

The band is CSS behind the coarse-pointer media query, so it exists only while the primary pointer is coarse; the press check runs exactly then, for every pointer type.

Pointer Primary pointer Band Press check An edge tap under a neighbour's band Covered by
Finger Coarse Yes Yes The box under the finger wins; in empty space, the nearest box Unit at a tap suite; Chromium touch-band spec (real touch)
Pen Coarse Yes Yes Same Unit "checks a pen tap and a mouse click on the band too"
Mouse Coarse Yes Yes Same Same unit case
Finger Fine No No No band: the browser's own hit test, as without this change Unit "leaves a finger, a pen and a mouse under a fine pointer … alone"
Pen Fine No No Same Same unit case
Mouse Fine No No Same Same unit case; Chromium "a mouse gets no band" cases (TouchTargets, ListTouchHitArea)

6 cells, 6 covered by tests.

Fields

Every Core component that renders a native input, textarea, select, contenteditable or combobox, or forwards a click to one.

Component (surfaces) Mark Record line Covered by
TextInput Marked frame component:TextInput touchFieldFrames.test.tsx; unit frame-focus case; Chromium Search/Go and status-message rows
TextArea Marked frame component:TextArea touchFieldFrames.test.tsx
NumberInput Marked frame component:NumberInput touchFieldFrames.test.tsx
DateInput (pointer, touch sheet, native) Marked frame on each surface component:DateInput touchFieldFrames.test.tsx (3 surfaces); unit inset date-frame case; Chromium Pick/Apply
TimeInput (pointer, touch sheet, native) Marked frame on each surface component:TimeInput touchFieldFrames.test.tsx (3 surfaces)
DateTimeInput, date and time parts (pointer, touch sheet, native segments) Marked frames on each surface component:DateTimeInput touchFieldFrames.test.tsx (3 surfaces, 2 frames each)
DateRangeInput Marked frame; the nearest of its two entries takes the tap component:DateRangeInput touchFieldFrames.test.tsx
Typeahead Marked frame component:Typeahead touchFieldFrames.test.tsx; unit Typeahead frame-focus case
Tokenizer (field, sheet field, unfocused-layer field) Marked frames component:Tokenizer touchFieldFrames.test.tsx (3 cases)
PowerSearch Marked frame component:PowerSearch touchFieldFrames.test.tsx
PanelSearchInput (Selector's and Tokenizer's sheet search) Marked frame when it draws a field box; none without one component:Selector touchFieldFrames.test.tsx (with and without the box)
ChatComposer body Marked box component:ChatComposer touchFieldFrames.test.tsx
FileInput drop zone Marked box; takes the tap itself, its click opens the chooser component:FileInput touchFieldFrames.test.tsx; unit "a marked box that holds no entry" case
FieldLabel description that focuses its control Marked box; takes the tap itself component:FieldLabel touchFieldFrames.test.tsx; same unit case
Field label (label[for]) Not marked: already a target — Reason: INTERACTIVE_SELECTOR holds label[for], and its click focuses the field natively
Field status message Not marked: empty space — Unit "status message or beside its frame" case; Chromium status-message row
Selector, MultiSelector, ComplexSelector Not applicable: the field box is itself a pressable target (data-astryx-pressable) — Reason: the press check already treats the box as a target and clicks it
CommandPaletteInput Not marked — Reason: its row is not a field box and takes no click; a tap on its padding does nothing without the band either, and its input is a target
InputGroup Not applicable — Reason: it arranges fields; each field marks its own frame, and the group box takes no click
ChatComposerInput Not applicable — Reason: it is the entry inside ChatComposer's marked body
CheckboxInput, CheckboxList, RadioList, RadioListItem, Switch, Slider, SelectableCard, DropdownMenu checkbox and radio items Not applicable — Reason: not fields with an entry frame; the control or row is itself a target, with its own band where it has one
ChatPastedTextToken, the chat trigger menu, Popover, Tooltip, the indicator focus ring Not applicable — Reason: they matched the search by code or comments, not as fields
RichText editor, Lab components Not applicable — Reason: outside Core; this change and its records cover Core

23 rows: 15 covered by tests (the 14 marked components and the status message), 8 by a stated reason (the label and the 7 not-applicable rows).

Main merge at 7217dd7

7217dd7 merges main (9e00eb9, about 850 commits) into f3dee2f and drops one test. What main brought to the hit-area modules, and where it lands in the press model:

main change Kept as
#13009: a tap is not swallowed beside a disabled, inert or hidden neighbour targetUnderFinger skips a target that takes no tap (disabled, inert, pointer-events: none, hidden), so a band tap beside one stays with the band's control. Unit cases red on f3dee2f (6 of 6), green here. A new browser spec replaces the old watch-based one.
#12078: TextInput, NumberInput and Selector frames bound a neighbour's hit area TextInput and NumberInput already carry the field-frame mark here. The Selector's frame is a pressable box, so a tap on its padding under a neighbour's band goes to the Selector. A unit case covers it.
#12238: screenScale(element, onScreen, tolerance) and layoutSize exported for useOverflow Kept in utils/hitArea.ts with the same signatures
#13124: one animation read per hit-area pass Removed with the pass. Nothing reads animations now.
#12358: a tap in a wrapped SegmentedControl track selects the segment it lands on Kept. A segment's band is its box grown toward 44 px under a coarse pointer, and where bands overlap the nearer box takes the lift, so the gap splits at its middle.
#12700: Switch measures its track at the first press Kept as is. The grown input mark does not touch the track measure.
#12125, #11967: InputClearButton's 24 px fine-pointer target, tooltip in its name Kept. The coarse band still uses the field-parts room.
#11445: the reorder handle's finger target stays inside its list on the block axis Replaced by the press check. A visible box under the finger takes the tap, so a control against a list's edge keeps its taps. The clamp's unit test is dropped. In empty space just past a list's first or last row, the handle's band now takes the tap, as every band does under DEC-33.
#12150, #11283: GROUP_PRESS_POINTERS in pressGroupContext, group tracking on the internal touch entry Kept. The group-band context is HitAreaGroupContext, as before.

c8b9a6a adds three review notes on top of 7217dd7: two stale swipe-raise comments go, and the press check reads the pointer media query only for a press inside its host.

Checks at 7217dd7: core build, core typecheck, ESLint on the changed files, and pnpm check:knowledge pass. Unit tests for the affected folders: every hit-area, group, field, Switch, List, Button and SegmentedControl suite passes. The only failures were date and number formatting suites that need full ICU, which the run's Node lacked; this PR does not touch them. Device evidence at this head is pending (DEC-27).

Device results (DEC-27)

Each line names the head it ran at. The current head is 4b68b54, a merge of main into 3f92dc0. That merge resolves a records-only conflict in spec:AST-094 (both sides kept; DEC-31's text is main's) and auto-merges react-component-runtime.md, two generated baselines and one product file, Tokenizer.tsx (main's empty-input caret sizing; this PR's field-frame marks, in other regions). The 3f92dc0 lines below carry to 4b68b54, except the Tokenizer, which re-takes on its own cells (scoped re-take). Head 9afe21f adds one fix on top of 4b68b54, with no main merge: a ButtonGroup or ToggleButtonGroup takes no press on a member's band over a control outside the group. That changes button-group touch reach, which re-takes on its own cells at 9afe21f. Earlier heads' lines are kept for history.

The 3f92dc0 head merged main (1addd72, which includes #8690's swipe rows) into 8dc30ba.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 3f92dc0 - Android 16 emulator (x86_64), Chrome 133 + Gboard, normal, slow (4× CPU) and animations removed, side by side with 7a76b34 - all 26 cells (the Touch reach set, the radio row edges, the clear button, the Popover growth shield and the field-edge taps) PASS at N, S and R; and feat(core): swipe actions come from createSwipe on the shared drag path #8690's 12 swipe-row cells at this head (swipe reveal and commit on List rows next to tappable neighbours) PASS at N, S and R. A slow-profile run that refused one cell for input-timing jitter and a normal-profile swipe run that refused one cell for the emulator's GPU stall were re-run whole.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 3f92dc0 - iPhone 14 / iOS 26.2 Safari (normal and Reduce Motion), side by side with 7a76b34 - Popover growth shield: a double tap leaves the popover open at this head (2 of 2 normal, 1 of 1 Reduce Motion) and closes it at 7a76b34; a single tap opens and two slow taps close on both - as intended.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 3f92dc0 - iPhone 14 / iOS 26.2 Safari, side by side with 7a76b34 - Touch reach and field-edge taps, 18 takes: the end state at this head equals 7a76b34's on every one (TimeInput and DateTimeInput: the left edge opens nothing on both, the right edge opens the picker on both; NumberInput's pad opens from all four edges on both; the SMS radio is selected on both; Clear empties Search on both) - no difference.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 3f92dc0 - iPhone 14 / iOS 26.2 Safari, side by side with main at 1addd72 - feat(core): swipe actions come from createSwipe on the shared drag path #8690's swipe surfaces, 7 takes (2 normal and 1 Reduce Motion each): every end state identical and no visible motion difference - no difference.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 e1f390b - iPhone 14 / iOS 26.2 Safari (normal and Reduce Motion) and Pixel 8 / Chrome (normal and Remove animations), side by side with 7a76b34 - the full Touch reach set (Search edge beside Go, Pick edge beside Apply, the message box end by Check, the Email frame edge), the radio row edges, the clear button and the Popover growth shield, plus taps 2 px and 4 px inside the frame edge of TimeInput, DateTimeInput and NumberInput on their default stories - PASS, no difference from 7a76b34 in any cell. Seen at both heads, so not a change from this PR: on the iPhone, a tap in the left padding of TimeInput and DateTimeInput (left of the icon) opens nothing (tracked separately); NumberInput's steppers do not render under a coarse pointer, so they are not drivable.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 8dc30ba - iPhone 14 / iOS 26.2 Safari (normal and Reduce Motion), side by side with 7a76b34 - the full Touch reach set (Search edge beside Go, Pick edge beside Apply, the message box end by Check, the Email frame edge), the radio row edges and the clear button, plus taps 2 px and 4 px inside the frame edge of TimeInput, DateTimeInput and NumberInput - no difference from 7a76b34.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 8dc30ba - iPhone 14 / iOS 26.2 Safari (normal and Reduce Motion), side by side with 7a76b34 - Popover growth shield: a double tap on the Settings trigger while the popover grows, as one gesture, fresh loads, the two heads interleaved - at 8dc30ba the popover grows like a single tap and stays open (3 of 3); at 7a76b34 the second tap closes it mid-growth (3 of 3). Controls: both taps reach the page as clicks at both heads (a counter goes 0 to 2), a single tap opens and stays open at both heads, and a second tap 1.5 s later closes a grown popover at both heads.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 8dc30ba - Pixel 8 / Chrome 157 side by side with 7a76b34 (a feel check only; the Android result above is the emulator) - no difference from 7a76b34.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 8dc30ba - Android 16 emulator (x86_64), Chrome 133 + Gboard, normal, animations removed and slow (4× CPU), side by side with 7a76b34 - Search, Pick and Email-frame taps 2 px and 4 px inside the edge take the field (Go, Apply and Check do not act; the keyboard or date picker opens); taps 2 px and 4 px inside the message box's end by Check run Check once and do not focus Email; taps 2 px inside each radio row's edge and in each half of the gap select the nearer option; the clear button empties Search, keeps focus and the keyboard, and only Clear Search gets the click; once the popover has painted its first frame, the growth shield takes a second tap outside or on the trigger and the popover stays open; taps 2 px and 4 px inside the frame edge of TimeInput and DateTimeInput take the field and open the Android time or date picker; taps 2 px and 4 px inside NumberInput's frame edge take the field with the keyboard up, and its steppers do not render under a coarse pointer - PASS at all three settings, the same as 7a76b34. Seen at both heads, so not a change from this PR: with a slow CPU, a second tap that lands before the popover's first painted frame reaches the page and closes or cancels the popover (tracked separately).

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 0937e80 - iPhone 14 / iOS 26.2 Safari, normal (2 runs) and Reduce Motion (1 run), side by side with 7a76b34 - Search edge beside Go: Search takes the tap, the keyboard rises, Go 0; Pick edge beside Apply: Pick takes it, the date picker opens; the message box end by Check: Check acts once, no keyboard; Email frame edge: Email takes it, Check 0; radio row edge: the tapped option is selected; clear-button tap: the field empties, focus and keyboard stay, no other control acts - PASS, matches 7a76b34.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 0937e80 - Pixel 8 / Chrome 155, normal (2 runs) and Remove animations (1 run), side by side with 7a76b34 - the same cases as the iPhone line, plus the Popover growth shield: a drag 70 ms after the Settings tap leaves the panel growing and the popover open - PASS, matches 7a76b34. (The growth shield is not drivable on the iPhone, as before.)

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 0937e80 - Android 16 emulator, Chrome 133 + Gboard, N, S (4× CPU throttle) and R (Remove animations, reduced motion confirmed in-page) - Touch reach: a tap 2 / 4 px inside Search's, Pick's and the Email frame's edge takes that field (Go, Apply and Check 0), and the message box end by Check runs Check without focusing Email; clear button: the field empties, focus and Gboard stay, only "Clear Search" gets the click; RadioList: taps 2 px inside each option's edge and in each half of the 8 px gap select the nearer option, 4/4 - PASS at N, S and R. These cells count from takes where the load rose during the take (they test tap placement, not timing).

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 0937e80 - Android 16 emulator, Chrome 133 + Gboard, N, S and R - Popover growth shield: after a finger tap on Settings, a second tap about 80 ms later, outside or on the trigger, lands on the shield while the popover grows; the popover stays open - PASS at N, S and R (low load, page painting throughout).

  • refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 emulator side-by-side 0937e80 vs 7a76b34 (N): every Touch reach, clear-button, radio and growth-shield cell matches. Under the 4× CPU throttle the popover's first frame came 46–71 ms after the tap at 0937e80 vs 24–43 ms at 7a76b34; main alone (26–61 ms) and the head before the merge (34–58 ms) overlap that range, so it is run-to-run spread, not a change from this PR.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 c5e20f5 - iPhone 14 / iOS 26.2 Safari - (A1) Pick/Apply edge: taps 1/3/5 pt inside Pick's right edge open the date picker 6/6, Apply 0 - PASS; (A2) Search/Go edge: taps 1/3/5 pt inside the field's right edge focus it with the keyboard 6/6, Go 0 - PASS; (A3) status message by Check: a tap on the message ~6 pt from Check presses Check (Check 1, 2/2); taps on the message text and middle do nothing (4/4) - PASS; (A4) Email frame edge: right edge 1/3/5 pt keyboard 6/6, bottom edge 1/3/5 pt keyboard 3/3, Check 0 - PASS; (B) Popover tapped again while still growing (real WebKit double tap on the trigger): stays open 3/3 - PASS (positive control: a double tap on Check counts 2); (B)(a) outside tap while growing: not drivable on the iPhone; the Pixel covers it. iOS slow profile and real pen: not available on the farm.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 c5e20f5 - iPhone 14 | iOS 26.2 | Safari 26.2 | Reduce Motion on | A1 Pick/Apply edge: taps 1/3/5 pt inside Pick's right edge open the date picker 6/6, Apply 0; A2 Search/Go edge: taps 1/3/5 pt inside the field's right edge focus it with the keyboard 6/6, Go 0; A3 status message by Check: a tap on the message ~6 pt from Check presses Check 2/2, taps on the message text/middle do nothing 4/4; A4 Email frame edge: right edge 1/3/5 pt keyboard 6/6, bottom edge 1/3/5 pt keyboard 3/3, Check 0; controls Check/Apply/Go 1 each; B growth-shield double tap on the Popover trigger: stays open 3/3 | PASS

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 7a76b34 - iPhone 14 / iOS 26.2 Safari - (A1)-(A4) identical to c5e20f5 - PASS; (B) the same double tap: the popover starts growing, then closes 3/3 - FAIL (the WebKit bug c5e20f5 fixes).

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 c5e20f5 - Pixel 8 / Chrome 155 - (A) PASS; (B)(a) outside tap +120 ms into the growth: stays open 3/3; (B)(b) trigger again +120 ms: stays open 3/3; the same taps after the growth (+1.0 s) close it - PASS.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 7a76b34 - Pixel 8 / Chrome 155 - identical to c5e20f5 - PASS.

  • refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 c5e20f5 vs 7a76b34: matches except the growth-shield fix (iPhone WebKit double tap during growth: stays open at c5e20f5 vs closes at 7a76b34).

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 c5e20f5 - Android 16 emulator, Chrome 133 + Gboard, N (animation scale 1) - Touch reach: (a) a tap 2 / 4 px inside Search's right edge focuses Search, Gboard rises, Go 0 - PASS 4/4; (b) a tap 2 / 4 px inside Pick's right edge opens the Android date dialog, Apply 0 - PASS 4/4; (c) a tap 2 / 4 px inside the message box's right end on Check's line runs Check, Email doesn't focus - PASS 4/4; a tap 2 / 4 px inside the Email frame's edge focuses Email + Gboard, Check 0 - PASS 4/4. Popover growth shield (core-popover--default): after a finger tap on Settings, a tap outside ~70 ms later (mid-growth) and a tap on the trigger ~80 ms later land on the shield; the popover finishes growing and stays open - PASS 2/2 each.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 c5e20f5 - Android 16 emulator, Chrome 133 + Gboard, S (4× CPU throttle, animation scale 1) - Touch reach (a)-(c) and the Email frame as N - PASS 4/4 each; Popover growth shield: a tap outside and a tap on the trigger during the growth leave it open - PASS 2/2 each.

  • DEC-27 refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 c5e20f5 - Android 16 emulator, Chrome 133 + Gboard, R (Remove animations, animation scale 0, reduced motion confirmed in-page) - Touch reach (a) Search 2 / 4 px inside: focus + Gboard, Go 0 - PASS 4/4; (b) Pick 2 / 4 px inside: Android date dialog, Apply 0 - PASS 4/4; (c) message box right end on Check's line: Check runs, Email doesn't focus - PASS 4/4; Email frame 2 / 4 px inside: focus + Gboard, Check 0 - PASS 4/4. Popover growth shield: a tap outside and a tap on the trigger during the growth leave the popover open - PASS 2/2 each.

  • refactor(core): touch hit areas are checked at press, not watched (AST-094 FR42) #11205 emulator side-by-side c5e20f5 vs 7a76b34 (N, one take at 7a76b34): every Touch reach cell matches, and the Popover growth-shield row matches too (the WebKit input-stream fix isn't visible in Android Chrome).

  • iOS device, Safari, slow profile: not available on the device farm (its iPhones have no CPU throttling). The slow profile is covered by the Android emulator's 4× takes below.

  • iPad with a real pen: not available on the device farm (its iPads are simulators). A pen tap is covered by the unit case "checks a pen tap and a mouse click on the band too, while the primary pointer is coarse" in utils/touchHitArea.test.tsx, which sets pointerType: 'pen'; no Chromium test drives a real pen.

  • Android 16 emulator | Chrome 133 + Gboard | 7a76b34 | N (animation scale 1) | Search edge 2/4 px → focus + Gboard, Go 0 4/4; Pick edge → Android date dialog, Apply 0 4/4; message box right end by Check → Check acts, Email no focus 4/4; Email frame edge → focus + Gboard, Check 0 4/4 | PASS

  • Android 16 emulator | Chrome 133 + Gboard | 7a76b34 | S (4× CPU throttle, scale 1) | same cases, same counts | PASS

  • Android 16 emulator | Chrome 133 + Gboard | 7a76b34 | R (Remove animations on, scale 0, reduced motion confirmed) | same cases, same counts | PASS

Earlier head ab66a66 (before the pen and mouse check and the field-frame marks):

  • Android 16 emulator, Chrome 133 + Gboard, head ab66a66, animation scale 1, Touch reach: a tap 2–4 px inside the Search field's right edge (4 px from Go) focuses the field and the keyboard rises; Go's action does not run. PASS 4/4.
  • Same setup: a tap 2–4 px inside Pick's right edge (native date field) opens the Android date dialog; Apply's action does not run. PASS 4/4.
  • Same setup: a tap 2–4 px inside the Agree checkbox's right edge toggles it once; Clear's action does not run. PASS 4/4.
  • iPhone 14 | iOS 26.2 | Safari 26.2 | ab66a66 | Reduce Motion off (default) | Pick edge 1/3/5 px: date picker 6/6, Apply 0; Search edge: keyboard 8/8, Go 0; Agree edge: toggles once 6/6, Clear 0; Switch guard OK | PASS
  • Pixel 8 | Android 17 | Chrome 156.0.8078.79 | ab66a66 | animation scale 1x (animator, transition, window) | Pick edge 1/3/5 px: date dialog 6/6, Apply 0; Search edge: keyboard 6/6, Go 0; Agree edge: toggles once 6/6, Clear 0; Switch guard OK | PASS

Note: a tap on a field's own status message can focus the field. This is the browser's touch adjustment toward the nearest control within the finger's contact area, not the touch band: TextInput has no band, the press check does not run for this tap, and main does the same.

Records changed

  • spec:AST-094: FR42 (the band, a row's end slot, and the press check, with the rule "A visible box under the finger wins; the band only claims empty space."), FR43 (the hit-area phrase), the current-state impact line, DEC-20, the FR42 verification row (the three overlap cases), and new DEC-33 (owner decision, 2026-11-10), which also names the five internal exports the press check shares across component folders (HitAreaGroupContext, touchTargetRect, distanceTo, BAND_ON_DESCENDANT, targetUnderFinger) and why the hook and the styles do not cover them. They replace the page-watch exports: utils/hitArea.ts goes from 15 exports to 6, PressGroupBandContext becomes HitAreaGroupContext, and Button/buttonHitArea.ts is deleted. Internal exports go −15 / +5 across the changed modules: utils/hitArea.ts −11 (+2), Button/buttonHitArea.ts −2, hooks/pressGroupContext.ts −1 (+1), hooks/useGroupPressTracking.ts −1, utils/touchHitArea.ts +2 (BAND_ON_DESCENDANT, and targetUnderFinger, which the group press tracking runs before it claims a press). The two new private-attribute owner modules, privateAttributes/grownHitInput.stylex.ts and privateAttributes/fieldFrame.stylex.ts, add 2 owner exports each (the props and the reader).
  • component:List: FR10 (a tap on another target's box stays that target's; end-slot controls grow no taller), FR11 (rows isolate under a finger), and the divider note.
  • component:InfoTip: PR1, AR1 and the verification row. component:StatusDot: PR1, AR2 and the verification row. Both: a tap on another target's box stays that target's.
  • component:Switch: FR10 (no taller in a List row's end slot), its verification row, its rationale, and the ownership line for the grown-hit-input marker.
  • Fourteen component records get an ownership line each for the field-frame marker, written only through privateAttributes/fieldFrame.stylex.ts:
    • component:TextInput, component:TextArea, component:NumberInput, component:Typeahead, component:PowerSearch: their frame.
    • component:DateInput, component:TimeInput: their frame on every surface (pointer, touch sheet and native).
    • component:DateTimeInput: its date and time frames on every surface.
    • component:DateRangeInput: its frame, whose tap goes to the entry nearest the finger.
    • component:Tokenizer: its frame, its sheet field and its unfocused-layer field.
    • component:Selector: the field box of its panel search field (PanelSearchInput, which Tokenizer's sheet also renders).
    • component:ChatComposer: its body.
    • component:FileInput: its drop zone.
    • component:FieldLabel: a description that focuses its control.
  • component:CheckboxInput: FR14 (the FR42 wording: a visible box wins, the nearest box in empty space) and its verification row.
  • component:RadioListItem: FR13 (half the gap toward the next option, plus the FR42 wording) and its verification row.
  • component:ToggleButtonGroup: compatibility, PR1 (including the press's one extra read of the toggle it lands on, for the band check), and the PR1 verification row. component:ButtonGroup: compatibility.
  • component:Button: the FR42 verification row.
  • architecture:react-component-runtime: the entry shrinks to "the touch hit area's press-time check".

Writing rubric results

  • R1 narration: none found in the changed lines. The edited claims state the system in the present tense.
  • R2 research in the record: none. The perf traces stay in this description.
  • R3 evidence naming a change: none. The verification rows name tests and stories, not this change.
  • R4 rejected alternatives over one line or outside a decision: one, the watched-insets approach, kept as a single "Rejected" line inside DEC-33.
  • R5 pull request or issue references remaining: none in records.
  • R6 ruled open questions still listing options: none.
  • R7 project status: two found, both in StatusDot: the "not yet built" gap, restated as "AR2 gap: a standalone dot with a tooltip has no band", and the FR5 verification row's "Once FR5 is built, … fails", restated as a present gap (StatusDot does not render the FR5 standalone toggle, so no case covers it).

Scope

Components: Button, ButtonGroup, ToggleButtonGroup, SegmentedControl, List, ListItem, Item, RadioList, RadioListItem, CheckboxInput, InfoTip, Switch, InputClearButton (Field), ListReorderHandle; the 14 field components that mark their box: TextInput, TextArea, NumberInput, DateInput, TimeInput, DateTimeInput, DateRangeInput, Typeahead, Tokenizer, PowerSearch, PanelSearchInput (Field), ChatComposer, FileInput, FieldLabel (Field); utils/hitArea, utils/touchHitArea, utils/inputStream (pointer events only feed its last pointer, mouse point and down presses), internal/touchHitArea.stylex, privateAttributes/grownHitInput.stylex, privateAttributes/fieldFrame.stylex; lab PageControl (tests only)

  • This PR has one primary intent.
  • Independently removable deltas were removed or split.
  • Public text and artifacts contain no internal Meta context.

New public API: none. The room variables are private (--_hit-*), and the two new data attributes, data-astryx-grown-hit-input and data-astryx-field-frame, are private, each with a single owner module (architecture:public-component-api INV23).

Testing

pnpm vitest run <affected folders> scripts/shared-identity.test.mjs scripts/build-css.test.mjs
pnpm -F @astryxdesign/core typecheck && pnpm -F @astryxdesign/lab typecheck
ASTRYX_STORYBOOK_DIR=<branch build> playwright test --config playwright.interaction.config.ts --project chromium <specs above>
pnpm check:knowledge && pnpm specs:for --diff origin/main && pnpm review:pre

The perf traces come from a script that loads each static build, flings, taps, and counts reads, observers and forced layouts by their script stack.

@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 27, 2026 6:22am 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
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review 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 27, 2026, 6:58 AM UTC

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

github-actions Bot commented Nov 11, 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 a spec decision and two required changes.

Spec decision needed. This change intentionally replaces current spec:AST-094 FR42 ("a hit-area expansion never overlaps a neighboring interactive element's own target … clamped to half the gap") with overlapping touch bands where a tap nearer the control underneath does nothing, and it rewrites the matching Switch FR10, List FR10/FR11, ToggleButtonGroup PR1 and InfoTip AR1 clauses with a new DEC-32. An engineering owner needs to approve or reject that direction, including that a tap on an earlier control's own visible edge can do nothing, by commenting /approve-spec <full head SHA>; the author may record it as an engineering owner.

Required changes:

  • A neighbouring Switch is measured by its 44 px grown input (packages/core/src/utils/touchHitArea.ts:74-78), so a tap 1 px from a button and 3 px from a Switch's track does nothing; measure the Switch by its track and add a test of a control beside a Switch.
  • The change is 6,826 authored lines with no size exemption that applies, so once FR42 and DEC-32 are approved, state why the replaced watcher's deletion cannot land separately, or split it out.

Automated review (maintainer link)

Comment thread packages/core/src/utils/touchHitArea.ts Resolved

@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 a spec decision and four required changes.

Spec decision needed. This change intentionally replaces current spec:AST-094 FR42 ("a hit-area expansion never overlaps a neighboring interactive element's own target … clamped to half the gap") with overlapping touch bands, where a tap on another control's visible box goes to that control and a tap where two bands overlap goes to the band painted on top, and it rewrites the matching Switch FR10, List FR10/FR11, ToggleButtonGroup PR1 and InfoTip AR1 clauses with a new DEC-32. An engineering owner needs to approve or reject that direction by commenting /approve-spec <full head SHA>; the author may record it as an engineering owner.

Required changes:

  • A Switch's invisible 44 px input counts as its visible box (packages/core/src/utils/touchHitArea.ts:87), so a tap 1 px before a button beside it and 3 px from the track turns the Switch on; judge a Switch by its track and add an inline-axis test of a control beside a Switch.
  • Regression: the changeset says a tap on a band nearer a neighbouring control does nothing (.changeset/hit-area-checked-at-press.md:5), but at this head such a tap goes to the control whose box is under the finger or to the band painted on top, so the release note needs to say that.
  • Found by CI: the lint job fails because internal/eslint-plugin-astryx/no-comment-provenance.baseline.json still lists packages/core/src/utils/hitArea.ts, so rerun node internal/eslint-plugin-astryx/no-comment-provenance.baseline.mjs and commit its one-entry change.
  • The change is 7,083 authored lines with no size exemption that applies, so once FR42 and DEC-32 are approved, state why the replaced watcher's deletion cannot land separately, or split it out.

Automated review (maintainer link)

Comment thread packages/core/src/utils/touchHitArea.ts Resolved
Comment thread .changeset/hit-area-checked-at-press.md Resolved
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec fb1ddc8

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec c8b9a6a

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 7aaf6ec

@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: the press-time hit check holds up in code and the records are owner-approved at this head, but Pagination's dots, one record table and the description need fixes, and the device takes must be redone at this head.

Blocking

  • component:Pagination FR9 requires each dot's coarse-pointer hit area to stay within half the gap between dots, but the dots take the default 22 px band with no group room (Pagination/Pagination.tsx:849), so each band covers the previous dot and the dots' coarse audit case in PaginationAudit.a11y.chromium.spec.ts cannot pass; give the dot row touchHitAreaStyles.inlineGroupSpacing1 and each dot touchHitAreaStyles.member, and update the comment at lines 572-573.
  • The re-padded Value row in docs/specs/components/ToggleButton/ToggleButtonGroup.spec.md (line 101) lost the escape in `string \| null`, so the row has nine cells under an eight-cell header and every later column shifts.
  • spec:AST-094 DEC-27 needs iPhone Safari and Android results at this head or later, covering the touch-reach set, the group fix and the fixed Pagination dots, stated in Device results with the head each ran at, because DEC-31 carries none of the earlier takes.
  • The description is out of date at this head: the two modules are 213 + 290 = 503 lines (not 355, from 1,769 at the base, not 1,647), the totals are 4,000 added and 5,999 removed in 124 files, utils/hitArea.ts has 9 exports, Device results names an earlier merge as the current head, and the R7 line quotes StatusDot AR2 wording this head's merge changed.

Non-blocking: this head's StatusDot conflict resolution dropped AR2's "AR2 gap:" label (line 184), the reorder handle's band now reaches past its list's first and last rows, and DEC-33's "measured at the press's click" does not name the groups' press-start check. The next head needs its own /approve-spec from an engineering owner.

Claims and files checked

Review mode: same-head; reason: none

  • Changeset: hit areas no longer watch the page, the band grows toward 44 px in CSS, nothing measures before a press, a visible box wins and the nearest box takes empty space, an end-slot control grows no taller — verified (utils/touchHitArea.ts:216-256, internal/touchHitArea.stylex.ts:38-108, Item/Item.tsx:1011); a group's members share the gap — verified for the listed groups, false for Pagination's dots (blocking above).
  • Before a press nothing reads layout or observes — verified (the press subscriber reads containment, then the coarse-pointer query, utils/touchHitArea.ts:220-224).
  • A band tap reads the host's box and asks once what lies under the finger — verified, plus one box and one style read per candidate (utils/touchHitArea.ts:140-175, :93-125).
  • ButtonGroup, ToggleButtonGroup, SegmentedControl, List rows, RadioList and the reorder hint split their gap — verified (group room styles on each root, member on each member).
  • InfoTip grows no room sideways — verified (InfoTip/InfoTip.tsx:213).
  • A visible box under the finger wins, else the nearest box; a grown hit input counts by its parent — verified (utils/touchHitArea.ts:58-60, :156-175).
  • The hand-off focuses, clicks and opens a picker — verified (utils/touchHitArea.ts:189-201).
  • Fourteen field components mark their frame; a tied label is a target; a status message is empty space — verified (18 field files spread the mark; label[for] in utils/hitArea.ts:191).
  • ButtonGroup and ToggleButtonGroup leave a band press over an outside control — verified (hooks/useGroupPressTracking.ts:83-92).
  • The input stream records pointer data from pointer events only — verified (utils/inputStream.ts:312-318).
  • No module-level state, and the 15 baseline entries are removed — verified.
  • Swipe rows are no longer raised and banded rows isolate — verified (List/ListItem.tsx, internal/touchHitArea.stylex.ts:39).
  • The caller API keeps its shape and growth is gone — verified.
  • No new public API — verified from source (internal entries and private attributes only).
  • The Lightbox spec probes the toggle's 44 px square — verified.
  • The press check reads the pointer query only for a press inside its host — verified (utils/touchHitArea.ts:220-224).
  • The two modules total 355 lines, down from 1,647 — false (503 at this head, from 1,769 at the base).
  • 3,544 added and 5,288 removed in 118 files; utils/hitArea.ts has 6 exports — false (4,000 and 5,999 in 124 files; 9 exports).
  • The current head named in Device results, and the R7 quote of StatusDot AR2 — false at this head.
  • Device takes at this head — listed as pending; required (blocking above).
  • DEC-33 measures neighbours only at the click — the two groups also read when a press begins (non-blocking wording).
  • Performance traces, bundle sizes, red-first runs and earlier device takes — not re-run here.
  • Files: Press check, band, input stream, group tracking (utils/touchHitArea.ts, utils/hitArea.ts, internal/touchHitArea.stylex.ts, utils/inputStream.ts, hooks/useGroupPressTracking.ts, hooks/pressGroupContext.ts, utils/sharedMutationObserver.ts) — clear.
  • Files: The two new private-attribute owners — clear (named by records approved at this head).
  • Files: 24 component callers and docs (Button, ButtonGroup, ToggleButton, ToggleButtonGroup, SegmentedControl, List, ListItem, ListReorderHandle, the reorder engine, Item, RadioList, RadioListItem, CheckboxInput, InfoTip, Switch, InputClearButton, travelling.stylex.ts, the deleted buttonHitArea.ts, four .doc.mjs files) — clear.
  • Files: 18 field components spreading the mark — clear.
  • Files: 25 records and the changeset — approved at this head; ToggleButtonGroup table blocking; StatusDot AR2 label non-blocking.
  • Files: 45 tests and stories — read at case level, not run; the Pagination audit case blocking, the rest clear.
  • Files: Two baselines — clear.

Automated review (maintainer link)

| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |
| ----------- | ------------------------ | -------------------------------- | ----------------------------------------- | ----------------- | ----------------------------- | ----------------------------- | ------------------------------------------------------------------------ |
| Type | `single`, `multiple` | How many members may be pressed. | Always; fixes the `value` shape. | `single` | `component:ToggleButtonGroup` | Stable | TypeScript rejects a `value` or `onChange` that does not match the type. |
| Value | `string \ | null`, `string[]` | The selected member values. | Always; required. | required | `component:ToggleButtonGroup` | Stable | A value no member carries selects nothing visible. |

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.

The re-padded Value row lost the escape in string \| null, so this row has nine cells under an eight-cell header and every later column shifts ("null, string[]" lands under Meaning). Restore `` string | null``, asmain` has it.

{timeout: 5000},
);
const rest = await dots(page);
const above = await dotAt(page, 2, 0, -12);

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.

With this change Pagination's dots take the default 22 px band and no group room (Pagination/Pagination.tsx:849), so dot 4's band covers dot 3's centre and the points 12 px above and below it, and dot 5's band covers the point 1 px past its end: these probes hit dots 4 and 5, not 3, and the case fails. component:Pagination FR9 still requires the half-gap clamp. Give the dot row touchHitAreaStyles.inlineGroupSpacing1 and each dot touchHitAreaStyles.member, as RadioList and SegmentedControl do.

Comment on lines +184 to +185
box stays that target's (`spec:AST-094` FR42). Implementation gap: a
standalone dot with a tooltip has no band. A caller `tabIndex`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking: the merge's conflict resolution changed "AR2 gap:" to "Implementation gap:", so the sentence no longer names the clause it is a gap against, and the description's R7 line still quotes the old wording. Suggested: "AR2 gap: a standalone dot with a tooltip has no band."

This branch was successfully deployed

1 active deployment
Preview — 7aaf6ec5 Deployed Nov 27, 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-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. lane:1 Astryx fix-loop lane 1 owns this needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant