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

docs(types): point nine @default tags at a measured read site (objectui#8318) - #8756

Merged
os-warren merged 2 commits into
mainfrom
claude/issue-8318-jsdoc-default-tag-corrections
Sep 9, 2026
Merged

os-warren merged 2 commits into
mainfrom
claude/issue-8318-jsdoc-default-tag-corrections

Conversation

@os-warren

Copy link
Copy Markdown
Collaborator

Fixes #8318

Maintainer ruling 2026-09-09 (decision batch #104 item 4, recorded at objectui#8318 comment 5595150523), verbatim and untranslated:

所有这种文档错的都应该改文档,没有什么好决裁的,这个应该写入技能。

Ruled A1 + B1 — the documentation is what is wrong, so the documentation is what changes. No key is retired, no renderer's behaviour moves, no zod file is touched. Whether these keys should exist at all stays with the ADR-0049 liveness worklist (objectui#4631, objectui#7963).

Per-key table — every tag re-derived against a read site on this branch's base

⚠️ Re-measured on 3fbdd4a2, ⛔ not copied from the card. Two line numbers moved since the re-test at comment 5594082411 (DetailView.tsx:992 is :995 today), which is the reason for re-measuring rather than quoting.

key read site, or the proof that there is none firing control new tag
DetailSchema.loading packages/plugin-detail/src/DetailView.tsx:995 — if (loading || schema.loading), a bare disjunct beside the component's own useState fetch state at :269. An omitted key is undefined and contributes nothing. n/a (a positive read) @default false
DetailViewSchema.loading the same single site. register('detail-view', DetailViewRenderer) (plugin-detail/src/index.tsx:284) is a data-source gate whose child is DetailView with the bound schema, so both node types land on :995. n/a @default false
CardSchema.variant registered twice, read by neither. renderers/layout/card.tsx:64 (namespace: 'ui') forwards remaining keys through {...cardProps}; ui/card.tsx destructures only className and spreads the rest onto a div element — grep -c variant ui/card.tsx = 0, exit 1. Second registration containers.tsx:842 (namespace: 'page') forwards only {...designer}. ui/alert.tsx = 5, exit 0 (a primitive that really consumes it, via cva). Also, in-file: schema.clickable and schema.hoverable both resolve in card.tsx:35-36. tag removed
PageNodeSchema.isDefault page IS registered (renderers/layout/page.tsx:692), and PageRenderer neither reads nor forwards the key. schema.isDefault repo-wide = 0 hits, exit 1. The wrapper element gets toDomProps(props) (page.tsx:521), an allow-list — SDUI_DOM_PASS_THROUGH_KEYS in core/src/utils/dom-props.ts — with isDefault absent (0, exit 1). schema.pageType resolves, exit 0 (same renderer, page.tsx:291); className in dom-props.ts = 5, exit 0. tag removed
ActionSchema.level no register('action' anywhere, exit 1 — type: 'action' is not a rendered node type. And the channel that makes its four siblings live never reads it: action.level / schema.level repo-wide = 0 hits, exit 1. register('detail' resolves to plugin-detail/src/index.tsx:387, exit 0; action.method resolves to ActionRunner.ts:1787 and :1793, exit 0. tag removed
CRUDDialogSchema.size no register('crud-dialog' anywhere, exit 1 (also matched with a quote-agnostic regex, exit 1). .size is a very common spelling, so a name census answers nothing here — the decisive fact is upstream of it: no node of this type ever reaches a renderer. register('detail' resolves, exit 0 (same regex shape). tag removed
CRUDDialogSchema.closeOnOutsideClick same missing registration, plus an empty name census: the spelling occurs nowhere outside crud.ts and its zod twin zod/crud.zod.ts:195. as above tag removed
CRUDDialogSchema.closeOnEscape same missing registration, same empty census — crud.ts and zod/crud.zod.ts:196 only. as above tag removed
CRUDDialogSchema.showClose same missing registration, and the one of the four whose census is not empty: exactly one occurrence outside the declaration and its twin — renderers/overlay/drawer.tsx:38, {schema.showClose && …} — which reads DrawerSchema.showClose, a different member on a different, registered node type. schema.showClose really does resolve in drawer.tsx, exit 0, and that file names DrawerSchema. tag removed

⛔ The nine are deliberately not written as one sentence. That is the same defect this card is about, one level up: the @default true on the two loading keys got there in 6f132f29 (2026-07-13), a bulk JSDoc pass that copied the zod mirror's .default(true) onto every key at once.

The dist/*.d.ts measurement, and what it forced

⚠️ Measured, ⛔ not assumed. packages/types' build is tsc && vite build, tsc preserves JSDoc in the emitted declarations, and dist is in this package's files array. So these edits change published text.

before after
dist/crud.d.ts block @default tags 11 6
dist/layout.d.ts block @default tags 19 17
dist/crud.d.ts bytes 11,916 16,413
dist/layout.d.ts bytes 30,746 33,221

Block tags preceding each of the seven dead keys in the emitted .d.ts: 0 for all seven. Negative control: a string absent from source greps 0 in the emitted file, exit 1.

What it forced: a real patch changeset, not the empty-frontmatter declaration a docs-only change might otherwise take. .changeset/8318-jsdoc-default-tag-corrections.md. It is still not an accept-set change — Clause-②: no stands: no exported symbol, no validator behaviour, no payload key moves. Only the text an author reads in an editor tooltip, which was telling them the opposite of what the renderer does.

The pin: 15 rows to 24

packages/types/src/__tests__/layout-default-jsdoc-7361.test.ts — 49 it( to 75, both sides still derived off disk.

  • Rows 16-17 (loading) derive the applied value from a proved negative: the gate matches, and no literal fallback exists on the key, so the omitted key contributes ||'s identity. bareDisjunctDefault refuses to answer if a literal fallback ever appears — so if someone later gives the reader the ?? true the old tag promised, these rows go red and ask for the tag back. The capture is the co-disjunct's identifier, checked to be a React.useState local in the same file.
  • Rows 18-24 assert tag ABSENCE plus the specific evidence each docblock owes, so a hollow rewrite that dropped the tag and said nothing does not pass. Every negative read carries a firing control from the same file.
  • ⛔ The seven pre-existing rows PR test(types): re-test the 16 @default keys objectui#8318 called unread — seven are live #8718 landed are untouched.
  • ⚠️ Bounded on purpose: the repo-wide facts (register('action' / register('crud-dialog' match nothing) are not re-derived inside the test — it reads named files, and a repo-wide enumeration is a different instrument with its own failure modes. They are recorded in the declarations, in crud.zod.ts, and in handler-keys-string-any-mirrors-7344.test.ts.

Ablation — 12 legs, each reddening its own row

Each leg: mutate, prove the bytes landed on disk (anchor counts plus a byte-length delta), run the suite, restore against the HEAD blob, prove restoration by an empty git diff HEAD and blob-hash equality. Baseline green, post-ablation green.

leg mutation what went red
M1 DetailSchema.loading tag back to true rows 16 + the agreement assertion
M2 DetailViewSchema.loading tag back to true row 17 + the agreement assertion
M3 give DetailView.tsx a literal fallback on the key rows 16, 17, and the bare-read assertion
M4 re-add @default to CardSchema.variant row 18 + the extractor discrimination control
M5 strip the ui/alert.tsx evidence term row 18
M6 make ui/card.tsx mention variant row 18's primitive assertion
M7 re-add @default to PageNodeSchema.isDefault row 19
M8 re-add @default to ActionSchema.level row 20
M9 re-add @default to CRUDDialogSchema.size row 21
M10 re-add @default to closeOnOutsideClick row 22
M11 re-add @default to closeOnEscape row 23
M12 strip the drawer.tsx evidence term row 24

Rows 18-20 originally shared one assertion title, so an ablation report could not say which had reddened; a second commit gives each the member's name. That rename is why M4/M7/M8 are now distinguishable above.

Gates, with exit codes

Every exit code captured before any pipe. pnpm check is a per-PR CI gate (.github/workflows/lint.yml), and its first run was PRECONDITION NOT MET, ⛔ not a red.

gate exit
pnpm --filter @object-ui/types type-check 0
pnpm exec vitest run packages/types/ (repo root) 0 — 154 files, 3062 tests
pnpm exec vitest run packages/types/src/__tests__/layout-default-jsdoc-7361.test.ts 0 — 75 tests (49 before)
pnpm --filter @object-ui/types lint 0 — 266 warnings, 0 errors, all pre-existing no-explicit-any
pnpm exec eslint on the four changed files 0 — 9 warnings, every one on a pre-existing any, none on an added line
eslint firing control (an object-ui/no-dynamic-import-in-test-hook violation) 1 — the linter really can fail here
node scripts/check-changeset-presence.mjs 0 — 4 published source files, 1 changeset
pnpm check:control-bytes 0 — 6961 tracked text files
grep -naP control-byte self-scan of the 5 changed files 1 (no hits)
pnpm check — first run, unbuilt packages/cli/dist/cli.js 1, MODULE_NOT_FOUND = PRECONDITION NOT MET
pnpm --filter @object-ui/cli build 0
pnpm check — re-run 0, "All checks passed"
pnpm --filter @object-ui/types build 0 (the dist/*.d.ts measurement above)

Heavy runs were serialised through the container's shared verify lock; every one printed VERDICT command-exit 0.

NOT MEASURED

  • Runtime. Nothing was mounted. Every reading here is static, off the source. In particular: what a browser does with the variant attribute the ui route spreads onto a div element is measured only as "the primitive's source contains no variant".
  • Build Docs, check:node-esm-load, check:published-dist. Measured here or nowhere — and here they were not run. They are the three gates the dispatch names as not per-PR; this diff adds only comments to three .ts files, one test file and one changeset, so it moves no module graph, no ESM entry and no published tooling manifest. ⛔ That is a reasoned expectation, not a measurement.
  • A baseline lint run at the merge-base. The claim that all 9 file-level warnings pre-exist rests on their rule (no-explicit-any) and their line numbers landing on declarations this diff does not touch — this diff adds comments only. ⛔ The base commit was not linted separately.
  • The pnpm check warnings (3 files carrying a registered component type that did not validate, 46 skipped). None of them is in this diff, and no baseline run was made to prove they pre-exist.
  • ActionSchema vs UIActionSchema reachability at ActionRunner. Inherited un-measured from the re-test at comment 5594082411, and untouched here.
  • The other 25 of objectui#7735's 41 keys. This card's population is the 16.

Anything that argues a key should be retired — ⛔ reported, not acted on

Routes to objectui#4631 / objectui#7963, ⛔ not to this PR:

  1. CardSchema.variant is the strongest retirement candidate of the seven, and there is a second reason beyond "nothing reads it": on the ui route the key is not dropped, it is forwarded — renderers/layout/card.tsx closes its spread with a hand-rolled destructure of three designer props rather than toDomProps, so variant reaches ui/card.tsx and is spread onto a div element as an unknown attribute. That is the shape objectui#4425 / objectui#7933 closed elsewhere with the allow-list. ⚠️ Static reading only; nothing was mounted, and this PR ⛔ changes no renderer.
  2. The four CRUDDialogSchema keys are the cleanest ADR-0049 instances in the set — their node type has no registration at all, which is a strictly stronger fact than "the renderer does not read the key". The interface already carries an onClose?: never tombstone for exactly this reason.
  3. ActionSchema.level sits on a @deprecated interface whose modern twin UIActionSchema does not declare it.

What this PR deliberately does NOT do

⛔ No key retired. ⛔ No renderer, registration or zod file touched. ⛔ The seven pinned rows from PR #8718 untouched (they pin the keys whose tags are correct; they do not overlap these nine). ⛔ Draft, and staying draft.

Session for this implementation, as a code span so it survives a body edit: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w

🤖 Generated with Claude Code

https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w


Generated by Claude Code

…ctui#8318)

Maintainer ruling 2026-09-09 (decision batch #104 item 4): a
documentation-vs-implementation mismatch is a documentation fix. No key is
retired, no renderer's behaviour moves, no zod file is touched.

`DetailSchema.loading` / `DetailViewSchema.loading`: `@default true` -> `false`.
`DetailView.tsx:995` reads the key as a bare disjunct beside the component's own
fetch state, so an omitted key contributes nothing and draws no skeleton. The
`true` came from `6f132f29` (2026-07-13), a bulk JSDoc pass copying the zod
mirror's old `.default(true)`.

`CardSchema.variant`, `PageNodeSchema.isDefault`, `ActionSchema.level` and the
four `CRUDDialogSchema` keys lose the tag: nothing applies those values. Each
docblock carries its own evidence rather than one sentence copied nine times --
which is the same defect this card is about, one level up.

The pin grows from 15 rows to 24, both sides still derived off disk.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
Rows 18-20 shared one assertion title (`publishes NO @default block tag, and
says why`), so an ablation report could not tell which row had reddened. The
titles now carry the member.

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

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3483.4 KB 3512.7 KB
Main entry chunk (gzip) 144.1 KB 350 KB
Entry file index-G1k4qkDf.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) 11.08KB 4.58KB
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) 499.42KB 114.32KB
core (index.js) 7.48KB 2.96KB
create-plugin (index.js) 10.12KB 3.28KB
data-objectstack (index.js) 198.39KB 55.29KB
fields (index.js) 244.96KB 61.76KB
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) 13.52KB 4.88KB
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) 8.39KB 3.10KB
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) 49.00KB 13.91KB
plugin-charts (index.js) 71.39KB 19.92KB
plugin-chatbot (index.js) 194.53KB 46.34KB
plugin-dashboard (index.js) 131.43KB 34.44KB
plugin-designer (index.js) 215.51KB 44.29KB
plugin-detail (index.js) 252.39KB 65.32KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 134.20KB 33.48KB
plugin-gantt (index.js) 167.16KB 40.99KB
plugin-grid (index.js) 210.67KB 57.19KB
plugin-kanban (index.js) 55.50KB 15.75KB
plugin-list (index.js) 112.73KB 27.69KB
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.55KB 3.32KB
plugin-view (index.js) 84.54KB 20.84KB
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.93KB 1.49KB
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 (strict-authoring-face.js) 14.27KB 5.47KB
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

@os-warren
os-warren marked this pull request as ready for review September 9, 2026 04:13
@os-warren
os-warren added this pull request to the merge queue Sep 9, 2026
Merged via the queue into main with commit 33f4a19 Sep 9, 2026
35 checks passed
@os-warren
os-warren deleted the claude/issue-8318-jsdoc-default-tag-corrections branch September 9, 2026 04:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants