Repository navigation
fix(core): drop 'use client' from the package root and the component barrels - #11106
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| charts/Chart | 206.2 kB (0) · 494 B CSS (0) | — | — · — · — |
| AlertDialog · Storybook | 106.7 kB (0) · 14.6 kB CSS (0) | 210 (−1) | — · — · — |
| AppShell · Storybook | 92.9 kB (0) · 13.5 kB CSS (0) | 1,152 (−1) | — · — · — |
181 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Avatar | 44.2 kB (0) · 5.6 kB CSS (0) | — | — · — · — |
| AvatarGroup | 47.0 kB (0) · 5.7 kB CSS (0) | — | — · — · — |
| AvatarGroupOverflow | 49.9 kB (0) · 5.7 kB CSS (0) | — | — · — · — |
| AvatarStatusDot | 7.6 kB (0) · 3.5 kB CSS (0) | — | — · — · — |
| Banner · Storybook | 63.3 kB (0) · 10.5 kB CSS (0) | 512 (−1) | — · — · — |
| BaseTypeahead | 73.0 kB (0) · 10.9 kB CSS (0) | — | — · — · — |
| BottomSheet | 69.0 kB (0) · 7.7 kB CSS (0) | — | — · — · — |
| BottomSheetSwitcher | 18.5 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 85.9 kB (0) · 12.1 kB CSS (0) | — | — · — · — |
| Breadcrumbs | 16.5 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| Button · Storybook | 61.3 kB (0) · 10.0 kB CSS (0) | 689 (−1) | — · — · — |
| ButtonGroup · Storybook | 41.9 kB (0) · 3.7 kB CSS (0) | 155 (−1) | — · — · — |
| Calendar · Storybook | 72.3 kB (0) · 10.6 kB CSS (0) | 1,748 (−1) | — · — · — |
| Carousel · Storybook | 71.1 kB (0) · 10.9 kB CSS (0) | 628 (−1) | — · — · — |
| ChatComposer | 79.6 kB (0) · 12.0 kB CSS (0) | — | — · — · — |
| ChatComposerDrawer | 18.0 kB (0) · 4.7 kB CSS (0) | — | — · — · — |
| ChatComposerInput | 77.3 kB (0) · 11.3 kB CSS (0) | — | — · — · — |
| ChatComposerTokenElement | 77.3 kB (0) · 11.3 kB CSS (0) | — | — · — · — |
| ChatDictationButton | 61.8 kB (0) · 10.1 kB CSS (0) | — | — · — · — |
| ChatLayout | 84.0 kB (0) · 10.5 kB CSS (0) | — | — · — · — |
| ChatLayoutScrollButton | 61.8 kB (0) · 10.2 kB CSS (0) | — | — · — · — |
| ChatMessage | 17.2 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| ChatMessageBubble | 7.6 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| ChatMessageList | 29.8 kB (0) · 7.0 kB CSS (0) | — | — · — · — |
| ChatMessageMetadata | 20.3 kB (0) · 4.1 kB CSS (0) | — | — · — · — |
| ChatSendButton | 61.7 kB (0) · 10.0 kB CSS (0) | — | — · — · — |
| ChatSystemMessage | 7.1 kB (0) · 3.8 kB CSS (0) | — | — · — · — |
| ChatTokenizedText | 7.3 kB (0) · 4.0 kB CSS (0) | — | — · — · — |
| ChatToolCalls | 33.7 kB (0) · 8.3 kB CSS (0) | — | — · — · — |
| CheckboxInput · Storybook | 65.4 kB (0) · 9.2 kB CSS (0) | 441 (−4) | — · — · — |
| CheckboxList | 69.7 kB (0) · 7.7 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 72.4 kB (0) · 11.4 kB CSS (0) | — | — · — · — |
| Citation · Storybook | 20.6 kB (0) · 4.4 kB CSS (0) | 233 (−1) | — · — · — |
| ClickableCard · Storybook | 18.1 kB (0) · 7.3 kB CSS (0) | 292 (−1) | — · — · — |
| CodeBlock · Storybook | 76.4 kB (0) · 11.3 kB CSS (0) | 2,245 (−1) | — · — · — |
| Collapsible | 28.4 kB (0) · 4.5 kB CSS (0) | — | — · — · — |
| CollapsibleGroup | 6.9 kB (0) · 3.3 kB CSS (0) | — | — · — · — |
| CommandPalette | 74.4 kB (0) · 12.7 kB CSS (0) | — | — · — · — |
| CommandPaletteEmpty | 6.5 kB (0) · 3.5 kB CSS (0) | — | — · — · — |
| CommandPaletteFooter | 17.5 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| CommandPaletteGroup | 3.7 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| CommandPaletteInput | 33.4 kB (0) · 7.5 kB CSS (0) | — | — · — · — |
| CommandPaletteItem | 13.1 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| CommandPaletteList | 16.4 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| ComplexSelector · Storybook | 72.2 kB (0) · 11.8 kB CSS (0) | 702 (−1) | — · — · — |
| ContextMenu · Storybook | 110.2 kB (0) · 17.4 kB CSS (0) | 703 (−1) | — · — · — |
| ContextMenuItem | 32.7 kB (0) · 6.3 kB CSS (0) | — | — · — · — |
| DateInput · Storybook | 188.6 kB (0) · 17.0 kB CSS (0) | 5,764 (−1) | — · — · — |
| DateRangeInput · Storybook | 94.2 kB (0) · 12.5 kB CSS (0) | 687 (−1) | — · — · — |
| DateTimeInput · Storybook | 210.3 kB (0) · 18.7 kB CSS (0) | 3,612 (−1) | — · — · — |
| Dialog | 24.8 kB (0) · 6.9 kB CSS (0) | — | — · — · — |
| DialogHeader | 64.1 kB (0) · 11.5 kB CSS (0) | — | — · — · — |
| Divider · Storybook | 5.2 kB (0) · 535 B CSS (0) | 153 (−1) | — · — · — |
| Drawer | 51.8 kB (0) · 8.3 kB CSS (0) | — | — · — · — |
| DrawerHeader | 64.3 kB (0) · 12.9 kB CSS (0) | — | — · — · — |
| DropdownMenu | 98.4 kB (0) · 17.6 kB CSS (0) | — | — · — · — |
| DropdownMenuCheckboxItem | 23.2 kB (0) · 6.6 kB CSS (0) | — | — · — · — |
| DropdownMenuDivider | 5.3 kB (0) · 548 B CSS (0) | — | — · — · — |
| DropdownMenuGroup | 6.4 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| DropdownMenuItem | 22.4 kB (0) · 6.3 kB CSS (0) | — | — · — · — |
| DropdownMenuRadioGroup | 6.6 kB (0) · 3.3 kB CSS (0) | — | — · — · — |
| DropdownMenuRadioItem | 23.3 kB (0) · 6.6 kB CSS (0) | — | — · — · — |
| DropdownMenuSubMenu | 71.3 kB (0) · 9.7 kB CSS (0) | — | — · — · — |
| Field | 56.0 kB (0) · 7.2 kB CSS (0) | — | — · — · — |
| FieldLabel | 52.1 kB (0) · 5.7 kB CSS (0) | — | — · — · — |
| FieldStatus · Storybook | 10.0 kB (0) · 3.6 kB CSS (0) | 163 (−1) | — · — · — |
| FileInput · Storybook | 70.2 kB (0) · 10.9 kB CSS (0) | 786 (−1) | — · — · — |
| FormLayout · Storybook | 6.9 kB (0) · 3.5 kB CSS (0) | 93 (−1) | — · — · — |
| HoverCard · Storybook | 28.7 kB (0) · 4.4 kB CSS (0) | 836 (−1) | — · — · — |
| Icon · Storybook | 8.1 kB (0) · 681 B CSS (0) | 929 (−1) | — · — · — |
| IconButton · Storybook | 61.3 kB (0) · 10.0 kB CSS (0) | 16 (−1) | — · — · — |
| InfoTip · Storybook | 47.6 kB (0) · 5.4 kB CSS (0) | 147 (−1) | — · — · — |
| InputGroup | 57.6 kB (0) · 7.8 kB CSS (0) | — | — · — · — |
| InputGroupText | 6.7 kB (0) · 3.9 kB CSS (0) | — | — · — · — |
| Item · Storybook | 17.6 kB (0) · 5.5 kB CSS (0) | 1,747 (−1) | — · — · — |
| LayerProvider | 4.4 kB (0) · 20 B CSS (0) | — | — · — · — |
| Layout | 7.1 kB (0) · 2.3 kB CSS (0) | — | — · — · — |
| LayoutContent | 17.8 kB (0) · 1.7 kB CSS (0) | — | — · — · — |
| LayoutFooter | 6.3 kB (0) · 1.6 kB CSS (0) | — | — · — · — |
| LayoutHeader | 6.3 kB (0) · 1.6 kB CSS (0) | — | — · — · — |
| LayoutPanel | 21.7 kB (0) · 4.9 kB CSS (0) | — | — · — · — |
| Lightbox · Storybook | 123.8 kB (0) · 10.6 kB CSS (0) | 3,404 (−8) | — · — · — |
| Link | 54.1 kB (0) · 7.0 kB CSS (0) | — | — · — · — |
| LinkProvider | 3.8 kB (0) · 20 B CSS (0) | — | — · — · — |
| List | 18.9 kB (0) · 790 B CSS (0) | — | — · — · — |
| ListItem | 71.4 kB (0) · 11.4 kB CSS (0) | — | — · — · — |
| Markdown · Storybook | 190.0 kB (0) · 20.7 kB CSS (0) | 8,865 (−1) | — · — · — |
| MetadataList | 17.3 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| MetadataListItem | 7.1 kB (0) · 3.5 kB CSS (0) | — | — · — · — |
| MobileNav | 71.8 kB (0) · 10.6 kB CSS (0) | — | — · — · — |
| MobileNavToggle | 61.6 kB (0) · 10.0 kB CSS (0) | — | — · — · — |
| MoreMenu · Storybook | 98.6 kB (0) · 17.6 kB CSS (0) | 91 (−1) | — · — · — |
| MultiSelector · Storybook | 96.3 kB (0) · 16.8 kB CSS (0) | 2,708 (−1) | — · — · — |
| NavHeadingMenu | 16.8 kB (0) · 3.5 kB CSS (0) | — | — · — · — |
| NumberInput · Storybook | 72.8 kB (0) · 11.4 kB CSS (0) | 1,339 (−1) | — · — · — |
| Outline · Storybook | 24.9 kB (0) · 4.1 kB CSS (0) | 1,193 (−1) | — · — · — |
| OverflowList · Storybook | 10.7 kB (0) · 3.6 kB CSS (0) | 233 (−1) | — · — · — |
| Overlay · Storybook | 22.5 kB (0) · 3.9 kB CSS (0) | 456 (−1) | — · — · — |
| Pagination · Storybook | 111.6 kB (0) · 17.8 kB CSS (0) | 660 (−1) | — · — · — |
| Popover · Storybook | 92.2 kB (0) · 14.2 kB CSS (0) | 1,548 (−1) | — · — · — |
| PowerSearch · Storybook | 291.8 kB (0) · 24.2 kB CSS (0) | 7,140 (−1) | — · — · — |
| ProgressBar · Storybook | 11.9 kB (0) · 6.3 kB CSS (0) | 567 (−1) | — · — · — |
| RadioList | 57.4 kB (0) · 7.3 kB CSS (0) | — | — · — · — |
| RadioListItem | 68.5 kB (0) · 10.1 kB CSS (0) | — | — · — · — |
| ResizeHandle | 22.0 kB (0) · 4.3 kB CSS (0) | — | — · — · — |
| SegmentedControl | 97.2 kB (0) · 6.9 kB CSS (0) | — | — · — · — |
| SegmentedControlItem | 17.5 kB (0) · 4.3 kB CSS (0) | — | — · — · — |
| Selector | 101.5 kB (0) · 17.4 kB CSS (0) | — | — · — · — |
| SelectorOption | 21.1 kB (0) · 6.1 kB CSS (0) | — | — · — · — |
| SideNav | 116.0 kB (0) · 11.4 kB CSS (0) | — | — · — · — |
| SideNavCollapseButton | 62.1 kB (0) · 10.0 kB CSS (0) | — | — · — · — |
| SideNavHeading | 76.8 kB (0) · 11.3 kB CSS (0) | — | — · — · — |
| SideNavItem | 71.6 kB (0) · 11.1 kB CSS (0) | — | — · — · — |
| SideNavSection | 7.1 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| Slider · Storybook | 110.2 kB (0) · 8.8 kB CSS (0) | 2,449 (−1) | — · — · — |
| Spinner · Storybook | 26.4 kB (0) · 6.2 kB CSS (0) | 357 (−1) | — · — · — |
| StatusDot · Storybook | 32.2 kB (0) · 5.3 kB CSS (0) | 150 (−1) | — · — · — |
| Step | 31.1 kB (0) · 5.6 kB CSS (0) | — | — · — · — |
| Stepper | 62.9 kB (0) · 10.1 kB CSS (0) | — | — · — · — |
| Switch · Storybook | 104.8 kB (0) · 9.9 kB CSS (0) | 1,733 (−1) | — · — · — |
| Tab | 14.5 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| Table | 127.1 kB (0) · 18.4 kB CSS (0) | — | — · — · — |
| TableCell | 111.5 kB (0) · 17.9 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 111.1 kB (0) · 17.6 kB CSS (0) | — | — · — · — |
| TableSelectionToolbar | 71.5 kB (0) · 13.2 kB CSS (0) | — | — · — · — |
| TabList | 44.7 kB (0) · 6.5 kB CSS (0) | — | — · — · — |
| TabMenu | 73.0 kB (0) · 11.1 kB CSS (0) | — | — · — · — |
| Text · Storybook | 13.4 kB (0) · 5.4 kB CSS (0) | 716 (−1) | — · — · — |
| TextArea · Storybook | 63.4 kB (0) · 9.3 kB CSS (0) | 491 (−1) | — · — · — |
| TextInput · Storybook | 68.9 kB (0) · 11.2 kB CSS (0) | 416 (−1) | — · — · — |
| Thumbnail · Storybook | 65.6 kB (0) · 11.6 kB CSS (0) | 370 (−1) | — · — · — |
| TimeInput · Storybook | 163.8 kB (0) · 16.0 kB CSS (0) | 1,608 (−1) | — · — · — |
| Timer | 15.6 kB (0) · 6.0 kB CSS (0) | — | — · — · — |
| Timestamp · Storybook | 34.6 kB (0) · 10.2 kB CSS (0) | 914 (−1) | — · — · — |
| Toast · Storybook | 99.2 kB (0) · 10.3 kB CSS (0) | 1,653 (−1) | — · — · — |
| ToggleButton | 87.8 kB (0) · 10.1 kB CSS (0) | — | — · — · — |
| ToggleButtonGroup | 39.3 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| Token · Storybook | 28.6 kB (0) · 4.7 kB CSS (0) | 584 (−1) | — · — · — |
| Tokenizer · Storybook | 93.7 kB (0) · 18.8 kB CSS (0) | 2,339 (−1) | — · — · — |
| Toolbar · Storybook | 44.6 kB (0) · 8.1 kB CSS (0) | 325 (−1) | — · — · — |
| Tooltip · Storybook | 30.5 kB (0) · 4.4 kB CSS (0) | 869 (−1) | — · — · — |
| TopNav | 73.5 kB (0) · 10.9 kB CSS (0) | — | — · — · — |
| TopNavHeading | 76.4 kB (0) · 11.2 kB CSS (0) | — | — · — · — |
| TopNavItem | 14.1 kB (0) · 4.0 kB CSS (0) | — | — · — · — |
| TopNavMegaMenu | 70.9 kB (0) · 11.8 kB CSS (0) | — | — · — · — |
| TopNavMegaMenuFeaturedCard | 7.4 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| TopNavMegaMenuItem | 13.8 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| TopNavMenu | 75.8 kB (0) · 11.2 kB CSS (0) | — | — · — · — |
| TreeList · Storybook | 45.5 kB (0) · 5.6 kB CSS (0) | 1,219 (−1) | — · — · — |
| Typeahead | 81.9 kB (0) · 12.4 kB CSS (0) | — | — · — · — |
| TypeaheadItem | 6.6 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 107.5 kB (0) · 773 B CSS (0) | — | — · — · — |
| lab/ChatReactionBar | 108.6 kB (0) · 1.1 kB CSS (0) | — | — · — · — |
| lab/ChatTypingIndicator | 25.9 kB (0) · 612 B CSS (0) | — | — · — · — |
| lab/ChatVirtualizer | 55.5 kB (0) · 144 B CSS (0) | — | — · — · — |
| lab/CodeEditor | 14.5 kB (0) · 743 B CSS (0) | — | — · — · — |
| lab/CommentComposer | 153.6 kB (0) · 1.9 kB CSS (0) | — | — · — · — |
| lab/CommentPin | 58.2 kB (0) · 1.2 kB CSS (0) | — | — · — · — |
| lab/Comments | 354.4 kB (0) · 2.5 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 347.4 kB (0) · 2.4 kB CSS (0) | — | — · — · — |
| lab/DialogHeroHeader | 84.3 kB (0) · 372 B CSS (0) | — | — · — · — |
| lab/DiffViewer | 88.4 kB (0) · 2.1 kB CSS (0) | — | — · — · — |
| lab/EmojiPicker | 88.0 kB (0) · 751 B CSS (0) | — | — · — · — |
| lab/LineClamp | 15.6 kB (0) · 168 B CSS (0) | — | — · — · — |
| lab/ListInput | 89.3 kB (0) · 922 B CSS (0) | — | — · — · — |
| lab/NavigationScreen | 83.2 kB (0) · 1.5 kB CSS (0) | — | — · — · — |
| lab/NavigationStack | 83.2 kB (0) · 1.5 kB CSS (0) | — | — · — · — |
| lab/Schedule | 107.3 kB (0) · 3.9 kB CSS (0) | — | — · — · — |
| lab/SelectableCardGroup | 65.4 kB (0) · 162 B CSS (0) | — | — · — · — |
| lab/TabBar | 81.2 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| lab/TabBarItem | 3.9 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| lab/TabBarMoreList | 93.6 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| lab/ThreeDChart | 5.1 kB (0) · 20 B CSS (0) | — | — · — · — |
| lab/TourStep | 98.5 kB (0) · 590 B CSS (0) | — | — · — · — |
| lab/TransferList | 103.4 kB (0) · 1.2 kB CSS (0) | — | — · — · — |
| lab/TransferListSelector | 111.1 kB (0) · 1.4 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditor | 299.6 kB (0) · 2.6 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 280.2 kB (0) · 454 B CSS (0) | — | — · — · — |
| richtext/RichTextView | 277.7 kB (0) · 2.3 kB CSS (0) | — | — · — · — |
| charts/ChartTooltip | 183.4 kB (−3 B) · 422 B CSS (0) | — | — · — · — |
| charts/ChartLegend | 53.4 kB (−7 B) · 224 B CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 7.29 MB packed (−187 B); no new dependencies.
API changes: none in this pull request
Committed API report behind this build: cli 57 rows, core 36 rows; run pnpm api:report.
Wide change (shared styles: packages/core/src/theme/index.ts): add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.
Generated by PR Enrichment workflow | View full report
3a549ae to
4d51632
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision about Core's React Server Component module boundary: no current record owns it, since architecture:component-style-authoring leaves client entry points, directive placement and server-safe barrels to a separate module-boundary record and the proposed one (spec:AST-113) is still a draft.
An engineering owner needs to provide or identify that governing record and settle the release class, because a Server Component that passes a directive-free component by reference into a Client Component prop, such as <Markdown components={{inlineCode: Code, blockquote: Blockquote}}>, builds on main and fails at this head under Next.js 16.3.6 with Turbopack ("Functions cannot be passed directly to Client Components"); the owners decide whether this ships as the patch [fix] the changeset declares or as [breaking] in a declared minor with a migration note. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request or approving at this head, and the author may do so as an engineering owner.
The fix itself reproduces: the webpack "export *" in a client boundary failure and the Turbopack client reference on main are gone here, the new barrel and root tests fail on main and pass here, and the failing test-node (3/4) check fails the same way on main.
[Automated review]
…barrels A barrel runs no code, so its directive only turns every module it re-exports into a client reference. Inside a React Server Component, a root import therefore rendered every component as a client reference, including the ones that ship without the directive. Each module now carries its own directive. A test keeps every pass-through barrel free of it and checks that the root's server graph reaches client-only React APIs only through 'use client' modules.
The plugin renderer subpath is a client-only entry by contract, and it re-exports nothing but a client module, so its directive changes nothing. The barrel test now allows the directive on a pass-through barrel only when every module the barrel re-exports is a client module, and fails for any barrel that would turn a server module into a client reference.
4d51632 to
17df2d5
Compare
… to a client prop
|
/approve-spec 70d7c80 |
There was a problem hiding this comment.
Approval waits on an engineering owner's decision about Core's React Server Component module boundary, and one fix is needed either way.
No current record owns client entry points, directive placement or server-safe barrels (architecture:component-style-authoring leaves them to a separate module-boundary record, and spec:AST-113 is still a draft), and a Server Component that passes a directive-free component into a Client Component prop, such as <Markdown components={{inlineCode: Code}}>, builds on main and fails at this head with Next.js 16.3.6; an engineering owner decides whether that ships as the patch [fix] the changeset declares or as [breaking] in a declared minor, and records it by commenting /approve-spec <full head SHA> or approving at this head (the author may do so as an engineering owner).
- Miss:
Selector/SelectorOption.tsxcallsuseSelectorRowLayout()andrenderIconSlot()from client modules but has no'use client'of its own, so once theSelectorand root barrels lose their directive a Server Component that renders<SelectorOption label="Apple" />builds onmainand fails at this head with "Attempted to call useSelectorRowLayout() from the server"; add the directive toSelectorOption.tsxand make the root server-graph test fail when a directive-free module calls a value imported from a'use client'module.
The webpack "export *" in a client boundary failure and the Turbopack root client reference on main are gone at this head, and the new barrel and root tests fail on main and pass here.
[Automated review]
SelectorOption calls useSelectorRowLayout() and renderIconSlot() while it renders, and both come from 'use client' modules. Only the Selector barrel's directive made it a client module, so a Server Component that rendered it would fail once the barrel lost the directive. The server-graph test now also fails when a server module calls, constructs or reads a property of a value from a 'use client' module while it renders or evaluates.
|
/approve-spec 98fd6fc |
There was a problem hiding this comment.
Approved: CI passed on this head.
An engineering owner's /approve-spec for this head settles the open question about making the package root and the family barrels server modules, and about shipping the change to how Server Components pass components into Client Component props as a patch [fix]. The earlier SelectorOption finding is fixed: it now keeps its own 'use client', and the server-graph test fails if a server module calls a client-module value during render. No blocking findings remain.
One small optional follow-up: the description still says no module with runtime code changes, but SelectorOption.tsx now gains a directive.
User impact
Apps that render Astryx from React Server Components and import from the package root, as the docs show (
import {Card} from '@astryxdesign/core'):It's currently unsupported to use "export *" in a client boundary. The root entry is a'use client'module made ofexport *lines.'use client'(Card, Stack, Section, Badge, Code, …). Their code ships to the browser and hydrates. Family subpaths do the same:@astryxdesign/core/Layoutpins VStack and HStack, and the CodeBlock barrel pins Code.After this change, each module's own directive decides. Components that need no client code render on the server, and components that need the client stay client references. Client code resolves the same modules as before.
Problem and solution fit
index.tsfiles) begin with'use client'. A barrel runs no code, so its directive only turns every module it re-exports into a client reference. The directives came from fix: add 'use client' to barrel index.ts files for dist path #816, when tsup inlined every entry (splitting: false). The build is now a 1:1 Babel transform (build(core): precise 'use client' boundaries via 1:1 file transpilation #2472), and every module keeps its own directive, but build(core): precise 'use client' boundaries via 1:1 file transpilation #2472 left the barrels' own directives in place: 79 of today's 87 barrels already carried one then, and the rest gained it later by copying the pattern (one,Overlay/index.ts, had none at build(core): precise 'use client' boundaries via 1:1 file transpilation #2472 and gained it in fix(NavMenu,Overlay): file headers, BaseProps, hover guard, export hygiene #2949).export *, which Next.js cannot proxy, so the build fails.Expected behavior and authority
currentrecord owns React module boundaries yet:architecture:component-style-authoringroutes "directive placement, mixed/server-safe barrels" to a separate owner. The proposed owner,spec:AST-113(draft, spec: React Server Components render presentational paths on the server #11050), lists this as an FR4 gap ("the package root entry is a'use client'module, so a root import inside a Server Component resolves every component as a client reference") and states in FR5 that a server module must not carry'use client'.serverSafeComponents.test.tsalready holds directive-free components to be server modules. A barrel directive undoes that for every caller who imports through the barrel.Smallest restoration
'use client'from 86 pass-throughindex.tsbarrels underpackages/core/src, the root entry included. Each one holds only imports, re-exports, and type declarations. The only module with runtime code that changes isSelectorOption.tsx, which gains its own directive (below).'use client'toSelector/SelectorOption.tsx. It callsuseSelectorRowLayout()andrenderIconSlot()from client modules while it renders, and only the Selector barrel's directive made it a client module.Markdown/plugin-renderer/index.ts:spec:AST-064(DEC-6, FR3) makes that subpath a client-only entry, and it re-exports only a client module, so the directive changes nothing there.'use client'CodeBlock barrel re-exports it, and the Layout barrel re-exports Card, Stack and Section, which the root also exports directly.serverSafeComponents.test.ts(a pass-through barrel carries'use client'only when every module it re-exports is a client module; the root entry is a server module; the root's server graph reaches client-only React APIs only through'use client'modules, and no server module calls, constructs or reads a property of a value from a'use client'module while it renders or evaluates), and a patch changeset.Release class
Patch
[fix], non-breaking. No exported name, prop, type or default changes, and client code resolves the same modules. The one pattern that behaves differently is a Server Component that passes a directive-free component itself into a Client Component prop (for example<Markdown components={{inlineCode: Code}}>): it worked only because the barrel turned every component into a client reference. The changeset says to make that call from a'use client'module.Evidence
Next.js 16.4.6 App Router app. A Server Component page imports
Section, VStack, Card, HStack, Badge, Code, Heading, Text, Divider, Buttonfrom@astryxdesign/core, and a clientProviderswraps the page inThemeandLinkProvider. The "before" build uses the published0.7.13-canary.9b5fdf5dist. The "after" build uses the same dist with the directive removed from exactly the barrels this PR changes."export *" in a client boundaryexperimental.optimizePackageImports: ['@astryxdesign/core'](webpack follows every root re-export unless the import is optimized)import * as Astryx from '@astryxdesign/core'and rendersObject.keys(Astryx).length(530). It builds and renders with both bundlers.Providers(Theme,LinkProvider) and the clientButtonrender and hydrate the same. Client imports resolve the same modules.'use client'back onindex.tsandLayout/index.tsfailskeeps "use client" off every pass-through barrel that re-exports a server moduleandruns the package root as a server module.reaches client-only React APIs only through "use client" modulesfails when a directive-free module the root reaches imports a client-only React API, and whenSelectorOption.tsxloses its directive (it callsuseSelectorRowLayout()andrenderIconSlot()during render).Scope
Components: package root entry, all component and family barrels (
packages/core/src/**/index.ts)Testing
npx vitest run packages/core/src/serverSafeComponents.test.ts packages/core/src/Markdown/parser.public.test.ts: 26 passednode scripts/check-use-client.mjs: 376 client-API files checkedpnpm check:changesets,npx eslintandnpx prettier --checkon the changed filesnext build(Turbopack and--webpack) +next startfor both pages above