Repository navigation
docs(types): the ChartSchema chartType row lists the declared ChartType set, pinned against the node's zod enum (objectui#11521) - #11528
Conversation
…pe set, pinned against the node's zod enum (objectui#11521) The row taught "heatmap", which the chart node refuses at chartType on both faces, and left out the declared families beyond its seven. It now lists the @objectstack/spec ChartType set, and a pin reads that set off ChartSchema.chartType at test time and holds the row equal to it. Claude-Session: https://claude.ai/code/session_01HRYqpqGcWpJuJkDmbRF75w Co-authored-by: Claude <noreply@anthropic.com>
…ing (objectui#11521) Claude-Session: https://claude.ai/code/session_01HRYqpqGcWpJuJkDmbRF75w Co-authored-by: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
✅ Console Performance Budget
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
Size Limits
|
…hema-reference.md (objectui#11521) The markdown-input ledger's audit found the new pin reading content/docs/api/schema-reference.md without an ADJUDICATED entry. It now has one, so a docs-only edit to that page runs the shard that holds the pin. Claude-Session: https://claude.ai/code/session_01HRYqpqGcWpJuJkDmbRF75w Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
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
Size Limits
|
Fixes #11521
Clause-②: no
The
chartTyperow of theChartSchematable incontent/docs/api/schema-reference.mdnow lists the@objectstack/specChartTypeset that thechartnode declares. A new pin in@object-ui/typesholds the row equal to that set. It reads the set off the node's zod enum at test time.Dispatched by the
domain:devxseat 2 PM under triage's direction (comment5963348113) and the seat's claim (comment5963925327), sessionhttps://claude.ai/code/session_01HRYqpqGcWpJuJkDmbRF75w.The row, before and after
chartTypedescription cell8366accd1)"bar","line","area","pie","donut","radar","scatter","heatmap".@objectstack/specChartTypefamilies:"bar","horizontal-bar","column","line","area","pie","donut","funnel","scatter","treemap","sankey","combo","gauge","solid-gauge","metric","kpi","bullet","radar","table","pivot". Any other value is refused with the set named (objectui#11521). The single-value families draw the first series' value in the first row as one number, and the tabular families draw a notice that points at the data-table and pivot components; the others plot the series.The values are in the spec's own order. The pin compares them as a set, so a reorder in the spec does not turn it red.
Premise check, measured on
origin/main8366accd1ChartTypeis the spec's own type (export type ChartType = SpecChartTypeinpackages/types/src/data-display.ts). The node's mirror declareschartTypewith the spec'sChartTypeSchema, which is a zod enum. In the installed@objectstack/spec17.5.0 it has twenty families. 17.6.0 has the same twenty (read in objectui#11438's worktree).safeValidateSchemaandStrictAnyComponentSchemaparsedbar,kpiandtablegreen. It refusedheatmapatchartTypeas oneinvalid_value, and that issue'svaluesare the twenty families.funnel,treemap,sankey,combo,columnandhorizontal-bar. The other seven aregauge,solid-gauge,metric,kpi,bullet,tableandpivot.chartTypevalues equal the declaredChartTypeset" cannot both hold. This PR follows the pin, which is also the dispatch's direction: derive the set from the type, never from the card's list. The thirteen families that join include the card's six. The conflict is named here, not settled silently.AdvancedChartImpl, the single-value families (SINGLE_VALUE_CHART_TYPES) draw the first series' value in the first row as one number. The tabular families (TABULAR_CHART_TYPES) draw a notice that points at the data-table and pivot components. plugin-charts'chart-type-spec-parity.test.tsxholds those branches. The row says this in one sentence and does not list which family is which, so no second hand list is left unpinned.Is the declared set reachable at runtime?
Yes.
ChartTypeitself is type-only, but its set exists as a value: the spec'sChartTypeSchemais a zod enum, andChartSchema.chartTypeuses it by reference through objectui'sChartTypeSchemainpackages/types/src/zod/data-display.zod.ts. The pin does three things:shapeEnumOptions(ChartSchema, 'chartType'), the node's own declaration, on every run.ChartTypeSchemaoptions.ChartTypeto the spec'sChartType. That check runs undertsc -p tsconfig.test.json, the third leg of the package'stype-check.Nothing in the test writes the set out, so the row is asked to follow the installed spec when objectui#11438's bump lands.
The pin
packages/types/src/__tests__/chart-type-doc-row-11521.test.tsfollows the shape of objectui#11491'sgrid-columns-set-11491.test.ts: the declared set on the zod face, both doors, and a compile-time check that the faces state one set. The doc side is parsed off disk the wayschema-reference-named-list-view-keys-7923.test.tsreads this page: the repo root is found fromimport.meta.url, and a moved heading, a renamed property or a row with no quoted values throws instead of passing.ChartTypeSchema.heatmapis refused atchartTypeas oneinvalid_valuewhosevaluesare the declared set. That is the row's "refused with the set named".ChartTypestate one set (compile-time).Mutation proof
The fix was committed first (
9e4bfca), and the mutations ran on61749c7. Every mutation went throughobjectstack/scripts/ablation-replace.mjsin WRAP mode. For each one, the tool confirmed the anchor hit once and the blob changed. After each one, it confirmed the restore: the blob equals HEAD andgit diff HEADis empty. The tree after all legs:git diff HEADis 0 bytes.Tests 8 passed (8)"heatmap"re-added to the rowTests 3 failed / 5 passed (8): the row equality, plus "accepts every family the row lists" on both faces (chartType "heatmap" refused)"pivot"dropped from the rowTests 1 failed / 7 passed (8): the row equalitypivot(ChartTypeSchema.exclude(['pivot'])atChartSchema.chartType)Tests 4 failed / 4 passed (8): spec equality, row equality, and "accepts every family the row lists" on both faces (chartType "pivot" refused)pivot(ChartTypebecomesExcludeof the spec type minuspivot)tsc -p tsconfig.test.jsonexits 2 with 5 errors. Two are in this file: thetsIsSpecandfacesAgreechecks (Type 'true' is not assignable to type 'false'). The other three are in the existingspec-derived-unions.test.tsandzod-mirror-parity.test.ts.The red came out in the expected direction every time. None of these legs needed a rebuild: the test imports
../zod/*.jsfrom source, and@objectstack/specis the installed package, not a workspace build.Other hand-written enum rows on this page (named, not fixed)
Each row was compared with its declaration by a one-off probe: zod enum options through
shapeEnumOptions, or the TS union where the zod schema is a lazy one. This is a reading taken on 2026-10-03 at61749c7. Nothing re-derives it.PageNodeSchema.pageType,CardSchema.variant,GridSchema.gap, and the breakpoint names inGridSchema.columns;TabsSchema.orientation,FormSchema.layout,FormSchema.validationMode,InputSchema.inputType;ButtonSchema.variant/size/iconPosition/buttonType;ChartSchema.series: the per-seriestype,yAxisandvariant;ActionSchema.actionType/method/chainMode;ObjectFormSchema.mode/formType/layout/drawerSide/modalSize, andObjectKanbanSchema.navigation'smode;ObjectViewSchema.defaultViewType,CalendarViewSchema.view,DetailViewSchema.layout,ViewSwitcherSchema.variant/position.ActionSchema.levellists six values. Both faces declare a seventh,"default".ViewSwitcherSchema.defaultView(typeViewType) lists seven values. Both faces declare eleven: the extra four aregallery,gantt,chartandtree.BaseSchema.typelists example registry keys.Acceptance notes
chartnode still declares families it draws no chart of.object-chartnarrowedchartTypeto the thirteen families plugin-charts draws in objectui#11513. The inlinechartnode still declares all twenty, and for seven of them it draws a number or a notice. Whether it should narrow too is a contract question for the seat, not this card. The row follows the declaration as it stands.Gates
All gates ran on
61749c7(git rev-parse --short HEAD), the final commit. Exit codes were captured before any pipe.pnpm exec vitest run packages/types/src/__tests__/chart-type-doc-row-11521.test.ts:Tests 8 passed (8).pnpm --filter @object-ui/types run type-check(echoedtsc --noEmit && tsc -p tsconfig.examples.json && tsc -p tsconfig.test.json): exit 0.schema-reference(git grep -l 'schema-reference' -- '*.test.ts' '*.test.tsx') plus every test that walkscontent/docs(git grep -l -Efor a quotedcontent/docsroot). Run aspnpm exec vitest run --maxWorkers=1over those 29 files:Test Files 29 passed (29),Tests 1117 passed (1117).node scripts/check-changeset-presence.mjs: exit 0. It reports1 changeset(s): .changeset/11521-chart-type-doc-row.md, and every changeset has an EMPTY frontmatter, which it calls "the explicit exemption and a complete answer to this gate".node scripts/check-changeset-no-major.mjs: exit 0.pnpm run check:control-bytes,check:new-line-citations(0 new citation(s)),check:test-path-roots,check:changeset-claims,check:pending-changeset-literals,type-check:coverage(43/43 packages compile their tests),check:doc-fences,check:doc-example-idsandcheck:doc-types(Every documented component type is registered.): all exit 0.pnpm exec eslint --no-inline-config --format jsonover the one new source file reports 1 file, 0 errors and 0 warnings.eslint --print-configon it resolves 118 rules, among themobject-ui/no-line-address-in-test-name, and no ignore warning was raised.parserOptionsis empty, so linting is not type-aware, and this diff cannot move the verdict on any file it does not touch.Verification narrowing, declared. The shared verify lock was held throughout by objectui#11438's full run (pid 14877, more than 75 minutes). This branch's slot queued three times, 540s each, and each attempt returned
queue-timeout (exit 99). Per the dispatch's queue rules, everything above ran outside the lock, and only as targeted runs: one test file, one package type-check, and the 29-file union at--maxWorkers=1. Not run locally: the full@object-ui/typesvitest suite (345 files) and the repo-wide suite and lint. Those belong to CI.Blind spot of the union. It finds tests by the literal page name and by a quoted docs root. A test that reaches this page through another spelling is not in it.
Generated by Claude Code