Skip to content

test(Resizable): load the package root while the file is collected, not inside a timed test - #8471

Merged
cixzhang merged 2 commits into
meta:mainfrom
vjeux:uikit/test-load-flakes
Nov 3, 2026
Merged

cixzhang merged 2 commits into
meta:mainfrom
vjeux:uikit/test-load-flakes

Conversation

@vjeux

@vjeux vjeux commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

User impact

On a loaded machine, a full test run fails Resizable/utils.test.ts › "re-exports Table pixel and percent without a root collision" with a test timeout. It passes alone, and nothing it checks is wrong.

Problem and solution fit

  • Why it times out: the test imports the package root (import('@astryxdesign/core')) inside its body, which loads every module of core. Alone, on an idle machine, that takes 15.6 s (15 s of it transform), half the 30 s test timeout before any contention. Under a loaded parallel run it crosses 30 s, and a smaller CI runner is closer to that than the machine measured here.
  • Why it matters: a timeout that tracks machine load fails runs that have nothing wrong and costs a rerun.
  • The fix: both imports in that test move to the top of the file. Core then loads while the file is collected, which no timeout bounds, so the test's own time is its assertions. The assertions are unchanged.

Expected behavior and authority

A test passes or fails on what it asserts; load changes only how long the run takes.

Smallest restoration

One test file: two static imports replace the two dynamic ones. No timeout changes.

Evidence

  • Reproduction before the change: the full --project ui run on 8 cores with 64 workers fails the test at 30,055 ms ("Test timed out").
  • Result after the change: the same loaded run passes it in 41 ms. Alone it takes 1 ms; the file's import phase carries the 16.6 s.
  • Representative unchanged path: an unloaded full --project ui run (14,780 tests) passes the test before and after.
  • Mutation-sensitive proof: with Resizable/utils.ts defining its own pixel instead of re-exporting Table's, the test fails ("expected [Function pixel] to be [Function pixel]").

DropdownMenuLazySheet.test.tsx, the other test that times out under load, is fixed in #8353.

Scope

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

Testing

Local gates at 25447aa, merged with main d0b6e0f:

  • Prettier and strict ESLint on the file;
  • the core typecheck;
  • the file alone: 5/5;
  • the file ×10 on two pinned cores with two busy loops beside them (4 workers): 10/10 runs pass, 50/50 tests; no test takes over 0.1 s, as collection carries the cold import;
  • main's version of the file on the same profile: 3/3 runs fail at the 30 s test limit;
  • the mutation above (an own pixel in Resizable/utils.ts): 3/3 fail;
  • pnpm test:ui: 18,329/18,329.

…ot inside a timed test

The root-collision check imported all of core inside the test body: about 15 s of transform on an idle machine, against the 30 s test timeout, so a loaded run timed out. The same import at the top of the file runs during collection, which no timeout bounds; the assertions are unchanged.
@astracat-bot

astracat-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 3, 2026, 1:01 AM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 26, 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.

This is ready from a review standpoint: moving the package-root and Resizable/utils imports to the top of the file takes the root's ~13 s load out of the 30 s test window without changing what the test checks. The test still fails when Resizable/utils stops re-exporting Table's pixel or when the package root picks up a colliding pixel, so the re-export guarantee keeps its guard. Nothing further is needed from you.

[Automated review]

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 25447aa

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
charts/Chart 103.4 kB (not measured) · 458 B CSS (not measured) — — · — · —
charts/ChartTooltip 85.6 kB (not measured) · 386 B CSS (not measured) 352 (not measured) — · — · —
AlertDialog · Storybook 54.1 kB (not measured) · 12.2 kB CSS (not measured) 182 (not measured) — · — · —
205 more components
Component Size LoC Visual · A11y · RTL
AppShell · Storybook 55.2 kB (not measured) · 11.4 kB CSS (not measured) 608 (not measured) — · — · —
AspectRatio 3.6 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
Avatar 37.2 kB (not measured) · 6.2 kB CSS (not measured) — — · — · —
AvatarGroup 39.5 kB (not measured) · 6.3 kB CSS (not measured) — — · — · —
AvatarGroupOverflow 39.6 kB (not measured) · 6.2 kB CSS (not measured) — — · — · —
AvatarStatusDot 6.9 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
Badge · Storybook 3.7 kB (not measured) · 3.6 kB CSS (not measured) 189 (not measured) — · — · —
Banner · Storybook 47.2 kB (not measured) · 9.5 kB CSS (not measured) 419 (not measured) — · — · —
BaseTypeahead 53.4 kB (not measured) · 9.7 kB CSS (not measured) — — · — · —
Blockquote 3.4 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
BottomSheet 25.9 kB (not measured) · 7.5 kB CSS (not measured) — — · — · —
BottomSheetSwitcher 9.1 kB (not measured) · 3.2 kB CSS (not measured) — — · — · —
BreadcrumbItem 65.4 kB (not measured) · 10.8 kB CSS (not measured) — — · — · —
Breadcrumbs 22.3 kB (not measured) · 3.1 kB CSS (not measured) — — · — · —
Button · Storybook 42.8 kB (not measured) · 9.0 kB CSS (not measured) 566 (not measured) — · — · —
ButtonGroup · Storybook 8.3 kB (not measured) · 3.2 kB CSS (not measured) 128 (not measured) — · — · —
Calendar · Storybook 54.4 kB (not measured) · 9.8 kB CSS (not measured) 1,641 (not measured) — · — · —
Card 6.3 kB (not measured) · 6.2 kB CSS (not measured) — — · — · —
Carousel · Storybook 48.4 kB (not measured) · 10.0 kB CSS (not measured) 486 (not measured) — · — · —
Center · Storybook 4.0 kB (not measured) · 4.4 kB CSS (not measured) 118 (not measured) — · — · —
ChatComposer 59.9 kB (not measured) · 10.5 kB CSS (not measured) — — · — · —
ChatComposerDrawer 23.7 kB (not measured) · 4.3 kB CSS (not measured) — — · — · —
ChatComposerInput 55.0 kB (not measured) · 9.8 kB CSS (not measured) — — · — · —
ChatComposerTokenElement 55.0 kB (not measured) · 9.8 kB CSS (not measured) — — · — · —
ChatDictationButton 46.0 kB (not measured) · 9.2 kB CSS (not measured) — — · — · —
ChatLayout 48.4 kB (not measured) · 9.7 kB CSS (not measured) — — · — · —
ChatLayoutScrollButton 45.9 kB (not measured) · 9.3 kB CSS (not measured) — — · — · —
ChatMessage 22.9 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
ChatMessageBubble 6.9 kB (not measured) · 3.5 kB CSS (not measured) — — · — · —
ChatMessageList 28.3 kB (not measured) · 7.6 kB CSS (not measured) — — · — · —
ChatMessageMetadata 25.7 kB (not measured) · 3.7 kB CSS (not measured) — — · — · —
ChatSendButton 45.4 kB (not measured) · 9.0 kB CSS (not measured) — — · — · —
ChatSystemMessage 6.6 kB (not measured) · 3.5 kB CSS (not measured) — — · — · —
ChatTokenizedText 6.8 kB (not measured) · 3.7 kB CSS (not measured) — — · — · —
ChatToolCalls 31.7 kB (not measured) · 8.7 kB CSS (not measured) — — · — · —
CheckboxIndicator 4.0 kB (not measured) · 3.7 kB CSS (not measured) — — · — · —
CheckboxInput · Storybook 49.1 kB (not measured) · 9.1 kB CSS (not measured) 355 (not measured) — · — · —
CheckboxList 45.6 kB (not measured) · 7.9 kB CSS (not measured) — — · — · —
CheckboxListItem 53.2 kB (not measured) · 10.2 kB CSS (not measured) — — · — · —
CheckIndicator 8.9 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
Citation · Storybook 25.8 kB (not measured) · 4.0 kB CSS (not measured) 229 (not measured) — · — · —
ClickableCard · Storybook 12.7 kB (not measured) · 6.8 kB CSS (not measured) 229 (not measured) — · — · —
Code · Storybook 3.4 kB (not measured) · 3.2 kB CSS (not measured) 81 (not measured) — · — · —
CodeBlock · Storybook 58.3 kB (not measured) · 10.4 kB CSS (not measured) 1,818 (not measured) — · — · —
Collapsible 11.6 kB (not measured) · 4.1 kB CSS (not measured) — — · — · —
CollapsibleGroup 6.3 kB (not measured) · 3.1 kB CSS (not measured) — — · — · —
CommandPalette 49.1 kB (not measured) · 11.7 kB CSS (not measured) — — · — · —
CommandPaletteEmpty 6.0 kB (not measured) · 3.2 kB CSS (not measured) — — · — · —
CommandPaletteFooter 23.2 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
CommandPaletteGroup 3.3 kB (not measured) · 3.2 kB CSS (not measured) — — · — · —
CommandPaletteInput 31.7 kB (not measured) · 8.0 kB CSS (not measured) — — · — · —
CommandPaletteItem 8.3 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
CommandPaletteList 22.3 kB (not measured) · 3.1 kB CSS (not measured) — — · — · —
ComplexSelector · Storybook 54.8 kB (not measured) · 10.3 kB CSS (not measured) 643 (not measured) — · — · —
ContextMenu · Storybook 77.1 kB (not measured) · 14.2 kB CSS (not measured) 649 (not measured) — · — · —
ContextMenuItem 16.4 kB (not measured) · 5.0 kB CSS (not measured) — — · — · —
DateInput · Storybook 92.3 kB (not measured) · 14.3 kB CSS (not measured) 3,529 (not measured) — · — · —
DateRangeInput · Storybook 63.9 kB (not measured) · 10.9 kB CSS (not measured) 621 (not measured) — · — · —
DateTimeInput · Storybook 101.6 kB (not measured) · 14.7 kB CSS (not measured) 3,609 (not measured) — · — · —
Dialog 13.6 kB (not measured) · 6.9 kB CSS (not measured) — — · — · —
DialogHeader 48.3 kB (not measured) · 9.6 kB CSS (not measured) — — · — · —
Divider · Storybook 6.3 kB (not measured) · 3.4 kB CSS (not measured) 153 (not measured) — · — · —
Drawer 25.4 kB (not measured) · 7.9 kB CSS (not measured) — — · — · —
DrawerHeader 48.4 kB (not measured) · 11.0 kB CSS (not measured) — — · — · —
DropdownMenu 72.1 kB (not measured) · 14.3 kB CSS (not measured) — — · — · —
DropdownMenuCheckboxItem 16.0 kB (not measured) · 5.4 kB CSS (not measured) — — · — · —
DropdownMenuDivider 6.5 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
DropdownMenuGroup 5.9 kB (not measured) · 3.1 kB CSS (not measured) — — · — · —
DropdownMenuItem 15.3 kB (not measured) · 4.9 kB CSS (not measured) — — · — · —
DropdownMenuRadioGroup 5.9 kB (not measured) · 3.1 kB CSS (not measured) — — · — · —
DropdownMenuRadioItem 16.0 kB (not measured) · 5.4 kB CSS (not measured) — — · — · —
DropdownMenuSubMenu 57.2 kB (not measured) · 9.3 kB CSS (not measured) — — · — · —
EmptyState · Storybook 7.5 kB (not measured) · 3.4 kB CSS (not measured) 143 (not measured) — · — · —
Field 43.8 kB (not measured) · 7.7 kB CSS (not measured) — — · — · —
FieldLabel 39.5 kB (not measured) · 6.4 kB CSS (not measured) — — · — · —
FieldStatus · Storybook 10.2 kB (not measured) · 4.0 kB CSS (not measured) 151 (not measured) — · — · —
FileInput · Storybook 53.2 kB (not measured) · 10.1 kB CSS (not measured) 724 (not measured) — · — · —
FormLayout · Storybook 6.2 kB (not measured) · 3.2 kB CSS (not measured) 94 (not measured) — · — · —
Grid 4.2 kB (not measured) · 3.5 kB CSS (not measured) — — · — · —
GridSpan 3.3 kB (not measured) · 3.1 kB CSS (not measured) — — · — · —
Heading 9.0 kB (not measured) · 6.7 kB CSS (not measured) — — · — · —
HoverCard · Storybook 17.0 kB (not measured) · 4.8 kB CSS (not measured) 683 (not measured) — · — · —
HStack 7.2 kB (not measured) · 4.8 kB CSS (not measured) — — · — · —
Icon · Storybook 8.7 kB (not measured) · 3.4 kB CSS (not measured) 618 (not measured) — · — · —
IconButton · Storybook 42.9 kB (not measured) · 9.0 kB CSS (not measured) 17 (not measured) — · — · —
InputGroup 44.4 kB (not measured) · 7.8 kB CSS (not measured) — — · — · —
InputGroupText 6.1 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
Item · Storybook 11.2 kB (not measured) · 4.5 kB CSS (not measured) 1,366 (not measured) — · — · —
Kbd · Storybook 6.6 kB (not measured) · 3.3 kB CSS (not measured) 140 (not measured) — · — · —
LayerProvider 57.1 kB (not measured) · 9.9 kB CSS (not measured) — — · — · —
Layout 8.0 kB (not measured) · 5.4 kB CSS (not measured) — — · — · —
LayoutContent 7.3 kB (not measured) · 4.8 kB CSS (not measured) — — · — · —
LayoutFooter 7.2 kB (not measured) · 4.7 kB CSS (not measured) — — · — · —
LayoutHeader 7.3 kB (not measured) · 4.7 kB CSS (not measured) — — · — · —
LayoutPanel 7.4 kB (not measured) · 4.7 kB CSS (not measured) — — · — · —
Lightbox · Storybook 49.1 kB (not measured) · 9.6 kB CSS (not measured) 751 (not measured) — · — · —
Link 43.2 kB (not measured) · 7.4 kB CSS (not measured) — — · — · —
LinkProvider 3.5 kB (not measured) · 20 B CSS (not measured) — — · — · —
List 6.6 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
ListItem 52.7 kB (not measured) · 10.2 kB CSS (not measured) — — · — · —
Markdown · Storybook 136.5 kB (not measured) · 16.9 kB CSS (not measured) 8,674 (not measured) — · — · —
MetadataList 23.0 kB (not measured) · 3.5 kB CSS (not measured) — — · — · —
MetadataListItem 6.3 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
MobileNav 48.4 kB (not measured) · 9.8 kB CSS (not measured) — — · — · —
MobileNavToggle 45.8 kB (not measured) · 9.2 kB CSS (not measured) — — · — · —
MoreMenu · Storybook 72.3 kB (not measured) · 14.3 kB CSS (not measured) 87 (not measured) — · — · —
MultiSelector · Storybook 75.1 kB (not measured) · 14.1 kB CSS (not measured) 2,630 (not measured) — · — · —
NavHeadingMenu 8.8 kB (not measured) · 3.1 kB CSS (not measured) — — · — · —
NavIcon · Storybook 3.3 kB (not measured) · 3.2 kB CSS (not measured) 48 (not measured) — · — · —
NumberInput · Storybook 55.1 kB (not measured) · 10.4 kB CSS (not measured) 1,143 (not measured) — · — · —
Outline · Storybook 28.5 kB (not measured) · 3.9 kB CSS (not measured) 1,216 (not measured) — · — · —
OverflowList · Storybook 8.4 kB (not measured) · 3.4 kB CSS (not measured) 229 (not measured) — · — · —
Overlay · Storybook 14.2 kB (not measured) · 3.7 kB CSS (not measured) 451 (not measured) — · — · —
Pagination · Storybook 86.8 kB (not measured) · 14.8 kB CSS (not measured) 645 (not measured) — · — · —
Popover · Storybook 46.9 kB (not measured) · 9.2 kB CSS (not measured) 686 (not measured) — · — · —
PowerSearch · Storybook 147.2 kB (not measured) · 18.1 kB CSS (not measured) 3,948 (not measured) — · — · —
ProgressBar · Storybook 7.6 kB (not measured) · 6.4 kB CSS (not measured) 373 (not measured) — · — · —
RadioIndicator 3.7 kB (not measured) · 3.6 kB CSS (not measured) — — · — · —
RadioList 45.2 kB (not measured) · 7.8 kB CSS (not measured) — — · — · —
RadioListItem 51.8 kB (not measured) · 9.5 kB CSS (not measured) — — · — · —
ResizeHandle 25.0 kB (not measured) · 3.7 kB CSS (not measured) — — · — · —
ScrollableArea · Storybook 10.4 kB (not measured) · 4.2 kB CSS (not measured) 215 (not measured) — · — · —
Section · Storybook 7.4 kB (not measured) · 6.0 kB CSS (not measured) 230 (not measured) — · — · —
SegmentedControl 38.5 kB (not measured) · 6.2 kB CSS (not measured) — — · — · —
SegmentedControlItem 8.5 kB (not measured) · 3.7 kB CSS (not measured) — — · — · —
SelectableCard · Storybook 12.6 kB (not measured) · 7.0 kB CSS (not measured) 305 (not measured) — · — · —
Selector 78.2 kB (not measured) · 14.5 kB CSS (not measured) — — · — · —
SelectorOption 14.4 kB (not measured) · 4.8 kB CSS (not measured) — — · — · —
SideNav 55.4 kB (not measured) · 10.3 kB CSS (not measured) — — · — · —
SideNavCollapseButton 46.2 kB (not measured) · 9.2 kB CSS (not measured) — — · — · —
SideNavHeading 54.3 kB (not measured) · 9.9 kB CSS (not measured) — — · — · —
SideNavItem 53.9 kB (not measured) · 9.9 kB CSS (not measured) — — · — · —
SideNavSection 6.4 kB (not measured) · 3.5 kB CSS (not measured) — — · — · —
Skeleton · Storybook 3.7 kB (not measured) · 3.5 kB CSS (not measured) 130 (not measured) — · — · —
Slider · Storybook 48.1 kB (not measured) · 8.3 kB CSS (not measured) 979 (not measured) — · — · —
Spinner · Storybook 26.2 kB (not measured) · 7.4 kB CSS (not measured) 296 (not measured) — · — · —
Stack 6.9 kB (not measured) · 4.8 kB CSS (not measured) — — · — · —
StackItem 5.9 kB (not measured) · 3.2 kB CSS (not measured) — — · — · —
StatusDot · Storybook 18.7 kB (not measured) · 6.0 kB CSS (not measured) 130 (not measured) — · — · —
Step 32.2 kB (not measured) · 5.1 kB CSS (not measured) — — · — · —
Stepper 47.0 kB (not measured) · 9.3 kB CSS (not measured) — — · — · —
Switch · Storybook 48.0 kB (not measured) · 9.1 kB CSS (not measured) 569 (not measured) — · — · —
Tab 9.6 kB (not measured) · 4.0 kB CSS (not measured) — — · — · —
Table 83.2 kB (not measured) · 14.6 kB CSS (not measured) — — · — · —
TableBody 3.2 kB (not measured) · 3.0 kB CSS (not measured) — — · — · —
TableCell 78.1 kB (not measured) · 14.3 kB CSS (not measured) — — · — · —
TableFooter 3.2 kB (not measured) · 3.0 kB CSS (not measured) — — · — · —
TableHeader 3.2 kB (not measured) · 3.0 kB CSS (not measured) — — · — · —
TableHeaderCell 77.9 kB (not measured) · 14.3 kB CSS (not measured) — — · — · —
TableRow 6.1 kB (not measured) · 3.4 kB CSS (not measured) — — · — · —
TableSelectionToolbar 51.9 kB (not measured) · 11.0 kB CSS (not measured) — — · — · —
TabList 39.9 kB (not measured) · 7.0 kB CSS (not measured) — — · — · —
TabMenu 51.2 kB (not measured) · 9.8 kB CSS (not measured) — — · — · —
Text · Storybook 8.5 kB (not measured) · 6.7 kB CSS (not measured) 530 (not measured) — · — · —
TextArea · Storybook 48.6 kB (not measured) · 9.1 kB CSS (not measured) 462 (not measured) — · — · —
TextInput · Storybook 52.6 kB (not measured) · 10.2 kB CSS (not measured) 380 (not measured) — · — · —
Thumbnail · Storybook 49.6 kB (not measured) · 10.8 kB CSS (not measured) 339 (not measured) — · — · —
TimeInput · Storybook 78.8 kB (not measured) · 13.2 kB CSS (not measured) 1,243 (not measured) — · — · —
Timer · Storybook 9.1 kB (not measured) · 6.7 kB CSS (not measured) 186 (not measured) — · — · —
Timestamp · Storybook 27.4 kB (not measured) · 9.3 kB CSS (not measured) 674 (not measured) — · — · —
Toast · Storybook 53.8 kB (not measured) · 9.5 kB CSS (not measured) 1,361 (not measured) — · — · —
ToggleButton 43.7 kB (not measured) · 9.1 kB CSS (not measured) — — · — · —
ToggleButtonGroup 6.2 kB (not measured) · 3.1 kB CSS (not measured) — — · — · —
Token · Storybook 29.5 kB (not measured) · 4.3 kB CSS (not measured) 459 (not measured) — · — · —
Tokenizer · Storybook 63.8 kB (not measured) · 11.4 kB CSS (not measured) 871 (not measured) — · — · —
Toolbar · Storybook 39.5 kB (not measured) · 7.6 kB CSS (not measured) 269 (not measured) — · — · —
Tooltip · Storybook 16.7 kB (not measured) · 4.8 kB CSS (not measured) 577 (not measured) — · — · —
TopNav 49.2 kB (not measured) · 10.1 kB CSS (not measured) — — · — · —
TopNavHeading 53.7 kB (not measured) · 9.7 kB CSS (not measured) — — · — · —
TopNavItem 8.9 kB (not measured) · 3.7 kB CSS (not measured) — — · — · —
TopNavMegaMenu 53.7 kB (not measured) · 10.5 kB CSS (not measured) — — · — · —
TopNavMegaMenuFeaturedCard 6.6 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
TopNavMegaMenuItem 9.0 kB (not measured) · 3.9 kB CSS (not measured) — — · — · —
TopNavMenu 53.1 kB (not measured) · 9.9 kB CSS (not measured) — — · — · —
TreeList · Storybook 32.4 kB (not measured) · 4.5 kB CSS (not measured) 872 (not measured) — · — · —
Typeahead 60.5 kB (not measured) · 11.0 kB CSS (not measured) — — · — · —
TypeaheadItem 6.1 kB (not measured) · 3.3 kB CSS (not measured) — — · — · —
VStack 7.2 kB (not measured) · 4.8 kB CSS (not measured) — — · — · —
lab/ChatEmojiPicker 58.3 kB (not measured) · 773 B CSS (not measured) — — · — · —
lab/ChatReactionBar 58.9 kB (not measured) · 1.1 kB CSS (not measured) — — · — · —
lab/ChatTypingIndicator 23.3 kB (not measured) · 612 B CSS (not measured) — — · — · —
lab/ChatUnreadDivider 3.4 kB (not measured) · 343 B CSS (not measured) — — · — · —
lab/CircularProgress · Storybook 7.0 kB (not measured) · 1022 B CSS (not measured) 328 (not measured) — · — · —
lab/CodeEditor · Storybook 12.8 kB (not measured) · 665 B CSS (not measured) 461 (not measured) — · — · —
lab/CommentComposer 92.2 kB (not measured) · 1.9 kB CSS (not measured) — — · — · —
lab/CommentPin · Storybook 47.1 kB (not measured) · 1.2 kB CSS (not measured) 386 (not measured) — · — · —
lab/Comments 208.7 kB (not measured) · 2.5 kB CSS (not measured) — — · — · —
lab/CommentThread 203.8 kB (not measured) · 2.4 kB CSS (not measured) — — · — · —
lab/DiffViewer · Storybook 43.6 kB (not measured) · 2.1 kB CSS (not measured) 2,173 (not measured) — · — · —
lab/EmojiPicker · Storybook 62.0 kB (not measured) · 722 B CSS (not measured) 3,581 (not measured) — · — · —
lab/InfoTip · Storybook 21.4 kB (not measured) · 458 B CSS (not measured) 68 (not measured) — · — · —
lab/ListInput · Storybook 63.4 kB (not measured) · 1.6 kB CSS (not measured) 1,760 (not measured) — · — · —
lab/LogStream · Storybook 7.8 kB (not measured) · 1.6 kB CSS (not measured) 468 (not measured) — · — · —
lab/MobilePowerSearch · Storybook 151.0 kB (not measured) · 1.4 kB CSS (not measured) 2,492 (not measured) — · — · —
lab/MobileTokenizer · Storybook 85.0 kB (not measured) · 775 B CSS (not measured) 598 (not measured) — · — · —
lab/Schedule · Storybook 65.0 kB (not measured) · 3.9 kB CSS (not measured) 4,750 (not measured) — · — · —
lab/Stat · Storybook 4.0 kB (not measured) · 644 B CSS (not measured) 203 (not measured) — · — · —
lab/SVGIcon · Storybook 7.4 kB (not measured) · 761 B CSS (not measured) 1,337 (not measured) — · — · —
lab/Tour 3.7 kB (not measured) · 20 B CSS (not measured) — — · — · —
lab/TourStep 50.2 kB (not measured) · 590 B CSS (not measured) — — · — · —
lab/TransferList 61.1 kB (not measured) · 1.7 kB CSS (not measured) — — · — · —
lab/TransferListSelector 67.1 kB (not measured) · 1.9 kB CSS (not measured) — — · — · —
richtext/RichTextEditor · Storybook 267.6 kB (not measured) · 2.6 kB CSS (not measured) 659 (not measured) — · — · —
richtext/RichTextEditorToolbar 212.8 kB (not measured) · 454 B CSS (not measured) 870 (not measured) — · — · —
richtext/RichTextView 248.7 kB (not measured) · 2.3 kB CSS (not measured) 178 (not measured) — · — · —

Wide change (118 components): add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.

⚠️ Approximate analysis - the diff could not be resolved to a merge base, so a two-dot fallback was used. The component list may include base-only changes or miss a component whose change also landed on base.


Generated by PR Enrichment workflow | View full report

This was referenced Oct 26, 2026
@vjeux
vjeux marked this pull request as draft October 29, 2026 22:36
cixzhang pushed a commit that referenced this pull request Oct 31, 2026
…very move (#7782)

## User impact

With `autoSaveId` (on `useResizable` or `SideNav`'s `resizable` config), a drag writes the saved size to `localStorage` on every `pointermove`. Browsers deliver each changed value to every other same-origin tab as a `storage` event, so one drag sends each of them dozens. In one app adopting Astryx, this save is the largest source of cross-tab storage bursts: about half of them, each a sibling tab receiving 50+ writes a second during a drag.

## Problem and solution fit

1. Why: persistence is an effect keyed on `size`, and a drag changes `size` on every move.
2. Harm: other tabs and `storage` listeners process every intermediate size.
3. Why it matters: the entry restores one size next session; nobody keeps an intermediate one.

## Expected behavior and authority

- `component:Resizable` (current): FR3 gains the rule and the review check projects it: "storage holds the last settled size and receives the final size once when a drag ends, cancels, or unmounts." They need owner approval on this head.
- `autoSaveId` ("remembers the pixel size across sessions") and `spec:AST-010` FR9: same key, `{size, isCollapsed}` shape and final value. FR5's text is unchanged.

## Smallest restoration

- `useResizable.ts`: the persistence effect holds the size during a gesture and writes it once in the commit that applies the release, the first render to know the final size (a re-clamp, or a move the release came before). A region unmounting mid-gesture writes it on the way out.
- `Resizable.spec.md`: the FR3 sentence, the review check projecting it (first clause narrowed to settled values; the table re-pads), and FR3's verification row.

No API, default, key or format change. Keyboard steps, Enter, double-click, `resize()`, `collapse()` and `expand()` finish in one event and still write at once. Observable difference: a page closed mid-drag restores the pre-drag size.

## Evidence

- Before: in Chromium, a 60-move drag of a Storybook handle sent a second tab 60 `storage` events; in jsdom, a 30-move drag wrote 30 times.
- After: one event, on release, with main's final value (`{"size":519,"isCollapsed":false}`); jsdom: one write on `pointerup`, `pointercancel`, `lostpointercapture` or the handle's unmount, none mid-drag.
- Unchanged path: three ArrowRight steps still write 210, 220, 230.
- Tests: drag-end, unmount and keyboard cases in `ResizeHandle.test.tsx`; release, same-batch, unmount and re-clamp cases in `useResizable.test.ts`, each asserting one final write. An older test now ends its gesture before reading storage.

## Scope

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

## Writing rubric results

- R1 narration: none.
- R2 research: none.
- R3 evidence: FR3's verification cell names tests, not a pull request.
- R4 rejected alternatives: none.
- R5 change references: none.
- R6 open questions: none.

## Testing

Local gates at `1a138a9` (one commit on main `dade717c5`; the patch is byte-identical to the previous head's):

- Red: with main's `useResizable.ts`, eight new cases fail, including the three "saves the size once, when a drag ends on …" cases (`expected [ …(30) ] to have a length of +0 but got 30`); with an earlier version that wrote from the end and cancel handlers, the same-batch, re-clamp and unmount cases fail. Green: the Resizable and SideNav suites pass, 451/452; the one failure is `utils.test.ts`, which also times out alone on main `dade717c5` (the open #8471 fixes it).
- `pnpm build`, `pnpm -F @astryxdesign/core typecheck`, `pnpm check:knowledge`, `pnpm lint` (`check:repo` and `eslint .`: 0 errors, none in changed files), `prettier --check`, `check:changesets` and changeset coverage pass.
- Chromium 149, Storybook dev (`Core/Hooks/useResizable`, Structured Percent Sizing), checking the served `useResizable.ts` on each run: `storage` events in a second tab during a 60-move drag: main 60; this head 0, then 1 on release. Both end at `{"size":519,"isCollapsed":false}`.
- Full suites, on the same patch over main `a587813542`: `pnpm test:ui` 17,066/17,070 and `pnpm test:node` 14,672/14,681, under heavy machine load. None of the failing files reads a file this pull request changes, and each either passed alone or failed the same way alone on that main.
Comment-only: the repository's source-comments rule asks for sentences of 25 words at most.
@vercel

vercel Bot commented Nov 3, 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 3, 2026 12:52am UTC

Request Review

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is ready from a review standpoint: moving the package-root and Resizable/utils imports to the top of the file takes the root's ~13 s load out of the 30 s test window without changing what the test checks. The test still fails when Resizable/utils stops re-exporting Table's pixel or when the package root picks up a colliding pixel, so the re-export guarantee keeps its guard. Nothing further is needed from you.

[Automated review]

@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 3, 2026
@cixzhang
cixzhang marked this pull request as ready for review November 3, 2026 01:16
@cixzhang
cixzhang merged commit cae1f66 into meta:main Nov 3, 2026
107 checks passed
@vjeux
vjeux deleted the uikit/test-load-flakes branch November 3, 2026 02:19

This branch was successfully deployed

1 active deployment
Preview — 25447aaf Deployed Nov 3, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants