feat(types): declare node-level responsiveStyles on flex, object-grid and object-chart, by reference to the spec (objectui#10872, batch 9) - #11273
Conversation
…-grid` and `object-chart`, by reference to the spec (objectui#10872, batch 9) The three arms outside the public-block set whose nodes a producer writes `responsiveStyles` on spread batch 8's shared fragment, so the member is the same object on all 33 arms. The fragment is renamed from `PUBLIC_BLOCK_ENVELOPE` to `NODE_ENVELOPE`, because it is no longer the public blocks' alone. The published TypeScript twins declare the key as the spec's `ResponsiveStyles`, which the mirror-parity census requires for a mirrored key. `BaseSchema` and every other arm are unchanged. Claude-Session: https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ Co-authored-by: Claude <noreply@anthropic.com>
… and the imported-defaults note (objectui#10872) Text only. The census reads the row's presence, not its words. Claude-Session: https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ Co-authored-by: Claude <noreply@anthropic.com>
…eStyles` (objectui#10872, batch 9) The slot takes `ObjectGridSchema`'s members, so declaring the key on the grid put it in the slot too, where nothing compiles it: the view draws its grid as a component. The slot now refuses `table.responsiveStyles` by name on both faces, as it refuses the other node-level keys (objectui#10976), with a reason of its own. The two member pins that read the TypeScript twins name the one new member: the grid's count, and the one member `flex` declares and `stack` does not. Claude-Session: https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ Co-authored-by: Claude <noreply@anthropic.com>
…n, not a bare `any` (objectui#10872) `stack` declares no `responsiveStyles`, so its member resolves through the index signature: the exact shape the three twins had before this batch. No explicit `any` is left in the file. Claude-Session: https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ 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
|
Contract reviewServed-tier: PR objectui#11273 (batch 9 of card objectui#10872), judged against the card's body and its 54 comments, the PR body and file list, the net diff against ① Derived judgmentsEvery accept-set and public-surface change the diff implies, each judged:
② Semver level
③ Boundary flagsDev report
Implemented-by: VERDICT: PASS |
Part of #10872
Clause-②: yes
Batch 9 of objectui#10872. It declares the node-level
responsiveStylesthat@objectstack/spec'sPageComponentSchemadeclares on every page component on the three arms outside the public-block set that a producer writes it on:flex,object-gridandobject-chart. The declaration is by reference to the spec, from batch 8's fragment. Claim5918816527, seatdomain:ui#1, sessionhttps://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ.Clause-② yes (widening). The strict authoring face (
StrictAnyComponentSchema) now accepts a spec-valid node-levelresponsiveStylesonFlexSchema,ObjectGridSchemaandObjectChartSchema. Before, it refused the key by name. Changeset:.changeset/10872-flat-arm-responsive-styles.md,'@object-ui/types': minor. Unlike batch 8's arms, these three were already published, so the changeset spells out the narrowings too (see Acceptance notes).What changed
FlexSchema(layout.zod.ts),ObjectGridSchemaandObjectChartSchema(objectql.zod.ts) spread the same fragment the 30 public-block arms spread. The member is ONE object on all 33 arms: the spec'sResponsiveStylesSchemathrough the objectui#8317 boundary.BaseSchemais not touched, and neither is any other arm.PUBLIC_BLOCK_ENVELOPEtoNODE_ENVELOPE. It stays inpublic-blocks.zod.ts, because that module imports onlybase.zod.ts,imported-defaults.tsandtombstone.zod.ts, so neither import makes a cycle. Withflexspreading it, the old name would tell a reader thatflexis a public block. The rename is mechanical: 30 occurrences inpublic-blocks.zod.ts, 5 inobjectql.zod.ts, plus one census row key, one test comment and one README line. On-disk counts were 0 old / 38 new after the rename.FlexSchema(layout.ts),ObjectGridSchemaandObjectChartSchema(objectql.ts) declareresponsiveStyles?: ResponsiveStyles, the spec's type by reference (type-only import, asdataSource?: ElementDataSourcealready is). It is not onFlexLayoutProps, sostackdoes not gain it.object-view'stableslot does not gain the key. The slot is built fromObjectGridSchema's shape, so the zod change alone would have madetable.responsiveStylesaccepted and judged, where nothing compiles it:ObjectViewdraws its grid as a component. The slot now refuses it by name, as it refuses the other node-level keys (objectui#10976). The reason is its own, not the shared node-level one, because that one points the author at theobject-viewnode, whose arm does not declare the key either.packages/types/src/__tests__/flat-arm-responsive-styles-10872.test.ts, with 37 runtime rows and 3 type-level assertion groups. Forced edits to existing pins:flextogrid;object-view-slot-key-lists.test.ts: the grid's member count goes from 63 to 64, andresponsiveStylesjoins thenodeLevelwithheld set;stack-schema-emitted-members.test.ts:stackdeclares exactlyflex's members less the namedresponsiveStyles;zod-mirror-parity.test.tsandimported-defaults-8317.test.ts: the row key follows the rename, and the reason names the three arms. The census reads presence, not words.README.mdline plus the rename in the existing line, and one changeset.The order's mechanism assumptions, measured
The pull, re-driven. objectui
54a78308a3was read from its tracked files. objectstackaaad682dbc(main at 2026-09-30T19:33Z) was read from a depth-1 scratch clone; the shared checkout was not fetched or edited. The instrument isscripts/body-dialect-census.mjs(scanNodes,keepFencedCodeOnly,bucketOf) under an uncommitted scratch driver. It counts NODES carrying a node-levelresponsiveStyles, and it reads the arm population at run time fromAnyComponentSchema(189 literals, 30 of them public-block literals).flex16 (showcasecommand-center.page.ts8 andstyling-gallery.page.ts7, plus skillrules/pages.md1),object-chart1 andobject-grid1 (both incommand-center.page.ts). Every other non-public arm: 0. objectui non-test: 0.flex11; objectuiflex1,object-chart1).The faces at base. For all three arms, the strict face refused a valid map as
unrecognized_keysnamingresponsiveStyles. The tolerant face ACCEPTED and kept7and{ md: … }unjudged.grid,stackandcontainerread the same. Confirmed.Reuse the fragment. There is no cycle, so the fragment was not moved. It was renamed because the name would lie (see What changed). There is no second copy of the member: the pin asserts identity with
PageSectionBlockSchema.shape.responsiveStyles.Flat arms and the TypeScript twins. Measured with the zod member alone, before any TypeScript edit,
tsc -p tsconfig.test.jsonfailed on two census assertions:assertionMirroredUndeclaredMatchesLedgernamed exactly the three pairs (layout.zod.ts#FlexSchema,objectql.zod.ts#ObjectChartSchema,objectql.zod.ts#ObjectGridSchema);assertionMirroredUndeclaredRecordsEveryKeynamedresponsiveStyles.Two edits turn it green: three new
MirroredUndeclaredrows, or the declaration on the twins. That ledger is a floor that "can only shrink", so the declaration was taken, by reference to the spec's type, as the order's item 4 says. It is part of the same widening. Two more consumers read the twins through the compiler and were forced as listed above.BaseSchemastays untouched. It is not in the diff; the pin asserts thatBaseSchema.shapelacks the key and that every other arm refuses it. There is noneeds_decision.Evidence
Red first, at base
54a78308a3with the pin added and the source unmodified.pnpm exec vitest run --maxWorkers=2 …/flat-arm-responsive-styles-10872.test.tsgaveTests 17 failed | 20 passed (37). The 17 reds:unrecognized_keys);The 20 controls (population, lit control,
grid/stack/container, and the other five envelope keys) were green.pnpm --filter @object-ui/types type-checkat base gave 8 errors: TS2339 on the three zod shapes, and TS2344Type 'false' does not satisfy the constraint 'true'on the three TypeScript-twin assertions.Ablation, at
c4edd1d106with the implementation committed first. It ran three single-arm legs through objectstack'sscripts/ablation-replace.mjsin WRAP mode, plus a shell trap restoring both zod files by absolute path. Each leg deleted one arm's spread, and each anchor hit exactly once:flexleg: blob797a9c0b4e63to6011a4533631,Tests 7 failed | 30 passed (37);object-gridleg:2aa44c282213to1e00d88afe2c,6 failed | 31 passed;object-chartleg:2aa44c282213to673ec48085df,6 failed | 31 passed.The union of the three is exactly the 17 red-first rows. Every restore read
ok restored: blob == HEAD … git diff HEAD is empty, and the final check read both blobs equal to HEAD withgit diff HEADat 0 bytes. The pin imports../zod/index.zod.jsfrom source, so there is no dist leg.Reverse type check, through the rebuilt
dist. A scratch consumer inpackages/componentsresolved@object-ui/typestopackages/types/dist/index.d.ts(--traceResolution). It got exactly 3 errors, one per bad line: TS2353'md' does not exist, TS2559 for a number, and TS2322 for a boolean style value. The three valid lines got none. The scratch files were deleted.Runtime probe (scratch, deleted). Each type was mounted through the real
SchemaRendererand registry, and each emitted astyle[data-os-scope]with the base block and the@mediaoverride:flex: the scope class is on the flex rootdiv;object-grid: on the grid's containerdiv, which holds the rows;object-chart: on the chart container ([data-slot="chart"]), which holds the SVG.In each control without the key, 0 style tags were emitted. Declared is enforced on these arms.
Final head
c31dff6c1f, clean tree, one os-verify-lock hold per step, every VERDICT command-exit 0:pnpm --filter @object-ui/types buildgavedist completeness: 1 package(s) complete;pnpm --filter @object-ui/types type-checkpassed, andtsc -p tsconfig.test.json --listFilesOnlylists both 10872 pins;pnpm exec vitest run packages/types/gaveTest Files 296 passed (296)andTests 7412 passed (7412);pnpm exec vitest run packages/cli/gave23 passed (23)and335 passed (335); the registered-types ratchet is unchanged;packages/typesandpackages/cli: every file naming the zod node union, the strict face,safeValidateSchema, the@object-ui/types/zodentry, an arm.shape, orFlexSchema/StackSchema/ObjectGridSchema/ObjectChartSchema/ObjectViewSchema/responsiveStyles/ the fragment. It gave79 passedwith 1537 tests and83 passedwith 1196 tests;scripts/__tests__files that read.changeset/gave24 passed (24)and914 passed (914).Gates at
c31dff6c1fobjectui has no
scripts/pm/dispatch-gates.mjs. The families were derived by hand from the rootpackage.jsonfor this diff's paths (packages/types/src/**, one README, one changeset).pnpm check:handler-key-reads: exit 0,OK 140 arm(s), 212 registration(s).pnpm check:spec-symbols: exit 0.pnpm check:new-line-citations: exit 0,VERDICT new-cross-file-line-citations: 0 new citation(s).node scripts/check-changeset-presence.mjs: exit 0,12 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s).pnpm changeset:check: exit 0,No changeset declares a major bump.pnpm check:control-bytes: exit 0. Agrep -Pcontrol-byte scan of the 13 changed files found 0.check:changeset-claims(report-only),check:pending-changeset-literals,check:component-surface-parity(report-only; no row names these keys),check:test-path-roots,check:element-data-source-declaration,check:esm-specifiers, andmarkdown-test-inputs --audit.check-governed-queue-guard.mjs --teston the 13 paths: NOT GOVERNED.--no-inline-config --format json: 11 files, 0 errors. All 37 warnings areno-explicit-anyon lines this diff does not add (checked line by line against the diff).--print-configshows noproject/projectService, so linting is not type-aware and an untouched file's verdict cannot move. Repo-widepnpm lintis CI's.check:readme-exports. Its population collapsed (packagesRead: found 3, floor is 25) because the other packages'distis not built in this worktree. That is a prerequisite, not a verdict. The README lines edited here carry no fenced block.Acceptance notes
responsiveStylesvalue on the three arms, andtable.responsiveStylesby name. The three TypeScript interfaces type the key as the spec's type, where it wasanythrough the index signature. Level:minor, as the ruling set it;check-changeset-no-majorforbidsmajor.properties. The three flat arms do not declareproperties, so the strict face also refuses them by name. On the tolerant face theobject-gridandobject-chartnodes are refused too (objectNamerequired; no chart family), because the arms read those keys at node level.SchemaRendererhoistspropertiesand renders the nodes, and the spec accepts them. This is reported to the seat as a finding, and is relevant to PR objectui#11069's un-park census.object-chart's scope class lands on the chart container, not theObjectChartroot. A first probe on a node with no series binding drew the explanatory placeholder, and that placeholder did not carry the class.Type Check. Outsidepackages/types, no TypeScript source writesresponsiveStyleson a node typed as one of these interfaces: the only hits are comments,identity-probefixtures andSchemaRenderer's own read. The one derived type, thetableslot'sPick, is pinned byobject-view-slot-key-lists.origin/mainmoved tof4ed2387e9(objectui#10188, objectui#11163) with zero file overlap with this branch, so it was not merged; the queue rebuilds onmain.Deviations
public-blocks.zod.ts(rename only),layout.ts/objectql.ts(the twins, forced by the census), and two existing type-reading pins (forced). Each is listed above with its reason.Generated by Claude Code