Skip to content

refactor(core): name the nested press rule for every pointer it covers - #11304

Merged
cixzhang merged 5 commits into
meta:mainfrom
vjeux:core/nested-press-name
Nov 12, 2026
Merged

cixzhang merged 5 commits into
meta:mainfrom
vjeux:core/nested-press-name

Conversation

@vjeux

@vjeux vjeux commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

CodeBunny's reviews of #8696 left five non-blocking notes: four on wording, and one on where the press attribute's selectors live. CheckboxInput and RadioListItem no longer write selectors on a private attribute that another module owns.

Intended invariant

No behavior changes, and the package's stylesheet is byte-identical. component:Item FR9 and the component:CheckboxInput record keep their meaning. For CheckboxInput and RadioListItem, architecture:public-component-api INV23 holds: the press attribute's owner module writes their selectors and exports them as ready-made styles.

Change

  • cancelNestedTouchPress is renamed cancelNestedPress, in hooks/useClickableContainer.ts and its callers: Item, Token and TreeListItem.
  • Item FR9's last sentence reads "Such a mouse press keeps the row's :active paint", so it covers only the mouse press the sentence before describes.
  • The CheckboxInput record says pressBoxesIn lists the press boxes a pressable surface owns. The press controller calls it for every fine-pointer press.
  • RadioListItem's comment says the row declares the paint of a press the controller does not paint.
  • privateAttributes/press.stylex.ts, the press attribute's owner, now exports the styles CheckboxInput and RadioListItem wrote themselves: indicatorPressPaintStyles (handDown, activeFill and image) and rowPressPaintStyles.radioRow. The nested-control list moves with the row's paint, and its source-build test reads the owner module. The press coverage test counts that ready-made paint as a press arm. CheckboxInput composes activeFill and image only where its row does not own the press.
  • The private-attribute lint baseline drops the four sites CheckboxInput and RadioListItem no longer write.
  • A [chore] Changeset names @astryxdesign/core.
  • #9393 adds an import beside the renamed function in Item.tsx, so it gets a one-line conflict.

Evidence

Scope

Components: Item, CheckboxInput, RadioList, Token, TreeList

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Writing rubric results

Run over the two record lines this pull request touches, component:Item FR9 and the component:CheckboxInput owner line:

  • R1 narration: none.
  • R2 research in the record: none.
  • R3 evidence naming a change: none; FR9's basis cell is unchanged.
  • R4 rejected alternatives over one line or outside a decision: none.
  • R5 pull request or issue references remaining: none.
  • R6 ruled open questions still listing options: none.
  • R7 project status: none.

Testing

Every run below is at 43751a8, which merges main 5398a99 into 5c0053c with no hand edit.

  • pnpm exec vitest run --project ui: 996 files, 24,601 tests.
  • The Item, CheckboxInput, CheckboxList, RadioList, Token, TreeList, useClickableContainer and press coverage tests: 975 in 25 files.
  • tsc --noEmit -p packages/core/tsconfig.json: 0 errors.
  • pnpm lint:strict: 0 errors, with main's 237 warnings. The private-attribute rule's tests pass 75. Its baseline script reports only three dead Theme.tsx entries, which chore(lint): drop Theme.tsx's dead sites from the attribute baseline #11314 removes.
  • pnpm check:knowledge: aligned.
  • The Changeset coverage and public text checks pass.
  • dist/astryx.css is byte-identical to main 5398a99's.
  • Playwright in the CI image, two workers: the 11 press interaction specs pass 90 in Chromium, with 8 skipped, and 75 in WebKit, with 23 skipped. Item's 4 a11y specs and the 16 checkbox, radio and press a11y specs pass 186 in Chromium. Their CheckboxList state matrix reads the Storybook build's source stamp, which CI writes, so it ran with that stamp written.
  • A render probe, not committed, gives CheckboxInput's box wrapper the same StyleX classes at 08b6737 and 5c0053c, alone and under a row that owns the press.

Public and internal API delta

Public: none. Internal: cancelNestedTouchPress is now cancelNestedPress, in hooks/useClickableContainer.ts; the package does not export it. privateAttributes/press.stylex.ts adds indicatorPressPaintStyles and rowPressPaintStyles.radioRow; no package entry exports them.

Size: +193/−185 lines in 13 files (5398a99..43751a8). The stylesheet is byte-identical.

History

Review wording after the selection-mark press change (meta#8696). Its
nested-control rule covers a mouse's and a pen's press too, on a
container that owns a control's box. So cancelNestedTouchPress becomes
cancelNestedPress.

The records and one comment say what the code does:
- Item FR9's last sentence covers only such a mouse press.
- The CheckboxInput record says pressBoxesIn lists the press boxes a
  pressable surface owns, not only a click-delegating row's.
- RadioListItem's comment says the row declares the paint of a press
  the controller does not paint.

No behavior changes.
@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 12, 2026 7:48am UTC

Request Review

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

astracat-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 12, 2026, 8:09 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

🔎 Preview · 43751a8

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
CheckboxInput · Storybook 67.6 kB (+144 B) · 10.1 kB CSS (+845 B) 422 (−22) ✓ · ✓ · ✓
ContextMenuItem 33.4 kB (+194 B) · 6.8 kB CSS (+445 B) — — · — · —
DateTimeInput 216.0 kB (+56 B) · 19.1 kB CSS (+402 B) — — · — · —
121 more components
Component Size LoC Visual · A11y · RTL
DateInput 193.4 kB (+62 B) · 17.4 kB CSS (+388 B) — — · — · —
Tokenizer 102.0 kB (+53 B) · 19.5 kB CSS (+397 B) — — · — · —
Selector 105.4 kB (+52 B) · 17.8 kB CSS (+394 B) — — · — · —
Pagination 115.5 kB (+39 B) · 18.2 kB CSS (+399 B) — — · — · —
AlertDialog 109.2 kB (+48 B) · 15.0 kB CSS (+387 B) — — · — · —
DropdownMenu 102.4 kB (+173 B) · 17.9 kB CSS (+256 B) — — · — · —
MoreMenu 102.7 kB (+172 B) · 17.9 kB CSS (+256 B) — — · — · —
Popover 95.4 kB (+44 B) · 14.6 kB CSS (+372 B) — — · — · —
ChatComposer 82.9 kB (+42 B) · 12.4 kB CSS (+369 B) — — · — · —
DateRangeInput 97.6 kB (+52 B) · 12.9 kB CSS (+352 B) — — · — · —
Typeahead 85.9 kB (+50 B) · 12.8 kB CSS (+352 B) — — · — · —
DropdownMenuSubMenu 73.1 kB (+46 B) · 10.1 kB CSS (+348 B) — — · — · —
Lightbox 126.7 kB (+44 B) · 10.9 kB CSS (+350 B) — — · — · —
SideNavItem 75.2 kB (+43 B) · 11.5 kB CSS (+351 B) — — · — · —
NumberInput 75.0 kB (+56 B) · 11.8 kB CSS (+337 B) — — · — · —
SideNav 118.3 kB (+44 B) · 11.7 kB CSS (+349 B) — — · — · —
SideNavHeading 80.7 kB (+46 B) · 11.6 kB CSS (+347 B) — — · — · —
Calendar 74.5 kB (+42 B) · 10.9 kB CSS (+350 B) — — · — · —
ChatLayout 86.3 kB (+46 B) · 10.9 kB CSS (+346 B) — — · — · —
TimeInput 167.6 kB (+27 B) · 16.4 kB CSS (+365 B) — — · — · —
TreeList · Storybook 46.1 kB (+41 B) · 5.9 kB CSS (+350 B) 1,219 (0) ✓ · ✓ · ✓
AppShell 95.3 kB (+50 B) · 13.8 kB CSS (+340 B) — — · — · —
Banner 65.4 kB (+52 B) · 10.8 kB CSS (+338 B) — — · — · —
MobileNav 74.0 kB (+42 B) · 11.0 kB CSS (+348 B) — — · — · —
TopNavMenu 79.7 kB (+42 B) · 11.6 kB CSS (+348 B) — — · — · —
BaseTypeahead 76.7 kB (+43 B) · 11.3 kB CSS (+346 B) — — · — · —
DialogHeader 66.3 kB (+53 B) · 11.8 kB CSS (+336 B) — — · — · —
DrawerHeader 66.5 kB (+37 B) · 13.3 kB CSS (+352 B) — — · — · —
TopNavHeading 80.3 kB (+53 B) · 11.6 kB CSS (+336 B) — — · — · —
ComplexSelector 75.9 kB (+48 B) · 12.2 kB CSS (+339 B) — — · — · —
TopNav 75.7 kB (+41 B) · 11.3 kB CSS (+346 B) — — · — · —
SelectorOption 21.6 kB (+46 B) · 6.4 kB CSS (+340 B) — — · — · —
TableSelectionToolbar 73.7 kB (+36 B) · 13.6 kB CSS (+349 B) — — · — · —
FileInput 72.4 kB (+44 B) · 11.3 kB CSS (+340 B) — — · — · —
ChatComposerTokenElement 80.5 kB (+42 B) · 11.6 kB CSS (+341 B) — — · — · —
ChatComposerInput 80.5 kB (+41 B) · 11.6 kB CSS (+341 B) — — · — · —
Item · Storybook 18.1 kB (+36 B) · 5.9 kB CSS (+345 B) 1,813 (0) ✓ · ✓ · —
TopNavMegaMenu 74.4 kB (+44 B) · 12.2 kB CSS (+337 B) — — · — · —
Thumbnail 67.8 kB (+50 B) · 11.9 kB CSS (+330 B) — — · — · —
Button 63.4 kB (+45 B) · 10.3 kB CSS (+334 B) — — · — · —
ChatDictationButton 64.0 kB (+44 B) · 10.4 kB CSS (+333 B) — — · — · —
Toast 101.3 kB (+37 B) · 10.6 kB CSS (+340 B) — — · — · —
DropdownMenuCheckboxItem 23.8 kB (+44 B) · 7.0 kB CSS (+332 B) — — · — · —
DropdownMenuRadioItem 23.8 kB (+44 B) · 7.0 kB CSS (+332 B) — — · — · —
BreadcrumbItem 89.9 kB (+46 B) · 12.5 kB CSS (+329 B) — — · — · —
SideNavCollapseButton 64.3 kB (+40 B) · 10.4 kB CSS (+335 B) — — · — · —
TabMenu 77.0 kB (+35 B) · 11.5 kB CSS (+340 B) — — · — · —
IconButton 63.5 kB (+40 B) · 10.3 kB CSS (+334 B) — — · — · —
Carousel 73.2 kB (+39 B) · 11.3 kB CSS (+334 B) — — · — · —
Stepper 65.1 kB (+37 B) · 10.5 kB CSS (+335 B) — — · — · —
ChatLayoutScrollButton 64.0 kB (+37 B) · 10.5 kB CSS (+333 B) — — · — · —
ToggleButton 90.1 kB (+37 B) · 10.4 kB CSS (+333 B) — — · — · —
DropdownMenuItem 23.0 kB (+42 B) · 6.6 kB CSS (+327 B) — — · — · —
CodeBlock 78.6 kB (+36 B) · 11.6 kB CSS (+331 B) — — · — · —
MobileNavToggle 63.7 kB (+32 B) · 10.3 kB CSS (+334 B) — — · — · —
TextInput 71.1 kB (+36 B) · 11.5 kB CSS (+328 B) — — · — · —
ChatSendButton 63.8 kB (+28 B) · 10.3 kB CSS (+334 B) — — · — · —
Timestamp 35.1 kB (−2 B) · 10.6 kB CSS (+337 B) — — · — · —
TableHeaderCell 114.1 kB (+78 B) · 18.0 kB CSS (+253 B) — — · — · —
ContextMenu 113.3 kB (+67 B) · 17.8 kB CSS (+263 B) — — · — · —
TableCell 114.5 kB (+68 B) · 18.2 kB CSS (+253 B) — — · — · —
Table 130.4 kB (+91 B) · 18.7 kB CSS (+220 B) — — · — · —
MultiSelector 99.7 kB (+51 B) · 17.2 kB CSS (+239 B) — — · — · —
Markdown 193.5 kB (+70 B) · 21.0 kB CSS (+213 B) — — · — · —
RadioListItem 70.8 kB (+208 B) · 10.4 kB CSS (+65 B) — ✓ · ✓ · ✓
CheckboxListItem 74.5 kB (+82 B) · 11.7 kB CSS (+188 B) — — · — · —
ListItem 73.7 kB (+43 B) · 11.7 kB CSS (+188 B) — — · — · —
PowerSearch 300.0 kB (+185 B) · 24.7 kB CSS (0) — — · — · —
lab/Schedule 110.0 kB (+185 B) · 3.9 kB CSS (0) — — · — · —
lab/CommentThread 352.9 kB (+114 B) · 2.4 kB CSS (0) — — · — · —
lab/Comments 359.6 kB (+99 B) · 2.5 kB CSS (0) — — · — · —
charts/ChartTooltip 186.7 kB (+69 B) · 451 B CSS (0) — — · — · —
lab/TransferList 105.7 kB (+69 B) · 1.2 kB CSS (0) — — · — · —
charts/Chart 209.6 kB (+65 B) · 516 B CSS (0) — — · — · —
richtext/RichTextView 280.0 kB (+56 B) · 2.3 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 110.7 kB (+49 B) · 773 B CSS (0) — — · — · —
lab/TabBarMoreList 96.0 kB (+46 B) · 1.8 kB CSS (0) — — · — · —
lab/ChatReactionBar 111.9 kB (+44 B) · 1.1 kB CSS (0) — — · — · —
lab/DiffViewer 91.0 kB (+44 B) · 2.1 kB CSS (0) — — · — · —
lab/EmojiPicker 90.4 kB (+41 B) · 751 B CSS (0) — — · — · —
lab/DialogHeroHeader 86.5 kB (+38 B) · 372 B CSS (0) — — · — · —
lab/ListInput 91.5 kB (+38 B) · 922 B CSS (0) — — · — · —
lab/CommentComposer 156.4 kB (+35 B) · 1.9 kB CSS (0) — — · — · —
lab/TransferListSelector 114.5 kB (+35 B) · 1.4 kB CSS (0) — — · — · —
richtext/RichTextEditor 301.8 kB (+33 B) · 2.6 kB CSS (0) — — · — · —
lab/TourStep 101.7 kB (+28 B) · 590 B CSS (0) — — · — · —
richtext/RichTextEditorToolbar 284.4 kB (+26 B) · 454 B CSS (0) — — · — · —
charts/ChartLegend 53.8 kB (0) · 224 B CSS (0) — — · — · —
Avatar 44.9 kB (0) · 5.6 kB CSS (0) — — · — · —
AvatarGroup 47.7 kB (0) · 5.8 kB CSS (0) — — · — · —
AvatarGroupOverflow 50.9 kB (0) · 5.7 kB CSS (0) — — · — · —
ChatMessageList 29.9 kB (0) · 7.1 kB CSS (0) — — · — · —
ChatToolCalls 34.1 kB (0) · 8.4 kB CSS (0) — — · — · —
CheckboxList 71.9 kB (0) · 7.8 kB CSS (0) — — · — · —
ClickableCard 18.4 kB (0) · 7.3 kB CSS (0) — — · — · —
CommandPalette 75.2 kB (0) · 12.7 kB CSS (0) — — · — · —
CommandPaletteInput 33.6 kB (0) · 7.6 kB CSS (0) — — · — · —
Field 58.2 kB (0) · 7.3 kB CSS (0) — — · — · —
FieldLabel 54.3 kB (0) · 5.7 kB CSS (0) — — · — · —
Heading 14.1 kB (0) · 5.5 kB CSS (0) — — · — · —
HoverCard 29.3 kB (0) · 4.4 kB CSS (0) — — · — · —
InfoTip 49.3 kB (0) · 5.4 kB CSS (0) — — · — · —
InputGroup 59.8 kB (0) · 7.9 kB CSS (0) — — · — · —
Link 55.1 kB (0) · 7.1 kB CSS (0) — — · — · —
Overlay 23.0 kB (0) · 3.9 kB CSS (0) — — · — · —
ProgressBar 12.0 kB (0) · 6.4 kB CSS (0) — — · — · —
RadioList 59.6 kB (0) · 7.3 kB CSS (0) — ✓ · ✓ · ✓
SegmentedControl 100.2 kB (0) · 6.9 kB CSS (0) — — · — · —
SelectableCard 18.6 kB (0) · 7.5 kB CSS (0) — — · — · —
Slider 112.4 kB (0) · 8.8 kB CSS (0) — — · — · —
Spinner 26.5 kB (0) · 6.2 kB CSS (0) — — · — · —
StatusDot 32.8 kB (0) · 5.4 kB CSS (0) — — · — · —
Switch 106.8 kB (0) · 10.0 kB CSS (0) — — · — · —
Text 13.6 kB (0) · 5.5 kB CSS (0) — — · — · —
TextArea 65.6 kB (0) · 9.4 kB CSS (0) — — · — · —
Timer 15.7 kB (0) · 6.0 kB CSS (0) — — · — · —
Token · Storybook 29.2 kB (0) · 4.8 kB CSS (0) 591 (0) ✓ · ✓ · —
Tooltip 31.1 kB (0) · 4.4 kB CSS (0) — — · — · —
lab/CommentPin 59.3 kB (0) · 1.2 kB CSS (0) — — · — · —
lab/LineClamp 15.7 kB (0) · 168 B CSS (0) — — · — · —
lab/SelectableCardGroup 67.5 kB (0) · 162 B CSS (0) — — · — · —

Package size: @astryxdesign/core 7.38 MB packed (−418 B); no new dependencies.

Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 06e7eb8

@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 11, 2026
@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits for CI: CI has not run on this head yet, because every CI job skips while the pull request is a draft. The rename and wording are correct, change no behavior or public API, and both record edits carry an engineering owner's /approve-spec for this head, so the next step is to mark the pull request ready for review so CI runs (the ci:run label is already on).

Optional, outside this diff: the ClickableContainerResult.onPointerDown JSDoc in useClickableContainer.ts still says the handler "drops that touch press", and the header of nestedTouchPress.adopters.test.tsx still says the hook's own tests leave a mouse or pen press alone; both still describe only the touch reach.

Claims and files checked
  • Claim: cancelNestedTouchPress is renamed cancelNestedPress in hooks/useClickableContainer.ts and its callers Item, Token and TreeListItem — verified (useClickableContainer.ts:141, :380; Item.tsx:66, :716; Token.tsx:42, :527; TreeListItem.tsx:34, :511).
  • Claim: the package does not export it — verified (hooks/index.ts:108-117; no packages/core/package.json export reaches it).
  • Claim: cancelNestedTouchPress appears nowhere — verified (no match in the head tree).
  • Claim: Item FR9's last sentence reads "Such a mouse press keeps the row's :active paint" and Prettier only re-pads the table — verified (Item.spec.md:117; the other rows differ only in padding).
  • Claim: the CheckboxInput record says pressBoxesIn lists the press boxes a pressable surface owns, and the press controller calls it for every fine-pointer press — verified (CheckboxInput.spec.md:86; pressFeedback.ts:507-509, :597-642; useClickableContainer.ts:149).
  • Claim: RadioListItem's comment says the row declares the paint of a press the controller does not paint — verified (RadioListItem.tsx:101-104 against rowStyles.press at :197-205).
  • Claim: a [chore] Changeset names @astryxdesign/core — verified (.changeset/nested-press-rule-name.md:2).
  • Claim: #9393 gets a one-line conflict in Item.tsx — verified (#9393 adds an import directly after cancelNestedTouchPress).
  • Claim: no behavior or logic changes, and the Changeset's "No change to any component's behavior or API" — verified (the rule's body useClickableContainer.ts:146-159 and every call's arguments are unchanged).
  • Claim: CI impact none — verified (no workflow or CI file changed).
  • Claim: the unit suite passes, tsc and pnpm lint:strict report 0 errors, pnpm check:knowledge is aligned, and the Changeset coverage and public text checks pass — not verified (CI has not run on this head).
  • File .changeset/nested-press-rule-name.md — clear.
  • File docs/specs/components/CheckboxInput/CheckboxInput.spec.md — clear (owner-approved for this head).
  • File docs/specs/components/Item/Item.spec.md — clear (owner-approved for this head).
  • File packages/core/src/Item/Item.tsx — clear.
  • File packages/core/src/RadioList/RadioListItem.tsx — clear.
  • File packages/core/src/Token/Token.tsx — clear.
  • File packages/core/src/TreeList/TreeListItem.tsx — clear.
  • File packages/core/src/hooks/useClickableContainer.ts — clear.

Automated review (maintainer link)

CheckboxInput and RadioListItem wrote selectors on the private press
attribute themselves. press.stylex.ts, the attribute's owner, now
exports those styles ready-made: indicatorPressPaintStyles for the
layer over a selection control's box, and rowPressPaintStyles.radioRow
for a RadioList row's paint. The nested-control list moves with the
row's paint, and its source-build test reads the owner module. The
press coverage test counts the owner's ready-made paint as a press arm.

The stylesheet the package builds is byte-identical.
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 11, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 09c796d

@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: one small fix remains. The rename, the two record edits and the move of CheckboxInput's and RadioListItem's press styles into privateAttributes/press.stylex.ts read correctly and keep behavior and the public API unchanged, and both record edits carry spec-owner approval for this head.

  • The private-attribute lint baseline (internal/eslint-plugin-astryx/no-raw-private-attribute.baseline.json) still allows two data-astryx-press sites each in CheckboxInput.tsx and RadioListItem.tsx, which no longer exist, so the lint would accept raw press selectors there again; rerun node internal/eslint-plugin-astryx/no-raw-private-attribute.baseline.mjs and commit the result.

CI has not run on this head because the pull request is a draft. Optional: the press.stylex.ts file header now runs 18 lines and lists every export, and could shrink to its role.

Claims and files checked
  • Claim: the nested-press rule is renamed cancelNestedPress in useClickableContainer.ts and its callers Item, Token and TreeListItem — verified (useClickableContainer.ts:141, :380; Item.tsx:66, :716; Token.tsx:42, :527; TreeListItem.tsx:34, :511).
  • Claim: the old name appears nowhere — verified (no match in the head tree).
  • Claim: the renamed function and the new owner-module styles are not exported by any package entry — verified (hooks/index.ts:108-117; no package.json export reaches privateAttributes/press.stylex.ts).
  • Claim: Item FR9's last sentence reads "Such a mouse press keeps the row's :active paint" — verified (Item.spec.md:117).
  • Claim: the CheckboxInput record says pressBoxesIn lists the press boxes a pressable surface owns, and the press controller calls it for fine-pointer presses — verified (CheckboxInput.spec.md:86; pressFeedback.ts:500-509).
  • Claim: RadioListItem's comment says the row declares the paint of a press the controller does not paint — verified (RadioListItem.tsx:67-71).
  • Claim: the press owner module exports indicatorPressPaintStyles (handDown, activeFill, image) and rowPressPaintStyles.radioRow, and each component composes them where its own style stood — verified (press.stylex.ts:416-481; CheckboxInput.tsx:523, :539-540; RadioListItem.tsx:303, :411).
  • Claim: the nested-control list moves with the row's paint and its source-build test reads the owner module — verified (press.stylex.ts:60-78; RadioListItem.press.source-build.test.mjs:34, :104, :125).
  • Claim: the press coverage test counts the owner's ready-made paint as a press arm — verified (pressableCoverage.test.ts:77-78).
  • Claim: neither CheckboxInput nor RadioListItem names the press attribute — verified in source; false for the lint baseline, which still lists both files (blocking finding).
  • Claim: the press attribute's ownership rule now holds for CheckboxInput and RadioListItem — placement verified; its lint allowance for their old sites remains (blocking finding).
  • Claim: no behavior change, and the Changeset's "No change to any component's behavior or API" — verified by source comparison (verbatim declarations, same marker, same composition order).
  • Claim: the built stylesheet is byte-identical — not verified (not built in this review; CI has not run).
  • Claim: the unit suite, typecheck, strict lint, knowledge check, Changeset and public-text checks and the Playwright press specs pass — not verified (CI has not run on this head).
  • Claim: a [chore] Changeset names @astryxdesign/core — verified (.changeset/nested-press-rule-name.md:2).
  • Claim: #9393 gets a one-line conflict in Item.tsx — verified (it adds an import right after the old name).
  • Claim: CI impact none, public API none, +185/−169 lines in 12 files — verified.
  • File .changeset/nested-press-rule-name.md — clear.
  • File docs/specs/components/CheckboxInput/CheckboxInput.spec.md — clear (spec-owner approval at this head).
  • File docs/specs/components/Item/Item.spec.md — clear (spec-owner approval at this head).
  • File packages/core/src/CheckboxInput/CheckboxInput.tsx — finding: its two lint baseline entries remain.
  • File packages/core/src/Item/Item.tsx — clear.
  • File packages/core/src/RadioList/RadioListItem.press.source-build.test.mjs — clear.
  • File packages/core/src/RadioList/RadioListItem.tsx — finding: its two lint baseline entries remain.
  • File packages/core/src/Token/Token.tsx — clear.
  • File packages/core/src/TreeList/TreeListItem.tsx — clear.
  • File packages/core/src/hooks/useClickableContainer.ts — clear.
  • File packages/core/src/privateAttributes/press.stylex.ts — clear; optional header trim.
  • File packages/core/src/utils/pressableCoverage.test.ts — clear.

Automated review (maintainer link)

CheckboxInput and RadioListItem no longer write data-astryx-press, so
the private-attribute rule's baseline drops their four allowed sites.
The press owner module's header names its role, not each export.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 08b6737

@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: one fix remains. The rename, the two record edits (approved by an engineering owner for this head) and the move of CheckboxInput's and RadioListItem's press styles into privateAttributes/press.stylex.ts keep behavior and the public API unchanged, and the lint baseline and owner header from the last review are fixed.

  • Miss: CheckboxInput.tsx:539-541 spreads the press owner's activeFill and image styles, then under a CheckboxList row sets the same ::after backgroundColor and backgroundImage again through indicatorRowPressOverlay, which INV23 in architecture:public-component-api forbids; compose the two owner styles only when the row does not own the press, as the row already does for handDown, which leaves the stylesheet and the rendered classes unchanged.

CI has not finished on this head yet. Optionally, fix the indicatorPressPaintStyles JSDoc, which calls all three styles the box layer's paint although handDown goes on the row.

Claims and files checked
  • Claim: the nested-press rule is renamed cancelNestedPress in useClickableContainer.ts and its callers Item, Token and TreeListItem: verified (useClickableContainer.ts:141, :380; Item.tsx:66, :716; Token.tsx:42, :527; TreeListItem.tsx:34, :511).
  • Claim: the old name appears nowhere: verified (no match in the head tree).
  • Claim: Item FR9's last sentence reads "Such a mouse press keeps the row's :active paint": verified (Item.spec.md:117).
  • Claim: the CheckboxInput record says pressBoxesIn lists the press boxes a pressable surface owns, and the press controller calls it for fine-pointer presses: verified (CheckboxInput.spec.md:86; pressBox.stylex.ts:41-48; pressFeedback.ts:597-611, :637-642).
  • Claim: RadioListItem's comment says the row declares the paint of a press the controller does not paint: verified (RadioListItem.tsx:67-71).
  • Claim: the press owner module exports indicatorPressPaintStyles (handDown, activeFill, image) and rowPressPaintStyles.radioRow: verified (press.stylex.ts:409-474).
  • Claim: the nested-control list moves with the row's paint and its source-build test reads the owner module: verified (press.stylex.ts:53-71; RadioListItem.press.source-build.test.mjs:34, :104, :125).
  • Claim: the press coverage test counts the owner's ready-made paint as a press arm: verified (pressableCoverage.test.ts:77-78).
  • Claim: the lint baseline drops the four sites CheckboxInput and RadioListItem no longer write: verified (neither file is listed; neither names the press attribute).
  • Claim: the ownership rule holds for CheckboxInput and RadioListItem: true for RadioListItem; false for CheckboxInput, which re-sets two properties the owner's styles set (blocking finding).
  • Claim: no behavior change, and the Changeset's "No change to any component's behavior or API": verified by source comparison (same declarations, conditions and composition order).
  • Claim: the two records keep their meaning: verified; an engineering owner approved both edits for this head.
  • Claim: the built stylesheet is byte-identical: not verified in this review.
  • Claim: the unit suite, typecheck, strict lint, knowledge check, Changeset and public-text checks and the Playwright press specs pass: not verified (CI had not finished on this head).
  • Claim: a [chore] Changeset names @astryxdesign/core: verified (.changeset/nested-press-rule-name.md:2).
  • Claim: #9393 gets a one-line conflict in Item.tsx: verified (it adds an import right after the old name).
  • Claim: public API none, CI impact none, +185/−184 lines in 13 files: verified.
  • Claim: the writing rubric finds no narration, research, change evidence, alternatives, references, open options or status in the two record lines: verified.
  • File .changeset/nested-press-rule-name.md: clear.
  • File docs/specs/components/CheckboxInput/CheckboxInput.spec.md: clear (owner-approved at this head).
  • File docs/specs/components/Item/Item.spec.md: clear (owner-approved at this head).
  • File internal/eslint-plugin-astryx/no-raw-private-attribute.baseline.json: clear.
  • File packages/core/src/CheckboxInput/CheckboxInput.tsx: finding (lines 539-541).
  • File packages/core/src/Item/Item.tsx: clear.
  • File packages/core/src/RadioList/RadioListItem.press.source-build.test.mjs: clear.
  • File packages/core/src/RadioList/RadioListItem.tsx: clear.
  • File packages/core/src/Token/Token.tsx: clear.
  • File packages/core/src/TreeList/TreeListItem.tsx: clear.
  • File packages/core/src/hooks/useClickableContainer.ts: clear.
  • File packages/core/src/privateAttributes/press.stylex.ts: clear; optional JSDoc fix.
  • File packages/core/src/utils/pressableCoverage.test.ts: clear.

Automated review (maintainer link)

Under a row that owns the press, CheckboxInput's row overlay paints the
box. So CheckboxInput no longer composes the press owner's activeFill
and image styles there, only for StyleX to drop them. The rendered
classes and the stylesheet stay the same. The owner's JSDoc says where
each of its indicator styles goes.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 5c0053c

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet. The pull request is still a draft, so marking it ready for review starts its CI run; the ci:run label is already on.

The overlap from the last review is fixed: CheckboxInput's box layer now composes the row's overlay or the press owner's paint, never both, and nothing renders differently. The rename, the two record edits (approved by an engineering owner for this head) and the move of the press styles into privateAttributes/press.stylex.ts keep behavior and the public API unchanged.

  • Optional: the new comment at CheckboxInput.tsx:539-540 restates the ternary below it; the inline comment suggests a version that keeps only the constraint.
Claims and files checked
  • Claim: CheckboxInput and RadioListItem no longer write selectors on the private press attribute: verified (neither CheckboxInput.tsx nor RadioListItem.tsx names it).
  • Claim: no behavior change: verified by source (every moved declaration keeps its value, condition and element; press.stylex.ts:409-417, :433-474).
  • Claim: the built stylesheet is byte-identical: consistent with the source (each moved rule keeps its property, value and condition); the build was not reproduced here.
  • Claim: the Item and CheckboxInput records keep their meaning: verified; an engineering owner approved both edits for this head.
  • Claim: the ownership rule holds for CheckboxInput and RadioListItem: verified (CheckboxInput.tsx:541-547 composes the row overlay or the owner's paint, never both; RadioListItem.tsx:299-304, :411).
  • Claim: the nested-press rule is renamed cancelNestedPress in useClickableContainer.ts and its callers Item, Token and TreeListItem: verified (useClickableContainer.ts:141, :380; Item.tsx:66, :716; Token.tsx:42, :527; TreeListItem.tsx:34, :511).
  • Claim: the old name appears nowhere: verified (no match under packages/, docs/, internal/ or apps/).
  • Claim: Item FR9's last sentence reads "Such a mouse press keeps the row's :active paint": verified (Item.spec.md:117).
  • Claim: the CheckboxInput record says pressBoxesIn lists the press boxes a pressable surface owns, and the press controller calls it for fine-pointer presses: verified (CheckboxInput.spec.md:86; pressBox.stylex.ts:40-48; pressFeedback.ts:498-508, :597-603, :636-642, for every primary mouse press and every pen press).
  • Claim: RadioListItem's comment says the row declares the paint of a press the controller does not paint: verified (RadioListItem.tsx:67-71).
  • Claim: the press owner module exports indicatorPressPaintStyles (handDown, activeFill, image) and rowPressPaintStyles.radioRow: verified (press.stylex.ts:409-417, :426-475).
  • Claim: the nested-control list moves with the row's paint and its source-build test reads the owner module: verified (press.stylex.ts:53-71; RadioListItem.press.source-build.test.mjs:34, :96, :104, :125).
  • Claim: the press coverage test counts the owner's ready-made paint as a press arm: verified (pressableCoverage.test.ts:77-78; without it RadioListItem would drop out of the checked set).
  • Claim: CheckboxInput composes activeFill and image only where its row does not own the press: verified (CheckboxInput.tsx:541-547).
  • Claim: the lint baseline drops the four sites the two components no longer write: verified (the baseline lists neither file).
  • Claim: a [chore] Changeset names @astryxdesign/core: verified (.changeset/nested-press-rule-name.md:2).
  • Claim: the Changeset's "No change to any component's behavior or API": verified by source.
  • Claim: another open pull request that adds an import beside the old name in Item.tsx gets a one-line conflict: verified (its patch adds the import right after the old name).
  • Claim: public API none; internal rename and two unexported style objects: verified (hooks/index.ts:108-113; no package export reaches privateAttributes/press.stylex.ts).
  • Claim: CI impact none: verified (no workflow, script or build file changes).
  • Claim: public text carries no internal context: verified.
  • Claim: the writing rubric finds nothing in the two record lines: verified.
  • Claim: +193/−185 lines in 13 files: verified.
  • Claim: the unit suite, typecheck, strict lint, knowledge check, Changeset and public-text checks, the focused CheckboxInput, CheckboxList, RadioList and press coverage tests, the Playwright press specs and the render probe pass: not reproduced here; CI has not run on this head.
  • File .changeset/nested-press-rule-name.md: clear.
  • File docs/specs/components/CheckboxInput/CheckboxInput.spec.md: clear (owner-approved for this head).
  • File docs/specs/components/Item/Item.spec.md: clear (owner-approved for this head).
  • File internal/eslint-plugin-astryx/no-raw-private-attribute.baseline.json: clear.
  • File packages/core/src/CheckboxInput/CheckboxInput.tsx: clear; optional comment rewrite at lines 539-540.
  • File packages/core/src/Item/Item.tsx: clear.
  • File packages/core/src/RadioList/RadioListItem.press.source-build.test.mjs: clear.
  • File packages/core/src/RadioList/RadioListItem.tsx: clear.
  • File packages/core/src/Token/Token.tsx: clear.
  • File packages/core/src/TreeList/TreeListItem.tsx: clear.
  • File packages/core/src/hooks/useClickableContainer.ts: clear.
  • File packages/core/src/privateAttributes/press.stylex.ts: clear.
  • File packages/core/src/utils/pressableCoverage.test.ts: clear.

Automated review (maintainer link)

Comment on lines +539 to +540
// Under a row that owns the press, the row's own overlay paints
// instead of the owner's press paint.

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.

Optional (INV29): this restates the ternary below and leaves out why the two are never composed together. A version that keeps only the constraint:

// The row's overlay and the owner's press paint set the same `::after`
// properties. Compose one of them, so neither overrides the other.

@vjeux
vjeux marked this pull request as ready for review November 11, 2026 21:23
@vjeux
vjeux requested a review from cixzhang as a code owner November 11, 2026 21:23
@vjeux
vjeux marked this pull request as draft November 12, 2026 04:10
@vjeux
vjeux marked this pull request as ready for review November 12, 2026 04:10
@vjeux vjeux closed this Nov 12, 2026
@vjeux vjeux reopened this Nov 12, 2026
@vjeux
vjeux marked this pull request as draft November 12, 2026 05:35
@vjeux
vjeux marked this pull request as ready for review November 12, 2026 05:36
@vjeux
vjeux marked this pull request as draft November 12, 2026 06:18
@vjeux vjeux closed this Nov 12, 2026
@vjeux vjeux reopened this Nov 12, 2026
@vjeux
vjeux marked this pull request as ready for review November 12, 2026 06:21
@vjeux
vjeux marked this pull request as draft November 12, 2026 07:10
Main brings in the Item swipe change. It edits Item.tsx's swipe props
and one dev warning, a few lines below this branch's renamed call. The
merge needs no hand edit.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 43751a8

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet. The pull request is still a draft, so marking it ready for review starts its CI run; the ci:run label is already on.

The merge from main is clean and touches nothing this change relies on. The rename, the two record edits (approved by an engineering owner for this head) and the move of the press styles into privateAttributes/press.stylex.ts keep behavior and the public API unchanged.

  • Optional: the comment at CheckboxInput.tsx:539-540 restates the ternary below it; the open inline suggestion keeps only the constraint.
Claims and files checked
  • Claim: CheckboxInput and RadioListItem no longer write selectors on the private press attribute: verified (neither CheckboxInput.tsx nor RadioListItem.tsx names it).
  • Claim: no behavior change: verified by source (each moved declaration keeps its value, condition and element; press.stylex.ts:409-417, :433-474).
  • Claim: the built stylesheet is byte-identical: consistent with the source (each moved rule keeps its property, value and condition); the build was not reproduced here.
  • Claim: the Item and CheckboxInput records keep their meaning: Item FR9's last sentence now covers only the mouse press the sentence before describes; an engineering owner approved both edits for this head.
  • Claim: the ownership rule holds for CheckboxInput and RadioListItem: verified (CheckboxInput.tsx:520-523, :541-547; RadioListItem.tsx:303, :411).
  • Claim: the nested-press rule is renamed cancelNestedPress in useClickableContainer.ts and its callers Item, Token and TreeListItem: verified (useClickableContainer.ts:141, :380; Item.tsx:66, :720; Token.tsx:42, :527; TreeListItem.tsx:34, :511).
  • Claim: the old name appears nowhere: verified (no match under packages/, docs/, internal/ or apps/).
  • Claim: Item FR9's last sentence reads "Such a mouse press keeps the row's :active paint": verified (Item.spec.md:117).
  • Claim: the CheckboxInput record says pressBoxesIn lists the press boxes a pressable surface owns, and the press controller calls it for every fine-pointer press: verified (CheckboxInput.spec.md:86; pressBox.stylex.ts:40-48; pressFeedback.ts:507-509, reached on every primary mouse press where the primary pointer is fine and on every pen press).
  • Claim: RadioListItem's comment says the row declares the paint of a press the controller does not paint: verified (RadioListItem.tsx:67-71).
  • Claim: the press module exports indicatorPressPaintStyles (handDown, activeFill, image) and rowPressPaintStyles.radioRow: verified (press.stylex.ts:409-417, :426-475).
  • Claim: the nested-control list moves with the row's paint and its source-build test reads the press module: verified (press.stylex.ts:53-71; RadioListItem.press.source-build.test.mjs:34, :96, :104, :125).
  • Claim: the press coverage test counts the ready-made paint as a press arm: verified (pressableCoverage.test.ts:78).
  • Claim: CheckboxInput composes activeFill and image only where its row does not own the press: verified (CheckboxInput.tsx:541-547).
  • Claim: the lint baseline drops the four sites the two components no longer write: verified (the baseline lists neither file).
  • Claim: a [chore] Changeset names @astryxdesign/core: verified (.changeset/nested-press-rule-name.md:2).
  • Claim: the Changeset's "No change to any component's behavior or API": verified by source.
  • Claim: another open pull request that adds an import beside the old name in Item.tsx gets a one-line conflict: verified (its patch adds the import right after the old name).
  • Claim: the merge from main needs no hand edit and the change keeps its own patch: verified (the merged tree equals the automatic merge; the patch is unchanged hunk for hunk).
  • Claim: public API none; internal rename and two unexported style objects: verified (hooks/index.ts:108-113; no package export reaches privateAttributes/press.stylex.ts).
  • Claim: CI impact none: verified (no workflow, script or build file changes).
  • Claim: public text carries no internal context: verified.
  • Claim: the writing rubric finds nothing in the two record lines: verified.
  • Claim: +193/−185 lines in 13 files: verified.
  • Claim: the unit suite, typecheck, strict lint, knowledge check, Changeset and public-text checks, the focused tests, the Playwright press specs and the render probe pass: not reproduced here; CI has not run on this head.
  • File .changeset/nested-press-rule-name.md: clear.
  • File docs/specs/components/CheckboxInput/CheckboxInput.spec.md: clear (owner-approved for this head).
  • File docs/specs/components/Item/Item.spec.md: clear (owner-approved for this head).
  • File internal/eslint-plugin-astryx/no-raw-private-attribute.baseline.json: clear.
  • File packages/core/src/CheckboxInput/CheckboxInput.tsx: clear; optional comment rewrite at lines 539-540.
  • File packages/core/src/Item/Item.tsx: clear.
  • File packages/core/src/RadioList/RadioListItem.press.source-build.test.mjs: clear.
  • File packages/core/src/RadioList/RadioListItem.tsx: clear.
  • File packages/core/src/Token/Token.tsx: clear.
  • File packages/core/src/TreeList/TreeListItem.tsx: clear.
  • File packages/core/src/hooks/useClickableContainer.ts: clear.
  • File packages/core/src/privateAttributes/press.stylex.ts: clear.
  • File packages/core/src/utils/pressableCoverage.test.ts: clear.

Automated review (maintainer link)

@vjeux
vjeux marked this pull request as ready for review November 12, 2026 08:16
@cixzhang
cixzhang merged commit 807dc2e into meta:main Nov 12, 2026
135 checks passed
@vjeux
vjeux deleted the core/nested-press-name branch November 12, 2026 09:02
vjeux added a commit to vjeux/astryx that referenced this pull request Nov 12, 2026
Main brings in meta#11304, which drops CheckboxInput's and RadioListItem's
entries from the same lint baseline in another hunk. The merge needs
no hand edit, and the baseline script reports the merged list up to
date.
cixzhang pushed a commit that referenced this pull request Nov 12, 2026
…11314)

* chore(lint): drop Theme.tsx's dead sites from the attribute baseline

Theme.tsx no longer writes two of its data-astryx-id sites and one of
its data-astryx-theme-prose sites, so the private-attribute rule's
baseline drops those three allowances. The rule's baseline script now
reports the list up to date.

* Merge main 2aa31a3 into the Theme.tsx baseline cleanup

Main brings in #11304, which drops CheckboxInput's and RadioListItem's
entries from the same lint baseline in another hunk. The merge needs
no hand edit, and the baseline script reports the merged list up to
date.

This branch was successfully deployed

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants