Repository navigation
Conversation
Add the draft system spec spec:AST-113 and its implementation plan. Presentational paths render on the server, and small client parts read context or handle interaction. A react-server export condition selects the build, so callers see no new public API. Server and client builds render identical initial DOM. Route React module boundaries from architecture:component-style-authoring to the new record. Co-authored-by: rhagigi <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record spec:AST-113, and three defects in the record need fixing either way.
spec:AST-113 adds requirements that no current record states (FR1–FR10, the Client parts table and DEC-1–DEC-4). An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner.
Blocking
- The Kbd row, FR1 and FR10 give Kbd a client part only for
mod, but currentcomponent:KbdFR3 also switchesctrl,alt,shiftandmetato Apple glyphs after hydration and FR4 takes each named key's spoken name and the joiner from the translator, whicharchitecture:internationalizationINV13 keeps in client context, so the row has to cover any modifier and catalog text. - FR1 and the Text row give a Text with
maxLinesandhasTruncateTooltip={false}no client part, but Text passes its clamp to a nested Link through a client context, socomponent:LinkFR6 ("A Link inside a Text withmaxLinesMUST truncate with that text") breaks unless anymaxLinesabove 0 gets a clamp part. - The FR1/FR2 verification row fails "a presentational render that references a client part" while the table gives every Button, IconButton, TopNav and TopNavItem an unconditional client part, so FR1 and that failure expectation should exclude the unconditional parts the table declares.
Also worth a look: the record should not carry project status, so drop "(verified in a Next.js App Router app and a second RSC bundler)" and keep the next-family choice (OQ1) in plan.md.
[Automated review]
|
|
||
| | Component | Client part references when | Why it needs the client | | ||
| | ------------- | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | | ||
| | Text, Heading | an explicit `maxLines` with the truncation tooltip on | measures overflow and shows the full-text tooltip; at `maxLines={0}` it measures nothing and keeps the element mounted | |
There was a problem hiding this comment.
With hasTruncateTooltip={false} and maxLines above 0 this row (and FR1) gives Text no client part, but Text gives its clamp to a nested Link through a client context (component:Text owns the clamp; component:Link FR6: "A Link inside a Text with maxLines MUST truncate with that text"). A server Text with no client module cannot provide it. Suggest a clamp-scope part for any maxLines above 0, tooltip on or off.
| ### Platform support | ||
|
|
||
| - Supported environments: frameworks and bundlers that honor the | ||
| react-server condition (verified in a Next.js App Router app and a second |
There was a problem hiding this comment.
Non-blocking: "(verified in a Next.js App Router app and a second RSC bundler)" reports what has been verified so far rather than a requirement, and OQ2 still leaves that check open. Suggest dropping the parenthetical and keeping the supported-environment rule.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record spec:AST-113, and five defects in the record need fixing either way.
spec:AST-113 adds requirements that no current record states (FR1–FR11, the Client parts table and DEC-1–DEC-4). An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner.
Blocking
- The Kbd row, FR1 and FR10 give Kbd a client part only for
mod, but currentcomponent:KbdFR3 also switchesctrl,alt,shiftandmetato Apple glyphs after hydration and FR4 takes spoken names and the joiner from the translator, whicharchitecture:internationalizationINV13 keeps in client context, so the row has to cover any modifier, catalog-backed key or multi-key shortcut. - FR11 says a client part only adds behavior after hydration and its check fails a component that changes the server HTML when its client part loads, which fails the record's own Kbd row and current
component:KbdFR3/FR4 (on a Mac, "Ctrl K" named "Control + K" becomes "⌘ K" named "Command + K" after hydration, asspec:AST-013FR9 allows), so FR11 should follow FR6's window and forbid only suspended or fallback HTML. - FR11's "no Astryx component, provider, or layout wraps an application subtree in one" also covers Markdown, which wraps each plugin renderer's output in a Suspense fallback as current
spec:AST-064FR8 andcomponent:Markdownrequire, so scope that sentence to server builds and their client parts or name the Markdown plugin fallback as allowed. - FR1 and the Text row give a Text with
maxLinesandhasTruncateTooltip={false}no client part, but Text passes its clamp to a nested Link through a client context, socomponent:LinkFR6 ("A Link inside a Text withmaxLinesMUST truncate with that text") breaks unless anymaxLinesabove 0 gets a clamp part. - The FR1/FR2 verification row fails "a presentational render that references a client part" while the table gives every Button, IconButton, TopNav and TopNavItem an unconditional client part, so FR1 and that failure expectation should exclude the unconditional parts the table declares.
Also worth a look: the record should not carry project status, so drop "(verified in a Next.js App Router app and a second RSC bundler)", and the description's decision list does not mention FR11 yet.
[Automated review]
| MUST NOT add a Suspense boundary, and no Astryx component, provider, or | ||
| layout wraps an application subtree in one. A client part MUST NOT suspend |
There was a problem hiding this comment.
"No Astryx component, provider, or layout wraps an application subtree in one" also covers Markdown, which wraps each plugin renderer's output in <Suspense fallback={fallback}> (Markdown.tsx, MarkdownPluginNodeRenderer.tsx) as current spec:AST-064 FR8 ("inside core's error boundary and suspense fallback") and component:Markdown require. Suggest scoping this sentence to server builds and their client parts, or naming the Markdown plugin fallback as an allowed boundary.
…e hydration FR6 also forbids any visible change after hydration (spec:AST-013 FR9); FR12 holds pre-hydration behavior to the client build's and names the cases that route to it; FR13 requires the built theme stylesheet. Kbd leaves the zero-client-JavaScript set (OQ3). The client-part section lists the props and contexts that defeat the saving, with LinkProvider gating. The plan puts Text and Heading in phase 1 and Kbd with the next family in phase 2. Co-authored-by: rhagigi <[email protected]>
… render Co-authored-by: rhagigi <[email protected]>
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record spec:AST-113, and six defects in the record need fixing either way.
spec:AST-113 adds requirements that no current record states (FR1–FR13, the Client parts table, the table of props and contexts that defeat the saving, and DEC-1–DEC-4). An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner.
Blocking
- Miss: the TopNav rows give a TopNav in AppShell's mobile bar a server build whose only client part "adds no DOM", but current
component:TopNavFR5 renders a different mobile-bar markup (heading, end content and drawer toggle, no start or center items) and the record's own OQ4 says TopNav inside AppShell renders through its client build, so route TopNav inside AppShell to the client TopNav in the table, FR12 and the defeat table. - The Text row, FR1 and FR10 give a Text with
maxLinesandhasTruncateTooltip={false}no client part, but Text passes its clamp to a nested Link through a client context, socomponent:LinkFR6 ("A Link inside a Text withmaxLinesMUST truncate with that text") breaks unless anymaxLinesabove 0 gets a clamp part. - FR12's gap names only a disabled ButtonGroup, but current
component:ButtonFR10 gives every disabled Button,isDisabledincluded,aria-disabledand nodisabledattribute, so any disabled submit Button submits its form before hydration in either build; widen the gap and drop or explain the disabled-ButtonGroup routing case. - FR11's "no Astryx component, provider, or layout wraps an application subtree in one" also covers Markdown's plugin Suspense fallback, which current
spec:AST-064FR8 requires, so scope that sentence to server builds and their client parts. - FR12 routes every Button and IconButton inside a Toolbar or SideNav to the client build, while the defeat table does so only with no explicit
sizeand FR2 limits client references to the tables' conditions, so narrow FR12 to match. - The FR1/FR2 verification row fails "a presentational render that references a client part" while the table gives every Button, IconButton, TopNav and TopNavItem an unconditional client part, so exclude the unconditional parts the table declares there and in FR1.
Also worth a look: drop "(verified in a Next.js App Router app and a second RSC bundler)" from Platform support, since a record does not carry project status.
[Automated review]
| | TopNav | every server-rendered TopNav: a frame, and a slot scope per slot section | reads the AppShell render mode (desktop bar, mobile bar, drawer) and sets the slot context menus read; adds no DOM | | ||
| | TopNav | no `label` | translates the default landmark label | | ||
| | TopNav | the AppShell drawer, a `ref`, or a function prop | the client TopNav | |
There was a problem hiding this comment.
These rows give a TopNav in AppShell's mobile bar a server build whose frame "adds no DOM", and route only the drawer copy to the client TopNav. Current component:TopNav FR5 makes mobile-bar mode render the heading, end content and drawer toggle with no start or center content, which a server build cannot produce, and OQ4 in this record says TopNav inside AppShell renders through its client build. Suggest routing TopNav inside AppShell (at least its mobile bar) to the client TopNav here, in FR12 and in the defeat table.
| build: a link under a LinkProvider; Button and IconButton inside ButtonGroup, | ||
| InputGroup, Toolbar, or SideNav; a disabled ButtonGroup; and TopNav inside |
There was a problem hiding this comment.
This routes every Button and IconButton inside a Toolbar or SideNav to the client build, but the defeat table loads the full client Button there only "with no explicit size", and FR2 limits client references to the tables' conditions. Toolbar and SideNav only provide a size, so suggest "inside Toolbar or SideNav with no explicit size" here.
|
|
||
| | Contract | Verification | Representative states | Mutation or failure expectation | | ||
| | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | | ||
| | FR1, FR2 | Server render tests that load React's `react-server` build and swap each `'use client'` module for a client reference | Text and Heading with and without `maxLines` and the truncation tooltip; presentational and interactive Button and TopNav props | A hook in a server module throws; a presentational render that references a client part fails | |
There was a problem hiding this comment.
This failure expectation ("a presentational render that references a client part fails") fires on every conforming Button, IconButton, TopNav and TopNavItem, because the Client parts table gives each an unconditional client part (context gate, frame, gate). Suggest "references no client part beyond the unconditional ones the table declares" here and in FR1's first sentence.
…mponents renders faster Co-authored-by: rhagigi <[email protected]>
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record spec:AST-113, and six defects in the record need fixing either way.
spec:AST-113 adds requirements that no current record states (FR1–FR13, the Client parts table, the table of props and contexts that defeat the saving, and DEC-1–DEC-4). An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner.
Blocking
- The TopNav rows give a TopNav in AppShell's mobile bar a server build whose only client part "adds no DOM", but current
component:TopNavFR5 renders a different mobile-bar markup (heading, end content and drawer toggle, no start or center items) and the record's own OQ4 says TopNav inside AppShell renders through its client build, so route TopNav inside AppShell to the client TopNav in the table, FR12 and the defeat table. - The Text row, FR1 and FR10 give a Text with
maxLinesandhasTruncateTooltip={false}no client part, but Text passes its clamp to a nested Link through a client context, socomponent:LinkFR6 ("A Link inside a Text withmaxLinesMUST truncate with that text") breaks unless anymaxLinesabove 0 gets a clamp part. - FR12's gap names only a disabled ButtonGroup, but current
component:ButtonFR10 requires every disabled Button,isDisabledincluded, to stay focusable witharia-disabled, and Button renders nodisabledattribute, so any disabled submit Button submits its form before hydration in either build; widen the gap and drop or explain the disabled-ButtonGroup routing case. - FR11's "no Astryx component, provider, or layout wraps an application subtree in one" also covers Markdown's plugin Suspense fallback, which current
spec:AST-064FR8 requires, so scope that sentence to server builds and their client parts. - FR12 routes every Button and IconButton inside a Toolbar or SideNav to the client build, while the defeat table does so only with no explicit
sizeand FR2 limits client references to the tables' conditions, so narrow FR12 to match. - The FR1/FR2 verification row fails "a presentational render that references a client part" while the Client parts table gives every Button, IconButton, TopNav and TopNavItem an unconditional client part, so exclude the unconditional parts the table declares there and in FR1.
Also worth a look: drop "(verified in a Next.js App Router app and a second RSC bundler)" from Platform support, and say in OQ5 that its separate-condition candidate would change FR4's "client build everywhere else".
[Automated review]
| rendering faster?** (`checkable`) A client build carries effect, gesture, | ||
| and animation code that never runs while a server renders it to HTML. | ||
| Candidates: the `react-server` condition alone (which serves only React | ||
| Server Components); or a separate condition for server rendering of client |
There was a problem hiding this comment.
Non-blocking: this candidate resolves a separate build when a server renders client components, while FR4 requires the client build "everywhere else" than React Server Components. Suggest naming that FR4 consequence in the candidate, so the owner sees the amendment it implies.
component-style-authoring.md keeps this branch's AST-113 sentence and main's component-import-boundaries sentence.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record spec:AST-113, and nine defects need fixing either way.
spec:AST-113 adds requirements that no current record states (FR1–FR13, the Client parts table, the table of props and contexts that defeat the saving, and DEC-1–DEC-4). An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner.
Blocking
- The TopNav rows give a TopNav in AppShell's mobile bar a server build whose only client part "adds no DOM", but current
component:TopNavFR5 renders a different mobile-bar markup (heading, end content and drawer toggle, no start or center items) and the record's own OQ4 says TopNav inside AppShell renders through its client build, so route TopNav inside AppShell to the client TopNav in the table, FR12 and the defeat table. - Regression: current
component:ButtonFR18 shows a cut label in full in a tooltip on keyboard focus, but the Button rows give that behavior no client part (the gate only reads contexts and installs the press controller), so name the part that carries it for every labelled Button with no caller tooltip. - The Text row, FR1 and FR10 give a Text with
maxLinesandhasTruncateTooltip={false}no client part, but Text passes its clamp to a nested Link through a client context, socomponent:LinkFR6 ("A Link inside a Text withmaxLinesMUST truncate with that text") breaks unless anymaxLinesabove 0 gets a clamp part. - Regression: the FR12 gap (and the description) says a disabled ButtonGroup's submit Button submits its form on a click before hydration, but current
component:ButtonFR10 renders a disabled submit or reset Buttontype="button"until hydration, so replace the gap with what stays open (Enter in a single-field form) and say which part gives a server-build disabled submit Button the caller'stypeafter hydration. - FR11's "no Astryx component, provider, or layout wraps an application subtree in one" also covers Markdown's plugin Suspense fallback, which current
spec:AST-064FR8 requires, so scope that sentence to server builds and their client parts. - FR12 routes every Button and IconButton inside a Toolbar or SideNav to the client build, while the defeat table does so only with no explicit
sizeand FR2 limits client references to the tables' conditions, so narrow FR12 to match. - The FR1/FR2 verification row fails "a presentational render that references a client part" while the Client parts table gives every Button, IconButton, TopNav and TopNavItem an unconditional client part, so exclude the unconditional parts the table declares there and in FR1.
- Newly live check: the description says no other open pull request claims this work, but #11105 is open, implements
spec:AST-113for Text and Heading and cites it, so name it under Existing authority searched. - Newly live check: the writing rubric results report no project status in the record, but Platform support keeps "(verified in a Next.js App Router app and a second RSC bundler)", so drop the parenthetical or report it under R7.
Also worth a look: name architecture:component-import-boundaries in affects_architecture and Current-state impact, say in OQ5 that its separate-condition candidate would change FR4's "client build everywhere else", and narrow the component-style-authoring pointer, which says the draft states boundaries it does not cover (barrels, built output).
Claims and files checked
Review mode: full; reason: spec-record
Claims:
- No current record owns React Server Component boundaries, and the style-authoring record delegates them and audit row T30 to a future owner: verified (
component-style-authoring.md:233-236,:263). - The authority searched includes the public API, internationalization (translation is client context), theme application (function themes come from client code) and package stylesheet records: verified against the current records.
- No other open pull request claims this work or the record id: false (#11105 is open and cites it).
- Server builds with small client parts, Text and Heading first and Kbd after OQ3: verified (DEC-1; plan phases 1 and 2).
- No new props, exports or import paths; a
react-servercondition listed first selects the server build: verified (FR3, FR4, DEC-2). - Client parts carry
'use client', no'use server'ships, and both builds render identical first DOM: verified (FR5–FR8, DEC-3). - Nothing a person sees changes after hydration: verified as record text (FR6, consistent with
spec:AST-013FR9). - Server HTML behaves like the client build's before hydration, with named routing cases: verified as record text (FR12).
- A disabled ButtonGroup's submit Button submits its form before hydration today, in the client build too: false (
component:ButtonFR10; Button renderstype="button"while hydrating). - Server pages load the built theme stylesheet: verified (FR13).
- Functions, refs, a component
asand providers stay on the client build: verified (FR9, DEC-4). - The evidence list (server render, import-graph walk, DOM parity, hydration, first frame, pre-hydration, bundle check, Kbd outside the zero-JavaScript set): verified (Verification table).
- Supported environments honor the
react-servercondition: verified, apart from the "verified in" parenthetical (finding above). - The record carries both tables and states today's mismatches as FR4, FR5 and FR12 gaps: verified; the FR4 and FR5 gaps hold on the base branch (no
react-servercondition;'use client'in the root entry, Text and Heading); the FR12 gap is the finding above. - Two rejected alternatives, each one line inside DEC-1: verified.
- The style-authoring record gains one appended sentence: verified (
component-style-authoring.md:236-237). - No pull request or issue references in the record or plan: verified.
- No project status in the record: false (Platform support parenthetical).
- No internal context in public text: verified (added lines, title, body, branch and commit messages).
- The knowledge check passes: verified (
pnpm check:knowledgepasses at this head with no warning for these records). - #8443 is the implementation this design is based on: verified that it is open with that scope; its code is not reviewed here.
Files:
docs/specs/AST-113-server-components/spec.md: the seven record findings above, plus the OQ5 and import-boundaries notes.docs/specs/AST-113-server-components/plan.md: clear.docs/architecture/component-style-authoring.md: non-blocking pointer note; the merge kept the base branch's import-boundaries sentence beside it.
| | Button | every server-rendered Button: a context gate | reads the size, ButtonGroup, InputGroup, and LinkProvider contexts and installs the shared touch press controller | | ||
| | Button | `icon` is set: an icon size scope | the icon slot's default size is a context provider; it adds no DOM | | ||
| | Button | `clickAction`, `isLoading`, `tooltip`, a `ref`, a function prop, a component `as`, or a provider that changes its output | the client Button: fire-once actions, the loading spinner and live region, tooltip triggers, refs and handlers | |
There was a problem hiding this comment.
Regression: current component:Button FR18 shows the full label in a tooltip when keyboard focus reaches a Button whose label is cut short and no caller tooltip describes it, measured on focus. None of these rows carries that: the context gate only reads contexts and installs the press controller, and the client Button loads only for tooltip, clickAction, isLoading, refs, functions or as. Suggest naming the part that does it for every labelled Button with no caller tooltip (the gate, or a cut-label part), here and in the defeat table.
| - FR12 gap: in a disabled ButtonGroup, a submit Button renders with | ||
| `aria-disabled` and no `disabled` attribute, so a click before hydration | ||
| submits its form, in the client build too. |
There was a problem hiding this comment.
Regression: current component:Button FR10 now reads "Before hydration, a disabled submit or reset Button renders type="button", so its server markup cannot submit or reset its form", so a click no longer submits in the client build. What stays open is Button's own implicit-submission gap (Enter in a single-field form). Suggest stating that instead, and saying which part gives a server-build disabled submit Button the caller's type after hydration, as FR10 requires.
Exact decision needed
How Astryx components render inside React Server Components: which parts render on the server, which load on the client, how a build is selected, and what stays the same for callers. No current record owns React Server Component boundaries;
architecture:component-style-authoringleaves them to a separate owner.Design source: #8443 by @rhagigi. His review is invited.
Existing authority searched
architecture:component-style-authoring(delegates "React module boundaries" and audit row T30 to a future owner),architecture:public-component-api(INV1, INV9, INV12),architecture:internationalization(INV13: translation stays client context),architecture:theme-application(themes with functions are passed from client code),spec:AST-080(package stylesheets and source builds),family:buttons,family:navigation-destinations.packages/core/package.jsonexports,scripts/sync-exports.js,scripts/check-use-client.mjs,packages/core/src/serverSafeComponents.test.ts, Text, Heading, Kbd, Button, IconButton, TopNav, TopNavItem.react-server,'use client','use server', server component, RSC, server-safe, client island.AST-113id.Decision
Owner decision, 2026-11-10 (Cindy). The draft record is
spec:AST-113atdocs/specs/AST-113-server-components/spec.md, with an implementation plan beside it.react-servercondition in the package'sexports, listed first, selects the server build; the default condition keeps today's client build. The sameimport {Button} from '@astryxdesign/core'resolves the server build inside React Server Components.'use client'; Astryx never ships'use server'. CSS imported by server modules renders with them. The package works when bundled withreactas a peer dependency. Server and client builds render identical initial DOM, so hydration never mismatches.spec:AST-013FR9). Nothing a person sees changes after hydration: no layout shift and no swap of content, presentation or behavior between the server HTML and the first client frame, on a touch phone and a desktop with a mouse. A component that can't meet this has no server build.as, and every provider, stay client.serverSafeComponents.test.ts, a DOM-parity check, a hydration test (renderToStringthenhydrateRootwithonRecoverableError), a first-frame visual check on a touch phone and a mouse desktop, a pre-hydration behavior test with JavaScript off, and a bundle check that a server page ships zero Astryx client JavaScript for Text and Heading. Kbd is out of that set: its labels are translated and Apple modifier glyphs change after load (OQ3). Supported: frameworks and bundlers that honor the react-server condition (verified in a Next.js App Router app and a second RSC bundler).The record carries the per-component client-part table (Text and Heading, then Button, IconButton, TopNav and TopNavItem), a table of the props and contexts that defeat the saving (Button, IconButton, TopNav and TopNavItem are gated in apps with a LinkProvider: links save nothing), and states today's mismatches as FR4, FR5 and FR12 gaps.
Who benefits
The saving applies when a page's tree is mostly Server Components. There, an Astryx server build is real HTML with no client code, and only the client parts a page actually needs download, pre-bundled and sent early. In a client-heavy tree, a component rendered under a client ancestor is part of that ancestor's client code and waits for it to hydrate, so the saving shrinks or disappears. Any per-component number is a best case (server-component-heavy page).
Rejected alternatives
Claim scope and non-goals
The record governs how a component splits into a server build and client parts, how the build is selected, and the parity, style, directive and dependency rules both builds meet. It does not govern server-side translation, data fetching or Server Actions, or which family is next (OQ1). Every component keeps its own contract.
Open questions:
Evidence and implementation relationship
#8443 implements this design for Text, Heading, Kbd, Button, IconButton and TopNav:
react-serverserver shells, shared server-safe style and markup modules so both renderers emit identical DOM, client parts loaded only when props or client providers need them, and an extendedserverSafeComponents.test.tsthat holds each server entry to its declared client parts. The record stays valid without it.architecture:component-style-authoringgains one appended sentence that routes React module boundaries to this record.Writing rubric results
Rejected:line inside DEC-1.plan.md; DEC-1 keeps only the rule that a family gains its server build in one change of its own.Scope
Components: Text, Heading, Kbd, Button, IconButton, TopNav, TopNavItem (Kbd: renders through its client build)
react-serverexport condition is the one named mechanism; RSC bundlers select builds by it.Validation
pnpm check:knowledgepnpm specs:for --diff origin/maingit diff --checkCo-authored-by: rhagigi [email protected]