Repository navigation
docs(spec): EmptyState records its shipped contract as current - #9127
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
This record matches EmptyState as it ships, but it can't become current until an engineering owner approves its content at this head: FR1–FR6, AR1–AR3, ORD1, PR1 and the verification map with its named gaps. An engineering owner records that by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Please make the fix below first, because any later commit to the record needs a fresh approval.
- The FR5/ORD1 verification row says the ref test catches a ref on another element, but
forwards refonly checks for adiv, so a ref placed on the text-group wrapper still passes it; name that gap in the row or assert thatref.currentis the root.
[Automated review]
| | FR1, FR3, FR4, AR2 | `EmptyState.test.tsx` slot, order, decorative-icon, empty-slot, and live-role tests; stable visual baseline `core-emptystate--default` | Title only; all slots; absent and shallow-empty slots | A wrapper for an absent or shallow-empty slot, a changed slot order, an icon not hidden from assistive technology, or a live role on the root fails; a changed default layout comes back changed for review. Gap: no accessibility-tree check proves the hidden icon or the heading (`spec:AST-009` FR3). | `audit:EmptyState/a11y` | | ||
| | FR2, AR1 | `EmptyState.test.tsx` heading tests | Default level 3; every level | A title that is not the selected heading element fails. | `audit:EmptyState/a11y` | | ||
| | AR3 | `EmptyState.announce.test.tsx` | Render with the page; appear later; iframe; inside a live container; message change; server render and hydration; hidden and revealed | An announcement during load or hydration, a missing or repeated announcement when it appears or changes later, hidden text in the message, or an announcement inside a live container fails. | `audit:EmptyState/a11y` | | ||
| | FR5, ORD1 | `EmptyState.test.tsx` ref, `data-testid`, and root-composition tests | DOM, data, event, style inputs; caller role; ref | A dropped input, a replaced caller role, or a ref on another element fails. | `audit:EmptyState/api` | |
There was a problem hiding this comment.
This row credits the ref test with failing for "a ref on another element", but forwards ref only asserts that ref.current is an HTMLDivElement, and the text-group wrapper is a div too. Spreading the ref onto <AnnounceRenderedText> instead of the root type-checks and leaves all 23 EmptyState.test.tsx tests green; today only the announcement tests catch it, by side effect. Either add Gap: the ref test checks only that the ref is a div, not that it is the root. here, or tighten the test to expect(ref.current).toBe(container.firstElementChild).
63a1a91 to
b628828
Compare
There was a problem hiding this comment.
This record matches EmptyState as it ships and now names the ref gap, but it can't become current until an engineering owner approves its content: FR1–FR6, AR1–AR3, ORD1, PR1 and the verification map with its named gaps. An engineering owner records that by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Please make the fix below first, because any later edit to the record needs a fresh approval.
- The FR5/ORD1 row credits the root-composition test for ORD1, but moving
xstyleahead of the component styles inEmptyState.tsxstill passes every EmptyState test; addGap: no test asserts that caller xstyle follows the component styles.to the row, or add a test with a conflicting callerxstyle.
[Automated review]
| | FR1, FR3, FR4, AR2 | `EmptyState.test.tsx` slot, order, decorative-icon, empty-slot, and live-role tests; stable visual baseline `core-emptystate--default` | Title only; all slots; absent and shallow-empty slots | A wrapper for an absent or shallow-empty slot, a changed slot order, an icon not hidden from assistive technology, or a live role on the root fails; a changed default layout comes back changed for review. Gap: no accessibility-tree check proves the hidden icon or the heading (`spec:AST-009` FR3). | `audit:EmptyState/a11y` | | ||
| | FR2, AR1 | `EmptyState.test.tsx` heading tests | Default level 3; every level | A title that is not the selected heading element fails. | `audit:EmptyState/a11y` | | ||
| | AR3 | `EmptyState.announce.test.tsx` | Render with the page; appear later; iframe; inside a live container; message change; server render and hydration; hidden and revealed | An announcement during load or hydration, a missing or repeated announcement when it appears or changes later, hidden text in the message, or an announcement inside a live container fails. | `audit:EmptyState/a11y` | | ||
| | FR5, ORD1 | `EmptyState.test.tsx` ref, `data-testid`, and root-composition tests | DOM, data, event, style inputs; caller role; ref | A dropped input, a replaced caller role, or a ref that is not a `div` fails. Gap: the ref test checks only that the ref is a `div`, not that it is the root. | `audit:EmptyState/api` | |
There was a problem hiding this comment.
This row also covers ORD1, but composes root props only checks that the caller's xstyle class is present. Moving xstyle ahead of styles.container in stylex.props (so a caller's gap or padding loses) keeps every EmptyState test green. Please add Gap: no test asserts that caller xstyle follows the component styles. here, or add a test with a conflicting caller xstyle.
b628828 to
902e132
Compare
There was a problem hiding this comment.
This record matches EmptyState as it ships and now names the xstyle-order gap, but it can't become current until an engineering owner approves its content: FR1–FR6, AR1–AR3, ORD1, PR1 and the verification map with its named gaps. An engineering owner records that by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Please make the fix below first, because any later edit to the record needs a fresh approval.
- The FR2/AR1 and AR3 verification rows credit tests that stay green when the title's type style changes with its heading level or when EmptyState moves focus to its heading; add
Gap: no check that the title keeps one type style at every heading level.andGap: no test asserts that focus stays where it was when EmptyState appears.to those rows, or add the tests.
[Automated review]
| | Contract | Verification | Representative states | Mutation or failure expectation | Audit section | | ||
| | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | | ||
| | FR1, FR3, FR4, AR2 | `EmptyState.test.tsx` slot, order, decorative-icon, empty-slot, and live-role tests; stable visual baseline `core-emptystate--default` | Title only; all slots; absent and shallow-empty slots | A wrapper for an absent or shallow-empty slot, a changed slot order, an icon not hidden from assistive technology, or a live role on the root fails; a changed default layout comes back changed for review. Gap: no accessibility-tree check proves the hidden icon or the heading (`spec:AST-009` FR3). | `audit:EmptyState/a11y` | | ||
| | FR2, AR1 | `EmptyState.test.tsx` heading tests | Default level 3; every level | A title that is not the selected heading element fails. | `audit:EmptyState/a11y` | |
There was a problem hiding this comment.
FR2 also promises the title keeps one visual type role at every heading level, but the heading tests only check the element, and the core-emptystate--default baseline renders level 3. Tying the title style to the level (for example (isCompact || headingLevel !== 3) && styles.titleCompact) leaves every EmptyState test green. Add Gap: no check that the title keeps one type style at every heading level., or a test that compares levels.
| | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | | ||
| | FR1, FR3, FR4, AR2 | `EmptyState.test.tsx` slot, order, decorative-icon, empty-slot, and live-role tests; stable visual baseline `core-emptystate--default` | Title only; all slots; absent and shallow-empty slots | A wrapper for an absent or shallow-empty slot, a changed slot order, an icon not hidden from assistive technology, or a live role on the root fails; a changed default layout comes back changed for review. Gap: no accessibility-tree check proves the hidden icon or the heading (`spec:AST-009` FR3). | `audit:EmptyState/a11y` | | ||
| | FR2, AR1 | `EmptyState.test.tsx` heading tests | Default level 3; every level | A title that is not the selected heading element fails. | `audit:EmptyState/a11y` | | ||
| | AR3 | `EmptyState.announce.test.tsx` | Render with the page; appear later; iframe; inside a live container; message change; server render and hydration; hidden and revealed | An announcement during load or hydration, a missing or repeated announcement when it appears or changes later, hidden text in the message, or an announcement inside a live container fails. | `audit:EmptyState/a11y` | |
There was a problem hiding this comment.
AR3 also says EmptyState does not move focus, and nothing here checks it: a heading that focuses itself on mount passes every EmptyState test. Add Gap: no test asserts that focus stays where it was when EmptyState appears., or a test that keeps focus on a field while EmptyState mounts.
902e132 to
552abbb
Compare
There was a problem hiding this comment.
This record matches EmptyState as it ships and now names every gap its tests leave, including the title's type style at every heading level and focus, so the record itself needs no further change. It can become current once an engineering owner approves its content at this head: FR1–FR6, AV1–AV2, AR1–AR3, ORD1, PR1, the theming anatomy and the verification map with its named gaps. An engineering owner records that by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; any later edit to the record needs a fresh approval.
[Automated review]
|
/approve-spec 552abbb |
Exact decision needed
Promote
component:EmptyStatefromdrafttocurrent, recording EmptyState's shipped behavior on main today. No behavior, API, or output change.Existing authority searched
component:EmptyStateon main (draft, template 3): the glance table, FR1–FR6, AV1–AV2, ORD1, PR1, AR1–AR3 (including thespec:AST-086FR2 announcement), and the theming anatomy were re-verified againstEmptyState.tsxand kept, rewritten as present-tense invariants in template 7.spec:AST-086(current) owns the announcement the record's AR3 applies.pnpm specs:for packages/core/src/EmptyState/EmptyState.tsx: directory-wide architecture records.docs/specs/components/; feat(knowledge): check every specification in the repository as a knowledge record, and convert the native specs #8288 migrates records to schema 5). This record keeps the colocated, schema-3 path main uses today.Decision
packages/core/src/EmptyState/EmptyState.spec.md:authority: current,approved_by: cixzhang,approved_at: 2026-10-31,ownersunchanged, template 7, behavioral table headed "Invariant | Basis". Thespec:AST-029/FR3process link is dropped andspec:AST-009added for accessibility-tree evidence.Rejected alternatives
None.
Claim scope and non-goals
Covers only EmptyState as shipped on main. Message copy, icon meaning, and actions stay with the caller; heading order stays with the page. No new behavior is decided.
Evidence and implementation relationship
core-emptystate--default.EmptyState.announce.test.tsx.data-testid, and root-composition tests.Writing rubric results
#+ digits,/pull/,/issues/).Scope
Validation
pnpm check:knowledge: alignedgit diff --check: clean