Skip to content

feat(NumberInput): a held stepper keeps stepping on a steady ramp and commits once, at the release - #8205

Draft
vjeux wants to merge 1947 commits into
meta:mainfrom
vjeux:uikit/c04-stepper-hold
Draft

vjeux wants to merge 1947 commits into
meta:mainfrom
vjeux:uikit/c04-stepper-hold

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8336, #8173 and #8241. Review only this PR's change: vjeux/astryx@f9728e6...699d690

User need

In a phone browser, holding a NumberInput's + or − does nothing; each step needs its own tap. A native iOS stepper keeps stepping, faster and faster, while held.

What led to it: Astryx's touch-presentation work (spec:AST-094) matches its components to native iOS controls on phones. Recording UIKit's stepper on the iOS simulator gave its timing, and the owner asked for the same hold with a mouse (item 3).

Design and alternatives

  • Step at touch-down: a scroll that starts on a stepper would step, and native controls act at the lift.
  • Call onChange on every step: a parent that clamps or validates the value fights the repeat.
  • Chosen: a tap steps once, at the lift; a hold steps after half a second, then faster, down to every 50 ms, as iOS does, and follows the finger between halves. The field shows each step; onChange fires once, at the release. A held finger selects no text; a drag from a stepper still scrolls.

iOS's exact acceleration isn't public, so the fitted ramp (250 ms, each step 10% sooner) and keeping a press alive within 70 px are proposed for owner review. Known gap: each half stays 15 × 14.5 px, under WCAG's 24 px; #8218 makes it 47 × 32 px on phones.

Current specification

spec:AST-094 FR1, FR2, FR11, FR16, FR18–FR21, FR24, FR41 as written before FR43 (#8680 follows FR43); component:NumberInput FR4, amended here. Public-API gap (spec:AST-107 FR7): the internal press tracker and timing tables.

Public delta and caller burden

No API change; the keyboard, the wheel and screen readers are unchanged.

Testing

On a phone, open Storybook's NumberInput "With number steppers" story:

  1. Tap +. It steps once.
  2. Hold + for two seconds. The value climbs, slowly then faster, and settles when you lift; no text gets selected.
  3. Hold +, then slide onto −. It counts down instead.
  4. Drag up starting on +. The page scrolls; the value stays.

With a mouse, holding + repeats the same way. Unit tests run these rules on a fake clock, and browser tests replay real touches in Chromium and WebKit. Two node checks fail through this stack's bases, not this change: a bundle check that #8671 replaces, and a List row check that #8085 fixes. These local checks are the evidence; no CI run is expected.

Evidence

Recorded on the iOS 26.2 simulator and the Android emulator.

Safari
Safari, more paths
Android Chrome

Size (the PR size report's measure, gzip): NumberInput 57.3 → 76.6 KB, CSS +34 B.

Scope

  • 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.

Writing rubric results

R1 narration, R2 research, R4–R6: none in the amended rows. R3 evidence: FR4 cites UIStepper's 0.5 s delay and 50 ms floor, measured on the iOS 26.2 simulator, and current tests.

@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 Oct 30, 2026 12:05am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 30, 2026, 12:38 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
@vjeux
vjeux force-pushed the uikit/c04-stepper-hold branch from bd65b4e to c76f574 Compare October 24, 2026 11:01
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Modified Components

CheckboxInput (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 478B 478B 0B
Lines of Code 355 357 -
Complexity Very High Very High (41) -
Item (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 284B 284B 0B
Lines of Code 1372 1377 -
Complexity Very High Very High (122) -
NumberInput (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 502B 502B 0B
Lines of Code 1144 1707 -
Complexity Very High Very High (266) -
TreeList (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 648B 648B 0B
Lines of Code 872 878 -
Complexity Very High Very High (100) -

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/AlertDialog 56.9KB 57.3KB +468B 12.4KB 12.5KB +36B
core/AppShell 57.9KB 58.3KB +390B 11.6KB 11.7KB +35B
core/AspectRatio 3.7KB 3.8KB +66B 3.5KB 3.5KB +53B
core/Avatar 37.5KB 37.5KB +54B 6.3KB 6.3KB +35B
core/AvatarGroup 39.8KB 39.8KB +50B 6.4KB 6.5KB +35B
core/AvatarGroupOverflow 39.9KB 40.4KB +465B 6.4KB 6.4KB +36B
core/AvatarStatusDot 7.1KB 7.1KB +61B 3.4KB 3.5KB +53B
core/Badge 3.9KB 4.0KB +64B 3.8KB 3.9KB +52B
core/Banner 47.8KB 48.3KB +452B 9.9KB 10.0KB +35B
core/BaseTypeahead 54.3KB 54.7KB +395B 9.9KB 9.9KB +35B
core/Blockquote 3.5KB 3.6KB +66B 3.4KB 3.4KB +52B
core/BottomSheet 34.0KB 34.0KB +69B 7.9KB 7.9KB +35B
core/BottomSheetSwitcher 14.8KB 14.8KB +67B 3.3KB 3.3KB +54B
core/BreadcrumbItem 66.4KB 67.3KB +929B 11.0KB 11.4KB +423B
core/Breadcrumbs 22.4KB 22.5KB +71B 3.3KB 3.3KB +53B
core/Button 43.3KB 43.7KB +447B 9.2KB 9.2KB +34B
core/ButtonGroup 8.4KB 8.5KB +67B 3.3KB 3.3KB +52B
core/Calendar 54.9KB 55.4KB +463B 10.0KB 10.0KB +35B
core/Card 6.4KB 6.5KB +66B 6.3KB 6.4KB +57B
core/Carousel 50.2KB 50.7KB +471B 10.2KB 10.2KB +34B
core/Center 4.2KB 4.2KB +63B 4.6KB 4.6KB +56B
core/ChatComposer 60.6KB 61.1KB +454B 10.8KB 10.9KB +33B
core/ChatComposerDrawer 23.9KB 23.9KB +66B 4.5KB 4.6KB +52B
core/ChatComposerInput 55.7KB 56.2KB +438B 10.1KB 10.1KB +35B
core/ChatComposerTokenElement 55.7KB 56.2KB +438B 10.1KB 10.1KB +35B
core/ChatDictationButton 46.5KB 46.9KB +436B 9.5KB 9.5KB +33B
core/ChatLayout 48.8KB 49.3KB +443B 9.9KB 10.0KB +33B
core/ChatLayoutScrollButton 46.4KB 46.8KB +421B 9.6KB 9.6KB +33B
core/ChatMessage 23.1KB 23.1KB +59B 3.5KB 3.6KB +52B
core/ChatMessageBubble 7.0KB 7.1KB +65B 3.6KB 3.6KB +55B
core/ChatMessageList 28.9KB 29.0KB +71B 7.8KB 7.8KB +34B
core/ChatMessageMetadata 25.8KB 25.9KB +60B 3.9KB 3.9KB +36B
core/ChatSendButton 45.8KB 46.3KB +438B 9.2KB 9.2KB +34B
core/ChatSystemMessage 6.7KB 6.8KB +71B 3.7KB 3.7KB +51B
core/ChatTokenizedText 6.9KB 7.0KB +63B 3.9KB 3.9KB +53B
core/ChatToolCalls 31.9KB 31.9KB +65B 8.9KB 8.9KB +35B
core/CheckIndicator 9.0KB 9.1KB +68B 3.6KB 3.6KB +52B
core/CheckboxIndicator 4.1KB 4.1KB +65B 3.8KB 3.8KB +34B
core/CheckboxInput 49.9KB 50.5KB +579B 9.3KB 9.4KB +75B
core/CheckboxList 46.0KB 46.1KB +63B 8.1KB 8.2KB +35B
core/CheckboxListItem 54.0KB 55.2KB +1.1KB 10.5KB 11.1KB +643B
core/Citation 25.9KB 26.0KB +69B 4.1KB 4.2KB +54B
core/ClickableCard 12.8KB 13.3KB +470B 6.9KB 7.0KB +55B
core/Code 3.5KB 3.6KB +63B 3.4KB 3.4KB +54B
core/CodeBlock 60.5KB 61.0KB +454B 10.7KB 10.7KB +40B
core/Collapsible 11.7KB 12.1KB +452B 4.2KB 4.3KB +53B
core/CollapsibleGroup 6.4KB 6.4KB +70B 3.2KB 3.2KB +52B
core/CommandPalette 50.9KB 51.3KB +444B 11.8KB 11.9KB +36B
core/CommandPaletteEmpty 6.1KB 6.2KB +64B 3.3KB 3.4KB +55B
core/CommandPaletteFooter 23.3KB 23.3KB +68B 3.5KB 3.6KB +52B
core/CommandPaletteGroup 3.5KB 3.5KB +64B 3.3KB 3.4KB +52B
core/CommandPaletteInput 32.3KB 32.4KB +60B 8.1KB 8.2KB +34B
core/CommandPaletteItem 8.4KB 8.9KB +449B 3.5KB 3.5KB +53B
core/CommandPaletteList 22.4KB 22.5KB +65B 3.3KB 3.3KB +54B
core/ComplexSelector 55.8KB 56.3KB +484B 10.6KB 10.7KB +35B
core/ContextMenu 77.7KB 78.8KB +1.1KB 14.6KB 15.3KB +653B
core/ContextMenuItem 16.6KB 17.4KB +888B 5.2KB 5.6KB +431B
core/DateInput 99.9KB 100.2KB +374B 14.8KB 14.8KB +33B
core/DateRangeInput 69.4KB 69.8KB +427B 11.2KB 11.2KB +35B
core/DateTimeInput 110.1KB 110.5KB +395B 15.2KB 15.3KB +34B
core/Dialog 16.2KB 16.3KB +64B 7.1KB 7.1KB +36B
core/DialogHeader 48.8KB 49.3KB +452B 9.8KB 9.8KB +33B
core/Divider 6.5KB 6.5KB +64B 3.6KB 3.6KB +56B
core/Drawer 31.6KB 31.7KB +85B 8.0KB 8.1KB +34B
core/DrawerHeader 48.9KB 49.3KB +424B 11.2KB 11.3KB +35B
core/DropdownMenu 72.7KB 73.6KB +971B 14.7KB 15.4KB +648B
core/DropdownMenuCheckboxItem 16.1KB 17.0KB +900B 5.6KB 6.0KB +414B
core/DropdownMenuDivider 6.6KB 6.6KB +61B 3.6KB 3.6KB +55B
core/DropdownMenuGroup 6.1KB 6.1KB +69B 3.3KB 3.3KB +52B
core/DropdownMenuItem 15.4KB 16.3KB +898B 5.2KB 5.6KB +432B
core/DropdownMenuRadioGroup 6.0KB 6.1KB +62B 3.2KB 3.3KB +56B
core/DropdownMenuRadioItem 16.2KB 17.1KB +886B 5.6KB 6.0KB +414B
core/DropdownMenuSubMenu 58.1KB 59.0KB +895B 9.5KB 9.9KB +419B
core/EmptyState 7.7KB 7.8KB +64B 3.5KB 3.6KB +55B
core/Field 44.2KB 44.3KB +71B 8.0KB 8.0KB +35B
core/FieldLabel 39.8KB 39.8KB +56B 6.5KB 6.6KB +35B
core/FieldStatus 10.4KB 10.5KB +74B 4.2KB 4.3KB +36B
core/FileInput 54.1KB 54.5KB +412B 10.3KB 10.4KB +36B
core/FormLayout 6.3KB 6.3KB +66B 3.4KB 3.4KB +53B
core/Grid 4.3KB 4.4KB +67B 3.7KB 3.7KB +53B
core/GridSpan 3.4KB 3.5KB +63B 3.2KB 3.3KB +53B
core/HStack 7.3KB 7.3KB +62B 4.9KB 5.0KB +57B
core/Heading 9.1KB 9.2KB +64B 6.8KB 6.8KB +36B
core/HoverCard 17.2KB 17.2KB 0B 4.9KB 4.9KB +13B
core/Icon 8.8KB 8.9KB +60B 3.6KB 3.6KB +52B
core/IconButton 43.3KB 43.8KB +453B 9.2KB 9.2KB +34B
core/InputGroup 44.8KB 44.9KB +61B 8.0KB 8.1KB +35B
core/InputGroupText 6.3KB 6.4KB +66B 3.7KB 3.8KB +54B
core/Item 11.4KB 12.4KB +1.0KB 4.7KB 5.1KB +435B
core/Kbd 6.7KB 6.7KB +67B 3.5KB 3.5KB +53B
core/LayerProvider 63.3KB 63.8KB +480B 10.1KB 10.1KB +36B
core/Layout 8.1KB 8.2KB +65B 5.5KB 5.6KB +56B
core/LayoutContent 7.4KB 7.5KB +66B 4.9KB 5.0KB +56B
core/LayoutFooter 7.3KB 7.4KB +68B 4.8KB 4.9KB +54B
core/LayoutHeader 7.4KB 7.4KB +65B 4.8KB 4.9KB +55B
core/LayoutPanel 7.6KB 7.6KB +68B 4.8KB 4.9KB +56B
core/Lightbox 51.2KB 51.6KB +424B 9.8KB 9.8KB +34B
core/Link 43.5KB 43.9KB +453B 7.6KB 7.6KB +38B
core/List 6.7KB 6.8KB +59B 3.4KB 3.5KB +52B
core/ListItem 53.5KB 54.5KB +1.0KB 10.5KB 11.1KB +643B
core/Markdown 144.5KB 145.6KB +1.1KB 17.4KB 18.0KB +651B
core/MetadataList 23.1KB 23.2KB +67B 3.6KB 3.7KB +54B
core/MetadataListItem 6.5KB 6.5KB +65B 3.4KB 3.4KB +56B
core/MobileNav 51.0KB 51.4KB +402B 10.1KB 10.1KB +34B
core/MobileNavToggle 46.2KB 46.6KB +426B 9.4KB 9.4KB +34B
core/MoreMenu 72.9KB 73.8KB +956B 14.7KB 15.4KB +648B
core/MultiSelector 76.2KB 76.8KB +609B 14.6KB 14.7KB +72B
core/NavHeadingMenu 8.9KB 9.0KB +65B 3.2KB 3.3KB +55B
core/NavIcon 3.4KB 3.5KB +63B 3.3KB 3.3KB +55B
core/NumberInput 55.7KB 75.9KB +20.3KB ⚠️ 10.7KB 10.7KB +44B
core/Outline 28.6KB 29.1KB +452B 4.0KB 4.1KB +53B
core/OverflowList 8.5KB 8.6KB +67B 3.5KB 3.6KB +53B
core/Overlay 19.5KB 19.6KB +55B 3.8KB 3.9KB +30B
core/Pagination 87.7KB 108.4KB +20.6KB ⚠️ 15.3KB 15.7KB +407B
core/Popover 49.8KB 50.2KB +400B 12.1KB 12.1KB +33B
core/PowerSearch 155.1KB 175.7KB +20.7KB ⚠️ 18.6KB 19.0KB +416B
core/ProgressBar 7.7KB 7.8KB +66B 6.6KB 6.6KB +32B
core/RadioIndicator 3.8KB 3.9KB +62B 3.7KB 3.7KB +33B
core/RadioList 45.6KB 45.7KB +101B 8.0KB 8.1KB +57B
core/RadioListItem 52.1KB 53.2KB +1.0KB 9.7KB 10.2KB +481B
core/ResizeHandle 25.1KB 25.2KB +73B 3.9KB 3.9KB +52B
core/ScrollableArea 10.4KB 10.4KB 0B 4.3KB 4.3KB +13B
core/Section 7.5KB 7.6KB +68B 6.2KB 6.2KB +56B
core/SegmentedControl 38.8KB 38.9KB +73B 6.3KB 6.4KB +35B
core/SegmentedControlItem 8.6KB 9.0KB +448B 3.9KB 3.9KB +53B
core/SelectableCard 12.8KB 13.2KB +464B 7.1KB 7.2KB +58B
core/Selector 79.1KB 80.0KB +933B 15.0KB 15.4KB +415B
core/SelectorOption 14.5KB 15.5KB +1.0KB 5.1KB 5.5KB +433B
core/SideNav 58.0KB 58.4KB +421B 10.6KB 10.6KB +33B
core/SideNavCollapseButton 46.6KB 47.1KB +425B 9.5KB 9.5KB +33B
core/SideNavHeading 54.7KB 55.1KB +416B 10.1KB 10.2KB +35B
core/SideNavItem 54.5KB 54.9KB +426B 10.1KB 10.1KB +35B
core/SideNavSection 6.5KB 6.6KB +59B 3.6KB 3.6KB +51B
core/Skeleton 3.8KB 3.8KB +60B 3.6KB 3.7KB +36B
core/Slider 48.5KB 48.5KB +58B 8.5KB 8.6KB +32B
core/Spinner 26.3KB 26.4KB +58B 7.5KB 7.6KB +32B
core/Stack 7.1KB 7.1KB +62B 4.9KB 5.0KB +57B
core/StackItem 6.0KB 6.1KB +63B 3.3KB 3.3KB +51B
core/StatusDot 19.0KB 19.0KB +59B 6.2KB 6.2KB +32B
core/Step 32.4KB 32.9KB +453B 5.3KB 5.4KB +35B
core/Stepper 47.4KB 47.8KB +416B 9.6KB 9.6KB +33B
core/Switch 48.4KB 48.9KB +459B 9.3KB 9.4KB +34B
core/Tab 9.7KB 10.2KB +472B 4.1KB 4.1KB +54B
core/TabList 40.2KB 40.3KB +63B 7.2KB 7.2KB +35B
core/TabMenu 51.6KB 52.0KB +438B 10.0KB 10.0KB +34B
core/Table 84.0KB 85.0KB +1.1KB 15.1KB 15.8KB +640B
core/TableBody 3.3KB 3.3KB +63B 3.2KB 3.2KB +53B
core/TableCell 78.8KB 79.9KB +1.1KB 14.8KB 15.5KB +641B
core/TableFooter 3.3KB 3.3KB +63B 3.2KB 3.2KB +53B
core/TableHeader 3.3KB 3.3KB +63B 3.2KB 3.2KB +53B
core/TableHeaderCell 78.6KB 79.7KB +1.1KB 14.8KB 15.4KB +654B
core/TableRow 6.2KB 6.3KB +66B 3.5KB 3.6KB +54B
core/TableSelectionToolbar 52.4KB 52.8KB +457B 11.2KB 11.2KB +34B
core/Text 8.6KB 8.6KB +66B 6.8KB 6.8KB +36B
core/TextArea 49.4KB 49.5KB +68B 9.4KB 9.4KB +33B
core/TextInput 53.5KB 54.0KB +455B 10.5KB 10.5KB +35B
core/Thumbnail 50.7KB 51.1KB +461B 11.0KB 11.0KB +38B
core/TimeInput 86.8KB 87.3KB +442B 13.8KB 13.8KB +34B
core/Timer 9.2KB 9.3KB +70B 6.8KB 6.8KB +36B
core/Timestamp 27.5KB 27.6KB +76B 9.5KB 9.6KB +34B
core/Toast 59.8KB 60.3KB +424B 9.7KB 9.7KB +35B
core/ToggleButton 44.1KB 44.5KB +415B 9.3KB 9.3KB +34B
core/ToggleButtonGroup 6.3KB 6.4KB +68B 3.2KB 3.3KB +55B
core/Token 29.6KB 30.1KB +463B 4.5KB 4.5KB +55B
core/Tokenizer 64.8KB 65.3KB +486B 11.7KB 11.8KB +34B
core/Toolbar 39.8KB 39.8KB +63B 7.7KB 7.8KB +59B
core/Tooltip 16.8KB 16.8KB 0B 4.9KB 4.9KB +13B
core/TopNav 51.9KB 52.3KB +424B 10.4KB 10.4KB +35B
core/TopNavHeading 54.2KB 54.5KB +396B 9.9KB 10.0KB +33B
core/TopNavItem 9.0KB 9.5KB +455B 3.8KB 3.9KB +52B
core/TopNavMegaMenu 54.2KB 54.6KB +443B 10.8KB 10.9KB +36B
core/TopNavMegaMenuFeaturedCard 6.7KB 6.8KB +66B 3.4KB 3.5KB +51B
core/TopNavMegaMenuItem 9.1KB 9.6KB +456B 4.1KB 4.1KB +51B
core/TopNavMenu 53.6KB 54.0KB +421B 10.1KB 10.1KB +36B
core/TreeList 32.5KB 33.5KB +984B 4.7KB 5.1KB +436B
core/Typeahead 61.5KB 61.9KB +451B 11.3KB 11.3KB +35B
core/TypeaheadItem 6.2KB 6.3KB +60B 3.4KB 3.5KB +52B
core/VStack 7.3KB 7.3KB +61B 4.9KB 5.0KB +57B

Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included.

⚠️ Touch-only size budget

These components grew past the touch-only budget (2 KB gzip JavaScript or 1 KB gzip CSS per component). If the growth runs only on a coarse pointer, load its JavaScript lazily so the import does not carry it, or justify the cost in the pull request description; CSS stays in the package stylesheet, so justify it.

Component JavaScript CSS
core/NumberInput +20.3KB ⚠️ +44B
core/Pagination +20.6KB ⚠️ +407B
core/PowerSearch +20.7KB ⚠️ +416B

Bundle Size Summary

Gzip figures measure each package's entry file, not the code an import pulls in.

Package Entry (ESM) Entry gzip before Entry gzip after Delta
@astryxdesign/core 4.9KB 1.2KB 1.2KB 0B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 34.6KB 35.2KB +685B

Accessibility Audit

Status: 4 accessibility violation(s) found — 4 serious.

Checkbox pattern - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 1/25 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
CheckboxList - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 3/19 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
Radio group pattern - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 3/11 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
RadioList - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 3/14 stories · Learn more
    • WCAG: 1.4.3 (Level AA)

Visual Regression

55 of 504 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 753,933
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,072
RichTextEditor Markdown parity: side by side probe dark 558,840
RichTextEditor Markdown parity: side by side probe light 540,756
Chat Full AI Chat probe light 230,823
Chat Full AI Chat probe dark 229,805
AppShell With Mobile Nav probe light 217,010
AppShell With Mobile Nav probe dark 216,960
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
AppShell Playground neutral dark 65,198
AppShell Playground neutral light 63,788
Chat Default neutral dark 36,304
Chat Default neutral light 35,767
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232

and 35 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This needs an engineering owner's decision before it can be approved, and it needs changes either way. The stepper hold and a held stepper calling onChange on every step rest only on the draft spec:AST-094 (FR1, FR2, FR11, FR16, FR20 and FR21); an engineering owner records approval of those claims by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Independently, please:

  • land the stacked predecessors first (or rebase onto them) so this pull request carries only its own 1,721-line commit instead of 26,788 lines;
  • attach the stepper column's press tracker whenever that node is created or replaced, because steppers shown after mount never get the hold;
  • stop the stepper's click guard from dropping a detail === 0 activation after a touch press that ended without a click.

[Automated review]

Comment on lines +937 to +943
if (
(pointerType === 'touch' || pointerType === 'pen') &&
stepperTrackedPressRef.current
) {
stepperTrackedPressRef.current = false;
return;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Both refs are set at touch-down and cleared only here, by a click. A hold in Chromium, a slide off the column or a scroll ends with no click, so the next click with detail === 0 and no pointerdown (a programmatic click(), or assistive technology that sends no pointer events) is dropped: in Chromium touch emulation click() after a 1.6 s hold left the value at 5, where the base steps 2 to 3. Checking event.detail > 0 here, and clearing both refs at the lift or cancel when no click is owed, keeps those activations.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in a76cd60. The guard skips only a click a pointer produced (detail > 0) and clears its flag at every click and when a touch is cancelled. A lift outside keeps the flag, because iOS Safari still sends the button its click after a short slide off. Tests that fail on the previous head: jsdom a click with no pointer after a touch that ended without one still steps and Chromium after a scroll takes the touch, a click with no pointer still steps. A guard against over-clearing: the click an engine sends after a lift outside adds nothing.

detach();
tracker.dispose();
};
}, [ref, tracker]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Keyed [ref, tracker], this attaches only the node that is in the ref at mount. NumberInput's stepper column renders under hasNumberSteppers, so a column that appears later, or is removed and re-created, is never attached (a 1.2 s hold makes no step and no paint in a jsdom probe), and the removed node stays registered. A callback ref, or a child component that owns the column and calls usePressTracker, would follow node replacement.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in a76cd60: a StepperColumn child owns the column and calls usePressTracker, so each column the field mounts gets its own tracker on its own node. Keying a new ref object per node in NumberInput can't work with this hook today, because its getBounds closure keeps the first ref object, so a node-level fix in the hook is the better long-term home (it is open separately). Tests that fail on the previous head: steppers turned on after mount follow a finger and steppers removed and shown again follow a finger, once.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

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 on the draft spec:AST-094 (FR1, FR2, FR11, FR16, FR20 and FR21, including the stepper's 0 pt tracking margin against FR11's 70 pt) and on whether a held stepper should call onChange on every step; an engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Independently of that decision, these need changes:

  • usePressTracker attaches only to the stepper column present at mount, so steppers turned on later never follow a finger (useGestureRecognizer.ts:127-140).
  • After a touch press that ends without a click, the next detail === 0 activation is dropped (NumberInput.tsx:937-943), which the draft's own FR21 forbids.
  • Lint fails at NumberInput.stepperTouch.test.tsx:263, and the branch carries 26,824 changed lines of stacked work; landing #8052 to #8202 first leaves this pull request with the 1,738-line hold.

[Automated review]

@vjeux
vjeux force-pushed the uikit/c04-stepper-hold branch from 9159dba to 2d89560 Compare October 24, 2026 20:53
@vjeux vjeux changed the title feat(NumberInput): a finger held on a stepper keeps stepping, as UIStepper does feat(NumberInput): on iOS a finger held on a stepper keeps stepping, as UIStepper does Oct 24, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

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 on the draft spec:AST-094 for NumberInput's touch stepper hold (FR1, FR2, FR11, FR13, FR16, FR20 and FR21, including the stepper's 0 pt tracking margin and its iOS-only gate), on whether a held stepper calls onChange on every step, and on whether FR4 stands beside the theme motion roles this branch carries; an engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Independently of that decision, these need changes:

  • usePressTracker attaches only to the stepper column present at mount, so steppers shown later never follow a finger (useGestureRecognizer.ts:131-144).
  • After a touch press that ends without a click, the next detail === 0 activation is dropped (NumberInput.tsx:935-941), which the draft's own FR21 forbids.
  • Lint fails at NumberInput.stepperTouch.test.tsx:291, three changesets say no component uses modules NumberInput now uses, and the branch carries 31,025 authored lines of stacked work; landing the predecessors first leaves this pull request with the 2,027-line hold.

[Automated review]

const {onChange, increment} = setup({initial: 8, max: 10});
const id = fingerDown(increment, INCREMENT);
wait(2600);
expect(onChange.mock.calls.map(([value]) => value)).toEqual([9, 10]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CI's lint job fails here: @typescript-eslint/promise-function-async reads ([value]) => value as possibly returning a promise because mock.calls is untyped. Typing the parameter (or the mock) clears it.

Comment thread .changeset/gesture-host.md Outdated
'@astryxdesign/core': patch
---

[chore] Internal: the gesture system's DOM host (claims, click suppression, the browser's takeover, the pointer behind a contact). Not exported from the package entry point; no component uses it yet.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"no component uses it yet" no longer holds: NumberInput attaches the host through usePressTracker, and touch-experimental-subpaths.md in the same release exports the press tracker publicly. gesture-press-tracking.md and uikit-constants-table.md say the same; release readers get both statements.

@vjeux

vjeux commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Two notes on the reviews above. Lint: the strict promise-function-async error at NumberInput.stepperTouch.test.tsx is fixed in a76cd60 (typed onChange mock); ASTRYX_STRICT_LINT=1 eslint is clean on the NumberInput folder. Size: the diff is the stack, not this change. Each predecessor is its own open pull request, listed in merge order at the end of the description (#8270 with its chain, #8173, #8202). This pull request's own change is its last commit, about 2.1k lines with tests; once the predecessors merge, the diff is that commit alone.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

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 on the draft spec:AST-094 for NumberInput's touch stepper hold (FR1, FR2, FR11, FR13, FR16, FR20 and FR21, including the stepper's 0 pt tracking margin and its iOS-only gate), on whether a held stepper calls onChange on every step, and on whether FR4 stands beside the theme motion roles this branch carries; an engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The two input-loss issues from the previous revision are fixed and tested, and these still need changes whatever that decision is:

  • NumberInput's import grows by about 18.9 KB gzip of touch-only gesture code (NumberInput.tsx:57-68), which architecture:component-style-authoring INV6 asks to load lazily or justify.
  • The touch resolver keeps its own (width < 744px) / (height < 500px) numbers (touchPresentation.ts:75-79), where spec:AST-012 FR9 requires the theme's compact definition (width below the effective md point, 768 by default).
  • StepperColumn sits between NumberInput's doc comment and export function NumberInput, so the exported component loses its JSDoc (NumberInput.tsx:541-557).
  • Three changesets still say no component uses the gesture host, press tracking or the UIKit table, and the hold changeset leaves out the 50 ms phase.
  • The branch carries 31,196 authored lines of stacked work; landing the predecessors first leaves this pull request with the 2,199-line hold.

[Automated review]

export const TOUCH_QUERY = '(pointer: coarse)';

/** The viewport is compact: layout behaviours. */
export const COMPACT_QUERY = '(width < 744px), (height < 500px)';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These are the resolver's own compact numbers. The current spec:AST-012 FR9 defines compact as width below the theme's effective md point (768 by default) or height below 500, and says the web touch presentation resolver and Selector's adaptive presentation keep no size numbers of their own. With 744 here, a coarse-pointer viewport 744–767 px wide (an iPad mini in portrait) gets the popover where the shared definition gives it the sheet. Deriving the width from the theme's md point (the compact definition main now exports) would conform.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The resolver belongs to the base (#8062, folded into #8076). At #8076 a71f4e5, which this PR now stacks on, its hook reads compact from the theme's md point, and the 744 is gone; the static media constant stays the default, which is the resolver's own question. NumberInput keys on the coarse pointer alone and reads no compact size.

type PointerKind,
type PressTracker,
type UsePressTrackerOptions,
} from '../gestures';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These static imports put the gesture host, arena, recognizers and UIKit tables into NumberInput's import for every consumer: an esbuild bundle of NumberInput grows from 34,464 to 53,860 bytes gzip. architecture:component-style-authoring INV6 flags a coarse-pointer-only feature above 2 KB gzip and asks the pull request to load it lazily or justify the cost.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The size report is in the description now: NumberInput's bundle (esbuild, minified + gzip, React and StyleX external) is 56.2 KB at the base and 76.0 KB with #8205 (478b4f9). About 2 KB of the difference is NumberInput's own touch code (NumberInputTouch.tsx, stepperTracking.ts and the stepper table); the rest is the shared gesture system (the host, arena, press tracker and the gesture table the host reads itself), which every touch control on a page shares. It stays a static import on purpose: a lazy chunk would add a network round trip at the first touch, on exactly the devices that need it, and the touch layer's single import site lets a desktop build drop it. The tables are now imported by name, from their own modules; NumberInput reads the stepper table and one row of the gesture table.

* <NumberInput label="Price" value={price} onChange={setPrice} min={0} step={0.01} />
* ```
*/
/**

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

StepperColumn now sits between NumberInput's doc comment ("A number input component for collecting numeric user input…" with its @example, lines 541-551) and export function NumberInput, so that comment documents the private StepperColumn and the exported component has none in editor hovers or the emitted declarations. Moving StepperColumn above the doc comment, or below NumberInput, keeps it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed: StepperColumn is gone (the press tracker hook now attaches to a node that mounts later, so the column needs no component of its own), and the doc comment sits directly on NumberInput again (478b4f9).

this.steps += 1;
}
// Timed from after this step's work, as UIKit re-arms its timer.
this.arm(this.clock.now() + repeatInterval(this.steps));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This re-arms even when step refused (the field turned disabled or read-only mid-hold), and PressTracker reads isEnabled only when a touch begins, so the timer keeps firing and + stays painted pressed beside aria-disabled until the finger lifts. Cancelling the tracking and clearing the paint when the field becomes disabled during a press would release it (architecture:react-component-runtime INV5).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 478b4f9: when the field turns disabled or read-only during a press, the touch layer lets go of it at once. It cancels the tracking and clears the paint, and nothing tracks or paints again until the next touch. New test: a field turned disabled|read-only mid-hold lets go of the press at once, which fails on the previous head with the half still painted. A step refused at a bound still keeps the clock, so a slide onto the other half carries the cadence, as UIStepper's does.

Comment thread .changeset/number-input-stepper-hold.md Outdated
'@astryxdesign/core': patch
---

[feat] NumberInput: on iPhone and iPad, a finger held on a number stepper keeps stepping, as a native iOS stepper does: once after half a second, then every half second, and every tenth of a second after three seconds. A tap steps once, when the finger lifts; sliding onto the other stepper carries the repeat to it, and sliding off the steppers stops it. The pressed stepper lights at once and clears at once. A scroll that starts on a stepper still scrolls and steps nothing. Android and other touch screens keep the tap as before (Material has no stepper), and a mouse click is unchanged. A held finger selects no text on any touch screen: the stepper column leaves that to the gesture system's press tracking instead of styles of its own.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The hold also drops to every 50 ms from the twentieth step (stepper.autorepeat.fastIntervalMs), which this line leaves out; release readers would expect a tenth of a second to be the top rate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 478b4f9: the changeset now names the pen and the top rate (every twentieth of a second from the twentieth step).

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
Android 15, Chrome 124 (emulator golden v2, recorded at 540 x 1200), on
this push's heads (meta#8205 40690a8, meta#8218 7615c44): meta#8205 beside main
(a tap steps once at the lift without focusing; a 3.45 s hold steps on
UIKit's cadence to 10), and meta#8218 beside meta#8205 (the capsule: - then +, a
1.3 s hold, and a tap on + while Gboard is up). Every take passes the gap
gate (no frame gap over 60 ms after the recorder warm-up); every frame
reviewed; the bands start below Chrome's address bar.
@vjeux
vjeux force-pushed the uikit/c04-stepper-hold branch from a76cd60 to 40690a8 Compare October 25, 2026 01:09
@vjeux vjeux changed the title feat(NumberInput): on iOS a finger held on a stepper keeps stepping, as UIStepper does feat(NumberInput): a finger held on a stepper keeps stepping, as UIStepper does Oct 25, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 25, 2026
@github-actions
github-actions Bot requested review from cvkxx and ernestt October 25, 2026 01:09
vjeux added 24 commits October 29, 2026 10:12
Where a moving element is drawn away from its layout box, the host
hit-tests what is drawn under the finger with the document's
elementFromPoint, which answers a shadow host for anything inside its
open root. The hit test now descends through each open root's own
elementFromPoint and compares with the movers along the flat tree, so a
recognizer on a control inside a moving sheet's shadow root gets its
finger and the tap clicks that control.
…nt lets go

The host's touch-action rules sit in an adopted sheet or a style element
per document or shadow root, and were never removed, so a page whose
last recognizer detached kept them, against spec:AST-094 FR24 (nothing
touch-related remains after the last instance unmounts). Fails until a
root's rules go with its last marked element.
…th its last marked element

The touch-action writer records which elements it marked in each
document or shadow root, and when the last one is unmarked (its last
recognizer detached) it removes that root's adopted sheet or style
element, so nothing touch-related remains after the last instance
unmounts (spec:AST-094 FR24). A later mark writes the rules again; an
element marked in another root first lets go of the old one.
… the inline style it reads

- The motion registry, the host's engine gate and the README name the
  presented hit test as an engine workaround (spec:AST-013 FR6) with its
  review condition (re-measure on each iOS release; remove it once iOS
  WebKit hit-tests a compositor-moved element where it is drawn) and its
  regression fixture.
- While a curve runs the animator holds the value it starts from inline,
  so presentation.ts and the README no longer say the inline style holds
  the end.
…core/internal/touch

Core ships the internal entry @astryxdesign/core/internal/touch, which
re-exports the gesture primitives for Astryx's own packages, and the
Lab-import guard fails a Lab import of core outside core's exports
(architecture:react-component-runtime INV13). The README and the barrel's
header named internal workspace imports and said nothing here is
exported; they now name that entry.
…ill needs the element, and the listeners that cancel

The release note, the stream's header, the host's comment and the README
said the stream is one passive listener per event type and that a
document-capture stopPropagation no longer starves the recognizers. Such a
stop never hid a listener on the same node, and some subscriptions cancel.
They now say what changed: an app's window-capture stopPropagation, or a
document-capture stopImmediatePropagation registered before core, no
longer hides a touch; a recognizer that must claim still needs the touch to
reach its element; the gesture host's touchend, click and contextmenu
cancel while a claimer is attached and the page hold's touchmove while it
holds; and the stream stays ahead of an app's window-capture listener only
until a type's listener is re-added. The README's list of blocking
touchmove listeners gains the claimed touch's target and the document
while a claiming element moves.
…default it moves

The {stylexOptions} form of astryxStylex now passes StyleX
treeshakeCompensation: true unless the caller sets it. spec:AST-017 FR3
asks the release note to name the old and new default and the option
that restores the old one; it now does.
…er and for the two stops the input stream fixes

- A still finger with sub-pixel jitter over a scroll view keeps its tap
  and scrolls nothing (spec:AST-094 FR18–FR22).
- A tap is still recognized under an app's window-capture
  stopPropagation, and under a document-capture
  stopImmediatePropagation registered before core's: the recognizers hear
  touches on the window's capture phase.
Chromium and WebKit pass.
…s once

Where nothing that claims is attached, the host's touchend listener is
passive and cannot cancel the engine's own click after a retargeted tap
clicks what is drawn. The shared click guard swallows that late click
whatever is attached; this case pins it, as asked on meta#8293.
meta#8360 now carries the review fixes of the foundation it holds. The two
conflicts are this pull request's own files:
- GestureHost.ts: meta#8360 counts the attachments that ask for an action
  group; here the fine-pointer group listener and the per-event recognizer
  set are gone (every pointer is served, FR43), so the merge keeps the
  count and drops those two.
- GestureHost.test.ts: both sides added the same assertion to the
  second-finger case; the merge keeps this side's comment. meta#8360's
  action-group lifetime case counts a group's own pointerdown under a fine
  pointer, which this pull request replaces with one passive pointerdown
  on any element that uses a gesture (its own idle-listener case), so the
  merge leaves it out.
… attached, in this host's terms

meta#8360's action-group lifetime case pins that an element stays a group
while any attachment asks and stops with the last. Here every element
that uses a gesture is served as a group under a fine pointer, so the
same invariant reads as the element's one passive pointerdown: with two
gestures attached, detaching either keeps it, and detaching the last
removes it. It passes on this head.
meta#8360 carries this pull request's predecessors and the review fixes of
the foundation it holds; this pull request's own diff is now its six
commits (a second finger fails a one-finger pan wherever fingers come
from, and the check reruns once that finger is delivered; a press's
selection lock gets what it landed on; a pinch's second finger on another
pan claims neither; the wider-band edge pan's real-touch proof; text).
Two conflicts:
- GestureHost.ts: the selection lock's target takes meta#8360's presented
  target, which is what the press landed on unless an element under it
  is moving, so it keeps this pull request's fix and meta#8293's correction.
- .changeset/gesture-press-tracking.md: meta#8360's text, which names both
  writers of the press attribute.
ListItem declares --_hit-border-bottom (the divider's width, 0 on the
last row) for the touch hit layer, and List.doc.mjs did not list it, so
derivedVarRegistry.test.ts failed: "List has undocumented CSS vars in
source: --_hit-border-bottom". It is now in List.doc.mjs theming.vars[]
as a private var, and in VARS_WITHOUT_DERIVED_MAPPING with its reason:
it is the ::after layer's geometry, which follows --border-width, not a
property a theme author sets (as with --_thumbnail-hit-inset and
--_input-clear-hit-inset).

Red first: "List: all source vars are in doc file" failed on the change
before this one; it passes now (122 of 122).
…esture host's subscriptions

The gesture host subscribes no click: the one cancelling click subscriber
is the click guard's, added at a window's first arm and kept. The release
note, the stream's header and the gestures README listed click with the
host's touchend and contextmenu; they now name the guard's own.
meta#8360's input-stream notes no longer list click among the gesture host's
subscriptions. The merge is clean.
… lift and the browser's menu, keeps a kept press's finger, and goes when the page hides

From the review of this pull request, three cases fail on its head:
- an armed press installed the page listeners without the claiming
  ones, so a claimed finger's touchend stayed passive and the browser's
  menu opened during a claimed long press (spec:AST-094 FR21);
- a kept press got its blocking touchmove during an armed press, but its
  moves were cancelled only where the primary pointer is coarse, so a
  held stepper on a touchscreen laptop lost its finger (FR11, DEC-21);
- a page hidden mid-press cancelled the press but kept the page's
  listeners until the next lift anywhere (FR24).
…lift and the browser's menu, keeps a kept press's finger, and goes when the page hides

- A finger's or a pen's armed press now brings the claiming listeners
  (the cancelable touchend and the contextmenu canceller) with the page
  listeners, as wherever the host installs, so a claimed lift clicks
  nothing and a claimed hold opens no browser menu (spec:AST-094 FR21). A
  mouse's press needs neither and adds neither.
- A kept press keeps its finger under any pointer: its target blocks and
  its moves are cancelled once its press is delivered, not only where the
  primary pointer is coarse (FR11, DEC-21).
- A page hidden mid-press releases the armed press as a blur does, so the
  page's listeners go with the cancelled press (FR24).
…'s selection

An action group's press is a long press with no minimum duration, so it
claims at the press's pointerdown, before any movement. The drag
selection hold then cleared the page's selection, so a plain click on a
group's button left its Copy or Cut with nothing to act on. The case
fails on this head: the selection is gone after the pointerdown.
…age's selection

The drag selection hold cleared the page's selection when any mouse or
pen contact was claimed, but an action group's press claims at its
pointerdown, before it has moved or selected anything, so a plain click
on a group's button left its Copy or Cut with nothing to act on. A claim
before any movement now keeps the page's selection: the hold still
refuses a new one, and puts the page's back over a selection that
appears while it runs. A claim after movement clears what its drag
selected, as before (spec:AST-094 FR41).

The case before the new one now waits for its hold to end a task after
the lift, so no hold outlives that test.
…t every pointer does

- GestureHost's header, the gestures README and coarsePointer.ts no
  longer describe the coarse-only host: a finger or a pen takes the
  touch-down lock under any primary pointer, a kept press's finger is
  kept during a fine pointer's press too, and recognizers attach for
  every pointer while the page listeners last a press (spec:AST-094 FR19,
  FR24, FR41, FR43).
- The fine-pointer selection case asserted the replaced rule and passed
  only because it read iOS WebKit's inline lock without iOS WebKit: it
  now asserts the lock a fine pointer's finger and pen take, and that a
  mouse takes none.
- FR41's sentence and its verification row say that a press claimed at
  its own pointerdown, before it moves, keeps the page's selection, while
  a drag that moved before its claim loses what it selected.
… name their measured causes

The hold proofs that need a tap's click skip in Playwright's WebKit with a
reason that blamed this story. Measured against a plain button: that
WebKit synthesizes no click after a scripted touch on any element, while
its own tap path clicks; these proofs script the touch, so the reason now
says that.

The steppers cancel a touch's pointerdown, not only its mousedown.
Canceling the mousedown alone was tried: iOS Safari, Chromium and
WebKit's tap path then all step on the click, but Chrome on Android
focuses a held stepper at its long press (focusin about 500 ms in,
measured on the emulator), which would blur an editing field. So the
cancel stays, and the comments name why; WebKit's Linux build, outside
spec:AST-013's support, sends no click after a tap there.
…ion, in the present tense

The sentence said a drag that moved before its claim loses the selection
it started, but the hold clears the page's selection then, whatever made
it; and an unclaimed mouse drag kept "today's" behavior, a phrase that
ages. It now says a claim after movement clears the page's selection, a
press claimed at its own pointerdown keeps it, and an unclaimed mouse
drag keeps its released behavior.
This pull request now sits on meta#8665, so a stack carrying it and meta#8665's
other dependants (meta#8676) needs no second GestureHost resolution. Two
hunks in GestureHost.ts's pointerdown, both this pull request's:
- the second-finger check where fingers come from pointer events stays,
  followed by meta#8665's rule that a right click, a pen's barrel button or
  a macOS ctrl-click starts no press;
- the check that runs again once the new finger is delivered stays,
  followed by meta#8665's selection lock call, which no longer takes the
  window.
@vjeux
vjeux marked this pull request as draft October 29, 2026 22:33
vjeux added 4 commits October 29, 2026 15:35
utils/pressFeedback.ts is taken byte for byte from git's clean merge of
those two heads; nothing in this pull request changes it.
…events, as a browser sends them

The gesture host now reads a finger from its pointer events once it has
seen the pointerdown (meta#8336, through meta#8360). This suite's touch helper
sent a move or a lift as a touch event alone, which no browser does, so
the two slide tests lost the finger and the touched half's paint stayed
on. The helper now sends pointermove or pointerup first, as a browser
does; the browser proofs, which use real input, pass unchanged.
…as the repeat arms it

Under a loaded machine one WebKit run of "a slide onto the other half
carries the paint and the repeat" failed with its third step 68 ms off
the schedule. The schedule was timed from touch-down, but the hold starts
from the press's delivery and the repeat arms each beat from the moment
its step ran (stepperTracking.ts). So a slow touch dispatch, or one late
beat, moved every later step, and the proof charged it to each of them.
Instrumented over repeated runs at load 83 to 105, WebKit's first step
sat up to 38 ms after touch-down plus 500 ms, while every later interval
stayed within 17 ms of its beat.

Each step is now checked against its own beat: the first 500 ms after the
press's first paint, which is written when the hold is armed, and each
later one its interval after the step before. The leave-and-return
proof's resumed beat is timed from the second step the same way. The
slack per step is unchanged.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

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: this head rewrites the current component:NumberInput FR4 (a hold that commits once, at the release, on a 250 ms/0.9 ramp that departs from UIStepper’s measured 500 ms cadence) and FR5 (focus by press kind), adds a mouse and pen hold and a finger tracking area 70 px past the steppers, and adds claimed-drag selection rules to spec:AST-094 FR41. Any engineering owner, the author included, can record that decision by commenting /approve-spec <full head SHA> on this pull request, or say which behaviour must change. These changes are needed either way:

  • Check the half actually stepped in handleColumnClick and pressStepper: a mouse click on an aria-disabled stepper now commits a typed draft at the bound (NumberInput.tsx:1037-1051).
  • Make the proposed FR4 name the finger’s 70 px tracking area, since it says moving off the stepper pauses the repeat.
  • Land or split the predecessor pull requests so this diff carries only the stepper hold, and attach real iOS Safari and Android Chrome runs.

[Automated review]

Comment on lines +1047 to +1050
const click = stepperTouch.takeClick(event.nativeEvent);
if (click === 'increment' || click === 'decrement') {
stepValue(click === 'increment' ? 1 : -1);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Under a fine pointer every mouse and pen press is captured on the column (NumberInputTouch.tsx:408-411), so its click lands here, and this steps the lift’s half with no check that it can move (stepValue returns early only for a disabled or read-only field). At a bound stepValue still drops the draft and calls onChange when the draft differs from value: with value 5, max 10 and a typed 10, a click on the aria-disabled + commits 10, against current component:NumberInput FR4 (“a stepper that cannot move does nothing”). pressStepper checks the clicked half but steps the lift’s half (:1018-1029). Checking the half actually stepped in both handlers, with a test that clicks an aria-disabled half, would close it.

| FR1 | The input is a native text input with `role="spinbutton"`, `inputMode` `numeric` when integer-only and `decimal` otherwise, `aria-valuemin` and `aria-valuemax` from the range, `aria-valuenow` from the committed `value`, and `aria-valuetext` set to the formatted value when `formatValue` is supplied. | Current tests |
| FR2 | Typing changes only a draft; `onChange` is not called while typing. A draft is valid when it parses for the active locale (grouping, decimal separator, digit script, and sign) and, for validity display, lies within the range and meets integer-only. An invalid draft colors the text secondary, sets `aria-invalid`, and fills a persistent assertive region with the localized invalid-number message. | `spec:AST-086` FR3; `architecture:internationalization`; current tests |
| FR3 | On blur the draft resolves once and ends: an empty draft clears (`onChange(null)` when clearable and a value exists) or reverts; an unparsable or wrong-kind draft reverts; otherwise the number clamps to the range and commits with `onChange(number)` when it differs from `value`. Enter resolves a valid draft the same way and clears an empty draft when clearable. Enter commits nothing for an empty draft without `hasClear`, which stays in the field and is not marked invalid, or for an unparsable or wrong-kind draft, which stays in the field and stays invalid. Enter ends the draft only when its commit clamped. In a field that is not disabled, every Enter outside composition then calls `onEnter`, whatever it committed. | Current tests |
| FR4 | ArrowUp and ArrowDown without modifiers, the wheel over the focused input (when `isWheelEnabled`), and a stepper press step by one grid position and commit at once. A held stepper repeats once after 0.5 s, then on a ramp whose interval starts at 250 ms and shortens to 0.9 of the last, down to 50 ms; the input shows each step, and the press commits once, at its release. Moving off the stepper pauses the repeat and moving back resumes it with no immediate step; sliding onto the other stepper carries it on; a held press selects no text and opens no callout (`spec:AST-094` FR41). The grid starts at `min` (when it suits integer-only) or 0. From an empty field or an emptied draft, up goes to `min` or 0 and down to `max` or 0. Results round to the finer of the step's and the grid start's precision (at most 12 decimal places), clamp to the range, and never leave integer-only; a stepper that cannot move does nothing, while an arrow or wheel step that cannot move still ends the draft, committing a valid draft's number and dropping an unparsable one. A caller `onKeyDown` that prevents an arrow cancels that step. A wheel step stops the page from scrolling; otherwise the page scrolls. | UIStepper's 0.5 s delay and 50 ms floor, measured on the iOS 26.2 simulator; `spec:AST-094` FR41; current tests |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

“Moving off the stepper pauses the repeat” holds for a mouse (NumberInputTouch.tsx:364-375), but a finger keeps the press, and keeps stepping, until it is 70 px past the column (NumberInputTouch.tsx:243-248). The record should name both areas, and the 250 ms and 0.9 values need the dated owner decision spec:AST-094 FR2 asks for when a value departs from a measurement.

Comment on lines +42 to +45
* @source GUESS — proposed, pending owner review: UIStepper measured 500 ms between its first repeats (+514, 1017, 1520, 2023, 2525, 3028 ms), iOS 26.2 sim, Oct 23 2026
* @measure M-STP20
*/
firstIntervalMs: 250,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

spec:AST-094 FR1 asks every component to use the measured value, and FR2 lets an owner decision depart from it only when it names its date and the measurement it departs from. Until an engineering owner records that decision, firstIntervalMs and acceleration stay guesses against UIStepper’s measured 500 ms phases.

This branch was successfully deployed

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

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants