fix(Center): complete Night Watch audit - #6207
Merged
Merged
Conversation
cixzhang
requested review from
imdreamrunner and
josephfarina
as code owners
September 10, 2026 12:44
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
September 10, 2026 12:44
cixzhang
force-pushed
the
night-watch-component-audit/Center/2026-09-10
branch
from
September 10, 2026 12:46
1446d82 to
20aa790
Compare
|
AI review status for this pull request.
|
cixzhang
force-pushed
the
night-watch-component-audit/Center/2026-09-10
branch
from
September 10, 2026 13:17
20aa790 to
75bd3b5
Compare
cixzhang
force-pushed
the
night-watch-component-audit/Center/2026-09-10
branch
from
September 10, 2026 13:24
75bd3b5 to
c6e1d6b
Compare
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsCenter (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual RegressionStatus: No visual change across 4 compared shot(s). Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
force-pushed
the
night-watch-component-audit/Center/2026-09-10
branch
from
September 10, 2026 14:25
c6e1d6b to
1153c10
Compare
cixzhang
force-pushed
the
night-watch-component-audit/Center/2026-09-10
branch
from
September 10, 2026 15:40
1153c10 to
55f51a0
Compare
Contributor
Author
|
/approve-spec 55f51a0 |
github-actions
Bot
deleted the
night-watch-component-audit/Center/2026-09-10
branch
September 11, 2026 06:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User impact
Center now keeps its own theme-axis metadata even when a consumer passes a colliding
data-axis, the public horizontal-centering example actually renders Center, and the shipped logical padding contract has reusable RTL evidence.Audit result
core/CenterN)1.16.2(the patch advanced from the task-pinned1.16.1during this run; scoring is unchanged)5447429bacc4baa6b02f70da73dcdb9bb7d6e8eeae4ad8375d1ce553cdc889e83c79c9bc6dd5756c55f51a06c6e1f7780eecb078fa6bf104475799562dce2e5c21f3c1021b151fLimited-section weights are redistributed per the rubric.
Changes
Centercontract using the current component schema. It records released behavior only and remains non-authoritative pending owner approval.architecture:public-component-api/INV5/ P3: a genericdata-axiscan no longer replace Center’s component-owned axis reflection. The public-seam regression was proven red before production changed, then green.CenterHorizontalpublic example so it renders Center and demonstrates horizontal centering rather than an unrelated split toolbar.Evidence inventory
Closed: 26/26 rows accounted for. Each row maps one public surface or reachable branch to source, existing tests, consumer docs, rendered evidence, governing authority, and any surviving gap, as required by
spec:AST-029/FR5.Machine-readable evidence inventory
Public-surface → evidence receipt
packages/core/src/Center/index.ts
published @astryxdesign/core@0.5.4 export probe
architecture:public-component-api/INV9
architecture:public-component-api/INV12
packages/core/src/Center/Center.tsx
core typecheck
architecture:public-component-api/INV12
renders on the server without a client boundary
renders and centers children
component:Center/AV1
styles.alignItemsCenter
styles.justifyContentCenter
Center.stories.tsx Default and AllAxisModes
matcha-{light,dark}-default
component:Center/FR2
Center.stories.tsx HorizontalOnly and AllAxisModes
component:Center/FR2
Center.stories.tsx VerticalOnly and AllAxisModes
component:Center/FR2
component:Center draft FR2
vertical-writing measurement receipts
component:Center/FR2
Center.stories.tsx Default
Center.stories.tsx Inline
Center.stories.tsx AllAxisModes
component:Center/FR3
Center.stories.tsx Default and FullSize
component:Center/FR3
Center.stories.tsx Default, VerticalOnly, and AllAxisModes
component:Center/FR3
component:Center/FR3
component:Center/FR3
component:Center/FR3
leaves default output unchanged when omitted
Center.stories.tsx Padding
family:layout-primitives/FR3
component:Center/FR4
axis override class-set equivalence
family:layout-primitives/FR3
component:Center/FR4
inline-start/end precedence
resolves all four edges independently
Center.stories.tsx PaddingPerEdge
family:layout-primitives/FR3
component:Center/FR4
paddingBlockEnd={0}
paddingInlineEnd={0}
family:layout-primitives/FR3
component:Center/FR4
D8 measureLogicalInlineSubject
Chromium horizontal and vertical startup self-checks
rtl-audit README D8
D8 report records writingMode and top/right/bottom/left
component:Center/FR4
Center.tsx root composition
forwards ref correctly
server render
component:Center/AR1-AR3
architecture:public-component-api/INV8
xstyle render-only test
architecture:public-component-api/INV6
owned data-axis red-before-green regression
architecture:public-component-api/INV5
component:Center/FR6
CLI structure and component-reference checks
component:Center/FR2
component:Center/AR1-AR3
objective accessibility semantics
320px and coarse-pointer browser checks
Center.doc.mjs scope guidance
architecture:container-padding/INV8
Retained finding
family:layout-primitivesFR5 / Center draft FR2 — BLOCK: withwriting-mode: vertical-rl,axis="horizontal"centers the child vertically (Δx=124px,Δy=0) andaxis="vertical"centers it horizontally (Δx=0,Δy=-89px). Current family authority defines these as physical axes. The exact-base and exact-head receipted frames reproduce the same defect; this PR records rather than disguises it.Rendered evidence
All 17 comparable baseline/exact-head component frames and both vertical-writing frames are byte-identical. The intentional example change has its own exact-commit before/after pair. All 20 receipt pairs match on every sensor except Build. The evidence covers both axis/display matrices, the owned-axis collision, independent 480→240 max-width and 80→220 min-height constraints, asymmetric logical padding, vertical writing, 320px, coarse pointer, neutral light/dark, and matcha light/dark.
Validation
pnpm vitest run packages/core/src/Center/Center.test.tsx .github/scripts/rtl-audit-coverage.test.mjs packages/core/src/theme/themingTargets.test.ts packages/core/src/docPropLiterals.test.ts packages/core/src/docPropReferences.test.ts— 478/478 passpnpm check:knowledge,pnpm check:sync,pnpm check:changesets,node scripts/check-use-client.mjs,node scripts/sync-exports.js --check— passpnpm -F @astryxdesign/core typecheck,typecheck:docs, Storybook typecheck — passpnpm build— passnode scripts/verify-exports.mjs— 10 packages, 46 export targets cleanpnpm -F @astryxdesign/docsite generate && pnpm -F @astryxdesign/docsite test— 495/495 passpnpm lint:strict— 0 errors; 87 pre-existing warnings, none in changed filespnpm a11y:audit -- --components Center— 10 stories, 0 violationspnpm rtl:audit -- --filter Center— D8 pass; horizontal-writing and vertical-writing Chromium self-checks pass; 1 measured, 0 failures, 0 gapsExact-head audit eligibility
{ "schemaVersion": 1, "component": "Center", "package": "core", "auditMode": "N", "rubricVersion": "1.16.2", "heads": { "repository": "55f51a06c6e1f7780eecb078fa6bf10447579956", "componentContract": "55f51a06c6e1f7780eecb078fa6bf10447579956", "base": "5447429bacc4baa6b02f70da73dcdb9bb7d6e8ee" }, "inventory": { "closed": true, "rows": 26, "receipt": "pr-assets/evidence-inventory.json", "gaps": [ "B15 / component:Center/FR2: physical one-axis semantics reverse under vertical writing" ] }, "unresolvedGaps": { "objective": [ "B15 / component:Center/FR2: physical one-axis semantics reverse under vertical writing" ], "manual": [ "The FR2 runtime correction is intentionally outside this audit because a safe fix must preserve DOM, flow, server rendering, and caller-content writing mode", "Exact-head owner approval for the draft observational contract" ] }, "remediations": [ { "ruleId": "P3", "beforeEvidence": [ "Public Center accepted data-axis=vertical while axis=horizontal and rendered the spoofed value" ], "afterEvidence": [ "The public-seam regression test passes with data-axis=horizontal", "The receipted collision matrix records the intended input separately and the reflected output changes from vertical at base to horizontal at head" ] }, { "ruleId": "V3", "beforeEvidence": [ "Axis tests asserted only display:flex and sizing tests asserted only render success" ], "afterEvidence": [ "Axis tests assert the public computed alignment contract", "An SSR output test proves the server-safe public seam", "Max-width 480→240 and min-height 80→220 browser counterfactuals fail if either constraint is dropped" ] }, { "ruleId": "I17", "beforeEvidence": [ "The component RTL audit reported zero measured and one coverage gap" ], "afterEvidence": [ "D8 records writing mode, direction, logical start/end, and all four physical edges", "Real Chromium startup checks pass left/right mirroring in horizontal writing and top/bottom mirroring in vertical writing while rejecting a hidden subject", "Center reports one measured component and zero coverage gaps" ] }, { "ruleId": "X7", "beforeEvidence": [ "CenterHorizontal was attributed to Center but rendered no Center" ], "afterEvidence": [ "The example renders Center axis=horizontal around the centered control group", "Exact-base and exact-head receipts and measurement summaries name their matching commits" ] } ], "approvals": [ { "name": "independent-exact-head-review", "state": "pass", "evidence": "https://github.com/facebook/astryx/pull/6207#issuecomment-5621768713" }, { "name": "component-spec-owner", "state": "pass", "evidence": "https://github.com/facebook/astryx/pull/6207#issuecomment-5621768713" }, {"name": "human-reviewed-merge", "state": "pass"} ], "checks": [ {"name": "local-focused", "state": "pass", "assertions": 478}, {"name": "local-build", "state": "pass"}, {"name": "a11y", "state": "pass", "stories": 10, "violations": 0}, {"name": "rtl", "state": "pass", "measured": 1, "gaps": 0}, {"name": "exact-head-ci", "state": "pass", "run": 34497134946}, {"name": "audit-eligibility", "state": "unavailable"} ], "evidence": { "componentFrames": {"baseline": 17, "exactHead": 17, "pixelIdentical": 17}, "verticalWritingFrames": {"baseline": 2, "exactHead": 2, "pixelIdentical": 2}, "exampleFrames": { "baseline": 1, "exactHead": 1, "intentionalChange": true, "baseHead": "5447429bacc4baa6b02f70da73dcdb9bb7d6e8ee", "exactHeadCommit": "55f51a06c6e1f7780eecb078fa6bf10447579956" }, "receiptPairs": 20, "receiptPairsMatchExceptBuild": 20 }, "postMerge": { "landedCommit": "f069c04f454e52a4944b32d22dee91fb6fc6214c", "reviewedHead": "55f51a06c6e1f7780eecb078fa6bf10447579956", "allReviewedPathsIdentical": true, "pathCount": 13, "receipt": "pr-assets/landed-byte-verification.json" }, "eligibility": { "eligible": false, "reasons": [ "spec:AST-029 remains phase: accepted; FR11 activation is absent", "The trusted audit-eligibility check is unavailable", "One inherited B15 / component:Center/FR2 BLOCK remains open" ] } }Auto-merge is intentionally disabled. This PR must remain open for human review.