Uh oh!
There was an error while loading. Please reload this page.
feat(spec): declare record:details section headerColor as a closed six-token enum - #12616
Conversation
…x-token enum The #11661 refusal's recorded reason (template-literal Tailwind read generating no CSS) was repaired by objectui#6294's literal-class lookup; maintainer ruling A (2026-08-26) declares the key as z.enum over exactly the six tokens that lookup ships: muted, muted/50, accent, primary/10, secondary/10, destructive/10. Declared = enforced — values outside the enum (including bg-* pass-through spellings) are refused at authoring time instead of shipping a header that silently does not paint. Optional, no schema default; the title withhold stands and its pin flips consciously, as its own comment anticipated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012xGvxcwPRTJfA7RfjXEYA4
gen:docs wrote this page; gen:schema produced no tracked-file changes (authorable-surface.base.json lags by design — baseRev allowance). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012xGvxcwPRTJfA7RfjXEYA4
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 126 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin cafdc0e170ab373242e3d4c21032c329abdce286 && git checkout cafdc0e170ab373242e3d4c21032c329abdce286
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 7a25e7d606b7694f6bbd6bcc226bec33f546c370 34207061784416df3dccd315d4b725ff73f76b0c && git checkout -B drift-repro 7a25e7d606b7694f6bbd6bcc226bec33f546c370 && git merge --no-ff 34207061784416df3dccd315d4b725ff73f76b0c
node scripts/docs-audit/affected-docs.mjs --json 7a25e7d606b7694f6bbd6bcc226bec33f546c370 |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#12126
Implements maintainer ruling A (2026-08-26, issue comment 5419726057, verbatim provenance 「其他接受你的建议」): declare
headerColoron the strictrecord:detailssection schema as a closedz.enumover exactly the six tokens objectui#6294 ships.What changed
packages/spec/src/ui/component.zod.ts— therecord:detailssection shape now declaresheaderColor: z.enum(['muted', 'muted/50', 'accent', 'primary/10', 'secondary/10', 'destructive/10']).optional(), no schema default. The describe() states the closed vocabulary AND the layer fact: rendered by objectui'srecord:detailsheader; a value outside the enum is refused at authoring time rather than silently not painting. The withheld-keys comment is rewritten —titlestays withheld (its fork remains with record:details sections: five more renderer-honoured keys remain undeclared by the strict section schema (title / defaultCollapsed / icon / description / headerColor) #11661, which remains open for that half); theheaderColorbullet is replaced with the history and the citation of this ruling.packages/spec/src/ui/component.test.ts— the record:details sections: five more renderer-honoured keys remain undeclared by the strict section schema (title / defaultCollapsed / icon / description / headerColor) #11661 pin flips CONSCIOUSLY, as its own comment anticipated: the old "still refuses the two keys" test becomes atitle-only refusal pin whose comment cites this ruling, plus two new pins on the accept/reject boundary: all six tokens accepted verbatim with no schema default materialized, and out-of-enum values (blue-100, thebg-mutedpass-through spelling, solidprimary/destructive) refused withinvalid_valueat pathsections/0/headerColor.content/docs/references/ui/component.mdx— regenerated bygen:docs(newheaderColorrow + updated object-form summary)..changeset/record-details-headercolor-enum-12126.md— minor on@objectstack/spec, following the landed precedent for new authorable section keys (the record:details sections: five more renderer-honoured keys remain undeclared by the strict section schema (title / defaultCollapsed / icon / description / headerColor) #11661 batch changeset was minor for the same accept-set-widening class).Sanity check the ruling delegated
Read
objectui/packages/plugin-detail/src/headerColor.tsat objectui origin/main (read-only): itsHEADER_COLOR_CLASSESlookup ships exactlymuted,muted/50,accent,primary/10,secondary/10,destructive/10— the enum matches the module one-to-one, and the module's own header states the tints-only reasoning (CardHeader sets no foreground; solids would need a paired text-foreground class, left to the pass-through). No vocabulary adjustment needed, no shape question raised.The renderer's
bg-*pass-through is deliberately NOT declared: it renders only when the host app's Tailwind build happens to generate the class — the capability-illusion shape the old refusal existed to prevent, and ruling A explicitly rejects option B (open string).Guidance/alias machinery
Checked per the dispatch card: the strict section schema carries NO curated
headerColorguidance or alias entry (grep overpackages/spec/src— the onlyheaderColoroccurrences were the zod comment and the pin test), so there is nothing to remove for the #5013 alias-integrity audit;pnpm check:spec-parsed-aliasis green (its verdict line: "ADR-0122 type-alias convention: ... OK").Verification (union re-run at final head
342070617, tree clean; every command throughscripts/pm/os-verify-lock.sh, exit codes captured before any pipe)pnpm --filter @objectstack/spec build— green (check-dts-emitted: 34/34 declared declaration file(s) present).pnpm --filter @objectstack/spec test— 435 files / 11525 tests passed (vitest summary line:Tests 11525 passed (11525)).pnpm --filter @objectstack/spec typecheck— green, including the test layer:check:test-typecheck: OK — @objectstack/spec's test layer compiles under packages/spec/tsconfig.test.json(the edited test file is covered by that program and is not a debt-ledger entry).410f85825; restore viagit checkout HEAD -- path, proven by emptygit diff HEAD): withcomponent.zod.tsreverted to based7b3963c2(mutation confirmed on disk:grep -c "headerColor: z.enum"= 0) and the new tests kept, both new pins turned RED as predicted — the accept test on the unrecognized key, the reject test on the issue-code mismatch — and back green on restore. Direction observed: turned red (the normal direction).pnpm --filter @objectstack/spec check:authorable-surface— green at342070617; its own verdict:authorable-defaults/ verified against upstream 7a25e7d606b7 — 1255 default(s) unchanged; the base-anchor lag line is printed by the check as informational, not an error.pnpm --filter @objectstack/spec check:generated— green at342070617:✓ All 14 generated artifacts are up to date.(An earlier run pre-merge provedapi-surface/stale — dist mtime vs the reverse-verification leg, the same shape the record:details sections: five more renderer-honoured keys remain undeclared by the strict section schema (title / defaultCollapsed / icon / description / headerColor) #11661 batch recorded; rebuilt and regenerated byte-identical, zero tracked-file diff.)node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack, change set taken by the script from merge-base), re-run at342070617:check:spec-parsed-alias(ADR-0122 ... OK),check:engine-double-contract(OK — 689 pinned, 134 in the DEBT ledger, 3 exempt),check:where-matcher(303 matcher(s) ... answer the combinator battery correctly or refuse it loudly),check:query-options-erasure(ratchet holds ... none new),check-nul-bytes(OK — scanned 6978 text file(s)). Declared narrowing: the remaining derived families (docs-family checks, CI-filter parity, etc.) are left to CI, which runs the farm on every PR;check:type-check-debtneeds the full workspace closure built and the edited test file sits in an existing tsc program with no ledger entry, so the edit cannot move its per-entry counts.Landing-watch
Both watched PRs landed mid-flight and were merged in, each followed by a full union re-run (build, full spec suite, typecheck, check:generated, check:authorable-surface, ratchet gates): #12614 (spec ui/action.zod.ts + plugin-security) merged at
533fc01b1, then #12613 (kernel CLICommandContributionSchema retirement) merged at final head342070617.origin/mainre-fetched after the final push: no further commits.The
@object-ui/typesmirror narrowing is the objectui leg — zero objectui edits here; the PM files that follow-up card.Stops at DRAFT per the dispatch contract (clause-② contract review; no ready-flip, no auto-merge).
Generated by Claude Code