Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

fix(types,components): the zod mirrors stop authoring defaults - #8299

Merged
os-zhuang merged 4 commits into
mainfrom
claude/issue-7735-zod-mirrors-stop-authoring-defaults
Sep 7, 2026
Merged

os-zhuang merged 4 commits into
mainfrom
claude/issue-7735-zod-mirrors-stop-authoring-defaults

Conversation

@claude

@claude claude Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #7735

Implements the director ruling on #7735 (decision batch #69, 2026-09-07; maintainer reply 「其他同意」), option 乙. A validator validates; it does not write values into an author's document. The renderer's fallback is the single authoritative default, the JSDoc @default describes it, and the zod mirror carries none.

The defect

.default(v) on a mirror member is not documentation — parse SUBSTITUTES v into the output when the key is absent. One authored document therefore took two shapes depending on whether it had been through safeValidateSchema, and where the two faces disagreed the mirror silently won:

key mirror wrote the renderer applies
ContainerSchema.maxWidth 'lg' container.tsx:26  ?? 'xl'
FlexSchema.align 'center' flex.tsx:18  || 'start'

⚠️ Those are the two rows the ruling names, not the population. The contract
review asked for the rest and the answer is six: auditing all 22 layout keys
against their renderers adds grid.columns (mirror 3 / grid.tsx's own
let baseCols = 2), text.variant ('body' / none — a bare node, objectui#6942),
resizable.withHandle (true / forwarded bare, so undefined draws NO grip) and
page.template ('default' / a null template falls through to the pageType
dispatch, and 'default' is a real TEMPLATE_REGISTRY key, so the substitution
really did skip that dispatch). A consumer that renders result.data sees a
different result on all six.

Measured on the built face before the change, and again after:

before   safeValidateSchema({type:'container'}) -> {"type":"container","maxWidth":"lg","centered":true}
         safeValidateSchema({type:'flex'})      -> {"type":"flex","direction":"row","justify":"start","align":"center","gap":2,"wrap":false}
after    safeValidateSchema({type:'container'}) -> {"type":"container"}
         safeValidateSchema({type:'flex'})      -> {"type":"flex"}
         safeValidateSchema({type:'stack'})     -> {"type":"stack"}        (control: never authored defaults)

The population — the ruling's arithmetic, re-derived

The ruling says "45 .default() sites across the seven *.zod.ts files". Re-derived on origin/main fc32921 with the TypeScript AST rather than a text search: 41 real call sites in 5 files. Four of the 45 text matches are prose inside docblocks, and the two files carrying them have nothing to remove.

file raw .default( text in a comment call sites
layout.zod.ts 22 0 22
crud.zod.ts 11 0 11
form.zod.ts 5 0 5
views.zod.ts 2 0 2
app.zod.ts 1 0 1
objectql.zod.ts 3 3 0
complex.zod.ts 1 1 0
base.zod.ts 0 0 0
45 4 41

This confirms the PM's count exactly. objectql.zod.ts and complex.zod.ts are untouched — editing them to reach "45" would have been inventing a diff.

⚠️ Breaking for consumers that read result.data

Stated plainly here as well as in the changeset: validateSchema /
safeValidateSchema no longer substitute, so for a document that omits one of
these 41 keys the key is now absent from the parsed output. Every one of the
41 changes output; six of them change rendering for a consumer that renders
result.data (the table above). Readers of a parsed default must apply their own
fallback. The accept set is untouched — nothing that parsed before is refused now.

Accept set: unchanged, and that was checked rather than assumed

.default() can carry optionality as well as a value: a member written .default(x) with no .optional() is optional because of the default, and removing it naively makes the key required — a silent accept-set narrowing on a published surface, which this ruling did not authorise. All 41 were spelled TYPE.optional().default(v).describe(…), so 0 of 41 were carrying optionality. Nothing that parsed before is refused now. This narrows parse OUTPUT only, which is the conformance limb of clause ②, not clause ② itself.

Consumer census — execution note 1

The only risk of option 乙 is a consumer that reads a substituted default off result.data. Measured, not assumed. Count: 0.

Four modules import @object-ui/types/zod outside tests:

consumer what it reads affected
packages/cli/src/commands/check.ts safeValidateSchema(content).success only no
packages/cli/src/commands/validate.ts result.data.{type,id,label,title,children} — none ever carried a default no
packages/plugin-map/src/ObjectMap.tsx ObjectMapConfigSchema.safeParse(config) for .success / .error; returns the raw config, discarding .data. ObjectMapConfigSchema lives in objectql.zod.ts, which had 0 call sites no
scripts/measure-strict-authoring-face.mjs its keyProbe twin is rebuilt with z.any().optional() leaves, so defaults never reach it; undeclaredKeys walks Object.keys(input), so extra keys in the parse output are invisible to it either way. Not wired into any gate or workflow no

⭐ The render path never ran this validator at all — the open question os-sam raised in comment 5564118219 ("whether any document parse goes through ContainerSchema's zod mirror in practice"). SchemaRenderer calls validateSchema from @object-ui/core, a structural validator returning {valid, errors} with no zod, no .data and no substitution. The mirror's .default() only ever reached documents put through @object-ui/types/zod deliberately — the CLI and external consumers.

Empirically: 6 105 tests across packages/types, packages/components, packages/cli, examples/schema-catalog and scripts/ pass unchanged. Not one asserted a substituted default.

Pin (i) — and the trap in the ruling's wording

⛔ Pin (i) is not a text search. Worded literally as the ruling puts it — "no .default( under packages/types/src/zod/**" — it is red on the day it lands, because the four docblock mentions are legitimate prose that survives the change, and the only way to make such a pin green would be to delete real prose. packages/types/src/__tests__/zod-mirror-authors-no-defaults-7735.test.ts parses instead:

  • every X.default(…) CallExpression under packages/types/src/zod/** — comments are not in the AST, so prose is invisible by construction;
  • a walk of the whole schema graph reachable from the published barrel;
  • the behavioural half (parse output carries no key the author did not write), with stack as the never-authored control;
  • accept-set probes (every de-defaulted key still omissible).

It also carries the positive controls that keep a null result meaningful: the AST walker is shown finding .describe() on the very chains .default() used to sit in, and the discrimination itself is asserted — some mirror file still mentions .default( in prose, every such file has 0 call sites, and the text count exceeds the call count. That gap is the control.

packages/components/src/renderers/layout/__tests__/registration-defaults-match-renderer-8229.test.ts is pin (ii): it re-derives every defaultProps/fallback pair in flex.tsx and stack.tsx off disk and fails if any diverges.

Both pins were ablated — they discriminate

Run from the committed tree, each leg proving the mutation reached disk before the run and that the restore was verified by blob hash, not by an exit code:

LEG A  reintroduce one .default() in layout.zod.ts
       mutation on disk: yes; blob differs from HEAD: YES
       × no mirror file contains a `.default()` CALL SITE
       × the residue that survives is entirely spec-derived, and it is not zero
       × every surviving `.default(` match is prose, and the AST census ignores all of them
       × container            (parse output regained "centered")
       Tests  4 failed | 19 passed (23)
       restored: diff=[] blob-match=YES

LEG B  put defaultProps.align back to 'center'
       align: 'center' occurrences = 1, align: 'start' = 0
       Tests  3 failed | 5 passed (8)
       restored: diff=[] blob-match=YES

LEG C  what a bare TEXT pin would have reported on this tree:
       packages/types/src/zod/complex.zod.ts:1
       packages/types/src/zod/objectql.zod.ts:3
       ⇒ red on landing, over four pieces of legitimate prose.

What this does NOT reach — measured, and it is a real residue

Removing all 41 does not make safeValidateSchema stop substituting. 57 ZodDefault nodes remain reachable from the published barrel afterwards, and — by the same call-site census that proves the mirror authors none — every one of them is inside a subschema imported by reference from @objectstack/spec:

{"type":"object-view","objectName":"account","navigation":{}}
  -> navigation: {"mode":"page","preventNavigation":false,"openNewTab":false,"size":"auto"}
{"type":"app","name":"a","title":"A"}          -> gains active:true, isDefault:false
{"type":"list-view",…,"sharing":{}}            -> sharing: {"type":"collaborative"}
{"type":"kanban",…,grouping.fields:[{field}]}  -> gains order:"asc", collapsed:false

So the "one authored document, two shapes" defect survives on those keys. Those values are written in @objectstack/spec and cannot be removed from this repository — restating them locally to strip them would be the "narrower than the contract it implements" shape complex.zod.ts already records twice. The pin documents the boundary and asserts the residue is non-zero as a floor, not a ratchet (the exact figure moves with every spec bump); what it does hold constant is the attribution. Recorded on #7735 for triage; ⛔ not filed as a card from here.

#8229 — fully covered, and its census reproduces

⭐ #8229 is fully covered by this PR. Nothing of it narrows into a follow-up, so its author can mark it done once this lands. Its defaultProps.align face is reconciled ('center' → 'start', the value flex.tsx:18 actually applies) and pin (ii) is a standing gate over exactly the surface it measured, so nothing of it narrows into a follow-up.

Its bounded census reproduces exactly: re-deriving it mechanically over flex.tsx + stack.tsx gives 8 comparable pairs, 1 disagreement — flex.align — matching its table row for row.

Out of scope — noted, not filed

Re-deriving that same comparison repo-wide found 55 comparable pairs and 7 disagreements: the flex.align row fixed here, plus six more.

file key defaultProps renderer fallback
renderers/action/action-bar.tsx variant 'outline' 'ghost'
renderers/action/action-button.tsx size 'md' 'default'
renderers/action/action-group.tsx size 'sm' 'default'
renderers/basic/pagination.tsx totalPages 10 1
renderers/form/file-upload.tsx buttonText 'Choose files' 'DROP PAYLOAD OR CLICK TO UPLOAD'
plugin-markdown/src/index.tsx content a sample document ''

⛔ Not touched, and deliberately not filed as defects. They are not six more instances of this bug: defaultProps is a designer seed as much as a default claim — pagination's totalPages: 10 and flex's own three-button children array are seeds, not statements about what a key means when omitted — and whether the two roles may legitimately diverge is exactly the question #4631 is holding, pm:on-hold. Widening pin (ii) repo-wide would have decided that question by gate rather than by ruling. Recorded here for whoever takes #4631.

Ruling note 3(ii) — re-measured against the renderer, and four tags corrected

⭐ The first version of this PR reported note 3(ii) as already satisfied. That was
measured against the wrong reference
and the contract review was right to fail it.
Each JSDoc @default was compared with the value the mirror used to write; the
ruling asks for the renderer's fallback, which is the entire point of option 乙 —
the renderer is now the authoritative face, so a tag agreeing with the mirror proves
only that the docs copied the mirror. All four tags corrected below had matched the
mirror exactly, which is precisely why a mirror-referenced check called the face clean.

Re-measured against the renderer, all 41 de-defaulted keys:

verdict n
tag agrees with what the renderer applies 19
tag misdescribed the renderer — corrected here 4
no tag, deliberately (#7361 / #7734: two divergent consumers) 2
no registered renderer reads the key — "equals the renderer fallback" has no referent 16

The four corrections, each following #7361's own rule (a tag states what the renderer
applies; where it applies nothing, the honest form is the absence of a tag plus prose
naming the read site):

member was now
GridSchema.columns @default 3 @default 2 + prose naming grid.tsx's baseCols
TextSchema.variant @default 'body' no tag + prose naming text.tsx and objectui#6942
ResizableSchema.withHandle @default true no tag + prose naming the bare forward and the grip gate
PageNodeSchema.template @default 'default' no tag + prose naming resolveTemplate and the pageType fall-through

19 of the agreeing rows were confirmed too, 13 by the schema.x ?? 'lit' sweep and 6
by hand where the renderer uses another shape — container.centered (!== false),
card.hoverable / card.clickable (|| isClickable / || !!props.onClick),
aspect-ratio.ratio (|| 16 / 9), separator.orientation and icon.size (forwarded
bare, the primitive's own default is what the tag names).

The pin, and the narrowing it does not reach

packages/types/src/__tests__/layout-default-jsdoc-7361.test.ts gains the four rows —
same file, same rule, one instrument. Both sides are read off disk, every extraction has
a positive control, and the file now covers 8 rows plus 2 negative controls.

It also gains a discrimination control that is not hypothetical: TextSchema.variant's
new prose quotes the retired @default 'body', so the text is in the file while the
member publishes no tag. The pin asserts both — the extractor sees the quoted mention
and still returns an empty tag list, and it still finds a real tag on a neighbouring
member. Without it, "the tag list is empty" could have been passing because the
extractor had quietly stopped matching anything.

⚠️ Declared narrowing. The pin is row-by-row, not a sweep, and 33 of the 41 keys
stay unpinned
. That is a measured decision: these renderers do not express defaults
uniformly, and a generic schema.x || 'lit' sweep is blind to every shape that matters —
it scores grid.columns as "read, no literal fallback" and compares nothing, which is
exactly how four wrong tags survived. A general instrument would have to model an
initialiser (let baseCols = 2), a !== false read, a bare forward whose default is the
absence of an affordance, and a registry lookup returning null — and it would have to
decide what "the renderer for this type" means when two files register 'text' with
non-overlapping variant vocabularies (renderers/basic/text.tsx and
renderers/basic/elements.tsx both do). Filed as #8318 with the full 16-key list and
both open questions; not decided here.

Ablation — the four new rows discriminate

LEG D  GridSchema.columns' tag back to 3
       '@default 3' on disk: 1; blob differs from pre-ablation: YES
       × carries exactly one `@default`, and it is grid.tsx's own initialiser
       × no longer publishes `3`, the value only the mirror ever wrote
       Tests  2 failed | 30 passed (32)      restored: blob-match=YES

LEG E  re-add the retired `@default 'body'` to TextSchema.variant
       occurrences on disk 1 -> 2 (1 in prose + 1 injected)
       × publishes NO `@default` block tag
       × the prose mentions the retired tag, and the extractor is not fooled by it
       Tests  2 failed | 30 passed (32)      restored: blob-match=YES

Verification (patch round, head d28d27a)

gate verdict
pnpm --filter @object-ui/types --filter @object-ui/components run type-check exit 0 (both Done) — tsconfig.test.json is in the run, and it caught a real error in the pin during round 1, so the test files are demonstrably in the program
pnpm --filter @object-ui/types --filter @object-ui/components run lint exit 0, 0 errors; per changed file layout.ts 0/0, the extended pin 0/0, text.tsx 0 errors / 1 pre-existing warning, flex.tsx the same
pnpm exec eslint . --no-inline-config --format json round 1: 4 421 files judged; 94 pre-existing errors across 78 files, 0 in any file this PR touches, 0 new warnings
pnpm exec vitest run packages/types/ packages/cli/ examples/schema-catalog/ scripts/ exit 0 — 8 491 passed, 0 failed
pnpm exec vitest run packages/components/ exit 0 — 2 204 passed, 0 failed
check:comment-mask-corpus · check:unused-deps exit 0 — both re-run after the docblock rewrites
check:sdui-registration-pins exit 0 measured at a6ac2bb; ⚠️ declared, not re-measured at d28d27a. Every line packages/components changed since is a comment (git diff a6ac2bb -- packages/components has no non-comment +/- line), so the bundle's registration set cannot have moved. Falsifiable: a red run of this gate on this branch reopens it. CI re-measures
check:comment-mask-corpus exit 0 — the new gate from #8277, re-run on the merged head; no residue added
check:control-bytes · check:doc-types · check:doc-snippets · check:doc-fences · check:spec-symbols · check:phantom-deps · check:handler-key-reads · check:unreferenced-sources · check:published-tsconfig-exclude · check:readme-exports · check:entry-guard · check:dist-completeness · changeset-presence · changeset-no-major exit 0

Every exit code was captured to disk before any output was read. origin/main merged at 3c6394c; the suite above was re-run on the merged head a6ac2bb.

needs:contract-review is attached per the ruling's note 4 — the conformance limb (output shape narrows, accept set untouched), not clause ②.


🤖 Generated with Claude Code

https://claude.ai/code/session_01QtGhnU3WnnWyiWeYQhw2aX


Generated by Claude Code

A `.default(v)` on a zod mirror member is not documentation: `parse`
SUBSTITUTES `v` into the output when the key is absent, so one authored
document took two shapes depending on whether it had been through
`safeValidateSchema` — and where the mirror and the renderer disagreed,
the mirror silently won.

  ContainerSchema.maxWidth   mirror 'lg'      container.tsx  ?? 'xl'
  FlexSchema.align           mirror 'center'  flex.tsx       || 'start'

Ruled by the director seat (decision batch #69, 2026-09-07, maintainer
reply 「其他同意」): a validator validates, it does not write values into
an author's document. The renderer's fallback is the single authoritative
default, the JSDoc `@default` describes it, and the mirror carries none.

Removes all 41 `.default()` call sites under `packages/types/src/zod/`
(layout 22, crud 11, form 5, views 2, app 1). Every one was spelled
`.optional().default(v)`, so the accept set is untouched — this narrows
`parse` OUTPUT only. Reconciles the third face objectui#8229 found:
`flex`'s registration seeded `defaultProps.align: 'center'`, the value
its own renderer never applies.

Two derived pins land with it: the mirror carries no `.default()` CALL
SITE (parsed, not grepped — four legitimate docblock mentions survive and
a text pin would be red on landing), and every `defaultProps`/fallback
pair in flex.tsx and stack.tsx agrees.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QtGhnU3WnnWyiWeYQhw2aX
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3472.1 KB 3512.7 KB
Main entry chunk (gzip) 143.9 KB 350 KB
Entry file index-B9vzq69q.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 15.67KB 5.75KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 5.13KB 2.35KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 497.99KB 113.90KB
core (index.js) 7.20KB 2.88KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 189.15KB 52.56KB
fields (index.js) 243.14KB 61.38KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 6.57KB 2.76KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.84KB 10.94KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 4.39KB 1.66KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 11.71KB 4.29KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 15.16KB 3.68KB
plugin-calendar (index.js) 48.03KB 13.29KB
plugin-charts (index.js) 71.39KB 19.92KB
plugin-chatbot (index.js) 193.54KB 46.04KB
plugin-dashboard (index.js) 131.43KB 34.43KB
plugin-designer (index.js) 213.21KB 43.63KB
plugin-detail (index.js) 248.56KB 63.89KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 131.01KB 32.32KB
plugin-gantt (index.js) 167.16KB 40.99KB
plugin-grid (index.js) 208.58KB 56.63KB
plugin-kanban (index.js) 52.83KB 14.63KB
plugin-list (index.js) 113.38KB 27.73KB
plugin-map (index.js) 20.49KB 6.83KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.42KB 11.92KB
plugin-timeline (index.js) 30.10KB 8.74KB
plugin-tree (index.js) 9.33KB 3.25KB
plugin-view (index.js) 84.46KB 20.80KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.55KB 2.45KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 13.64KB 4.59KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.74KB 1.41KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

…he mirror, not the renderer

Contract-review patch round for PR #8299. The 41-site removal, both pins, the
accept-set claim and the `flex.tsx` value are unchanged — the review reproduced
all of them. What failed was four written statements the tree contradicts.

1. THE CHANGESET STATED A FALSE MEASUREMENT. "Rendering does not change …
   the two that disagreed were the bug" quoted a 7-key triage sample as if it
   were the population. Auditing all 22 layout keys against their renderers
   finds SIX disagreements: container.maxWidth, flex.align, grid.columns
   (3 vs `let baseCols = 2`), text.variant ('body' vs none), resizable.withHandle
   (true vs a bare forward that draws no grip) and page.template ('default' vs a
   pageType dispatch). The note now says that, and says plainly that the change
   is BREAKING for consumers that read `result.data`.

2. RULING NOTE 3(ii) WAS MEASURED AGAINST THE WRONG REFERENCE. The tags were
   compared with the value the MIRROR used to write; the ruling asks for the
   RENDERER's fallback, which is the whole point of option 乙. Re-measured
   against the renderer, all 41 keys: 19 agree, 2 are deliberately untagged
   (#7361/#7734), 16 have no registered renderer reading them at all, and 4
   misdescribed the renderer. Those four are corrected here — `grid.columns`
   3 -> 2, and `text.variant` / `resizable.withHandle` / `page.template` lose
   their tag for prose naming the read site, the shape #7361 established for a
   value no renderer applies.

   The pin follows: `layout-default-jsdoc-7361.test.ts` gains four derived rows
   (both sides read off disk, with positive controls) and a discrimination
   control — that docblock's prose quotes the retired `@default 'body'`, so the
   tag extractor is shown ignoring a backtick-quoted mention while still seeing
   a real tag next door. The 33 rows it does not reach are declared as a named
   narrowing in the PR body and filed as objectui#8318.

3. Two shipped `text.tsx` docblocks said the mirror declares/publishes
   `.default('body')`. This PR is what made them false; both now say so in the
   past tense.

4. `flex.tsx:145` cited the pin as `.test.tsx`; the file is `.test.ts`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QtGhnU3WnnWyiWeYQhw2aX
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3472.2 KB 3512.7 KB
Main entry chunk (gzip) 143.9 KB 350 KB
Entry file index-DbtpADeo.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 15.67KB 5.75KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 5.13KB 2.35KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 497.99KB 113.90KB
core (index.js) 7.48KB 2.96KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 189.15KB 52.56KB
fields (index.js) 243.15KB 61.40KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 6.57KB 2.76KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.84KB 10.94KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 4.39KB 1.66KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 11.71KB 4.29KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 15.16KB 3.68KB
plugin-calendar (index.js) 48.03KB 13.29KB
plugin-charts (index.js) 71.39KB 19.92KB
plugin-chatbot (index.js) 193.54KB 46.04KB
plugin-dashboard (index.js) 131.48KB 34.45KB
plugin-designer (index.js) 213.21KB 43.63KB
plugin-detail (index.js) 248.56KB 63.89KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 131.01KB 32.32KB
plugin-gantt (index.js) 167.16KB 40.99KB
plugin-grid (index.js) 208.58KB 56.63KB
plugin-kanban (index.js) 52.83KB 14.63KB
plugin-list (index.js) 113.38KB 27.73KB
plugin-map (index.js) 20.49KB 6.83KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.42KB 11.92KB
plugin-timeline (index.js) 30.10KB 8.74KB
plugin-tree (index.js) 9.33KB 3.25KB
plugin-view (index.js) 84.46KB 20.80KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.55KB 2.45KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 13.64KB 4.59KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.74KB 1.41KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants