This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(types): key GridSchema.columns by the breakpoint vocabulary, not string - #8519
Merged
os-justin merged 1 commit intoSep 8, 2026
Merged
Conversation
…t `string`
`columns` was declared `number | Record<string, number>` while the `grid`
renderer reads exactly six keys — `xs` `sm` `md` `lg` `xl` `2xl`, the whole of
`BreakpointName` — and `grid-breakpoint-columns-7097.test.tsx` already pinned
that read set exhaustive in both directions. So the renderer and its pins agreed
on six and only the type still said "any string": `{ xxl: 6 }`, `{ XL: 5 }` and
`{ '2XL': 6 }` type-checked, passed the zod mirror, emitted no class and rendered
the grid at its `xs` count on every screen. That is the declared-but-not-read
shape objectui#7097 fixed at the value level, reached through the type surface,
and this was its last copy.
Narrow to `number | Partial<Record<BreakpointName, number>>`. `BreakpointName`
is declared in this package's own `mobile.ts`, which imports nothing, so the
layering carries no cycle.
Zero producers touched, measured rather than assumed: `turbo run type-check`
over the whole repo (81 tasks; `check:type-check-coverage` reports 42/42
packages compile their tests) is green with the narrowing applied and no call
site edited. The structural reason is pinned — a string index signature supplies
every optional member of the target, so a computed `Record<string, number>`
still assigns and only fresh object LITERALS meet excess-property checking.
The zod mirror is deliberately left open and reported for its own card: closing
it ships runtime bytes into the console `framework` chunk, measured at 70,999
gzip bytes against a 71,000 ceiling. This change emits nothing — `dist/layout.js`
is `export {};`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
Contributor
✅ 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
|
os-justin
marked this pull request as ready for review
September 8, 2026 05:12
os-justin
enabled auto-merge
September 8, 2026 05:12
os-justin
deleted the
claude/issue-8505-gridschema-columns-breakpoint-narrowing
branch
September 8, 2026 05:42
This was referenced Sep 8, 2026
os-justin
pushed a commit
that referenced
this pull request
Sep 8, 2026
…g raise could not (objectui#8542) `fa9e76ccd` raised `PER_CHUNK_GZIP_CEILINGS.framework` to 100,000 and recorded, honestly, that it could not say what the bytes bought: "the commits in that window have never been bisected — this checker is a two-build predicate over them and no one has run it." That is the one sentence this change replaces. The bisect has now been run — one `apps/console` build per point, each from the repo ROOT, `framework` read out of the `apps/console/dist/eager-closure.json` the build itself writes: | build | landed by | `framework` gzip | moved by | | `40a7c538a` | #8503 | 70,999 | last GREEN, 1 byte under | | `512c84b16` | #8519 | 70,999 | 0 | | `f76f43628` | #8512 | 71,261 | +262 | | `e76634cc8` | #8529 | 72,245 | +984 | | `e411c3e58` | #8562 | 72,248 | +3 | Two commits own the overage, not one, and the LARGER one is outside the window every card bounded its reasoning to: `e76634cc8` landed after the red had already started and carries 984 of the 1,246 bytes the pair added. A repair scoped to that window would have left `main` red. `512c84b16` emitted a byte-identical chunk to `40a7c538a` — the same `framework-nDOJv2Ij.js` content hash — so the three commits between them moved this chunk by zero, and `270f2825b` touches no file under `packages/(core|react|types)` at all. What the bytes buy is therefore sayable, which is what the gate's own failure message asks of a raise: both contributors are silent-wrong-answer fixes on one file's filter path. `f76f43628` stopped an unrecognised `$` operator adding no constraint and matching every row; `e76634cc8` stopped an array comparand and a `{ $field }` reference being compared by reference, which selected every row under `$ne` and no rows under `$eq` without saying so. No constant moves. The prose that records what the raise COSTS is kept intact, including that the attribution arrived after the ceiling did. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
akarma-synetal
pushed a commit
to akarma-synetal/objectui
that referenced
this pull request
Sep 9, 2026
…g raise could not (objectui#8542) (objectstack-ai#8579) `fa9e76ccd` raised `PER_CHUNK_GZIP_CEILINGS.framework` to 100,000 and recorded, honestly, that it could not say what the bytes bought: "the commits in that window have never been bisected — this checker is a two-build predicate over them and no one has run it." That is the one sentence this change replaces. The bisect has now been run — one `apps/console` build per point, each from the repo ROOT, `framework` read out of the `apps/console/dist/eager-closure.json` the build itself writes: | build | landed by | `framework` gzip | moved by | | `40a7c538a` | objectstack-ai#8503 | 70,999 | last GREEN, 1 byte under | | `512c84b16` | objectstack-ai#8519 | 70,999 | 0 | | `f76f43628` | objectstack-ai#8512 | 71,261 | +262 | | `e76634cc8` | objectstack-ai#8529 | 72,245 | +984 | | `e411c3e58` | objectstack-ai#8562 | 72,248 | +3 | Two commits own the overage, not one, and the LARGER one is outside the window every card bounded its reasoning to: `e76634cc8` landed after the red had already started and carries 984 of the 1,246 bytes the pair added. A repair scoped to that window would have left `main` red. `512c84b16` emitted a byte-identical chunk to `40a7c538a` — the same `framework-nDOJv2Ij.js` content hash — so the three commits between them moved this chunk by zero, and `270f2825b` touches no file under `packages/(core|react|types)` at all. What the bytes buy is therefore sayable, which is what the gate's own failure message asks of a raise: both contributors are silent-wrong-answer fixes on one file's filter path. `f76f43628` stopped an unrecognised `$` operator adding no constraint and matching every row; `e76634cc8` stopped an array comparand and a `{ $field }` reference being compared by reference, which selected every row under `$ne` and no rows under `$eq` without saying so. No constant moves. The prose that records what the raise COSTS is kept intact, including that the attribution arrived after the ceiling did. Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Sep 27, 2026
akarma-synetal
pushed a commit
to akarma-synetal/objectui
that referenced
this pull request
Sep 28, 2026
…nd columns type row (objectui#10720) (objectstack-ai#10795) Fixes objectstack-ai#10720 Clause-②: no — a docblock and one reference row are corrected; no declared surface moves ## What changed Two published-text-only sites, no runtime or code-behaviour change: 1. `packages/layout/src/ResponsiveGrid.tsx`'s `ResponsiveGrid` component docblock named the spec's retired `BreakpointColumnMapSchema` as what the component consumes. The same file already declares its own `BreakpointColumnMap` interface earlier (the six keys `xs`…`2xl`), re-homed by objectui#7580 after objectstack#11027 retired the spec export. The docblock now names that local type. Comment only; the diff shows no code line moved. 2. `content/docs/api/schema-reference.md`'s `grid` properties table typed `columns` as `number | Record<string, number>` (any string key legal). On `origin/main`, `GridSchema.columns` (declared in `packages/types/src/layout.ts`) is `number | Partial<Record<BreakpointName, number>>`, from objectui#8505/objectstack-ai#8519's narrowing. `BreakpointName`, declared in `packages/types/src/mobile.ts`, is the six-member breakpoint union. The zod mirror (`packages/types/src/zod/layout.zod.ts`) is narrowed the same way by objectui#8516, as a `z.partialRecord` over the six names. The row now names that type and spells the six keys. **No release qualifier added.** Both narrowings are pending release: `.changeset/8505-grid-columns-breakpoint-narrowing.md` and `.changeset/8516-8556-mirror-partial-record-narrowing.md` are on `main`, so the published 17.6.0 still takes an open string-keyed record. The corrected row teaches the narrower shape, and a map written from it is valid on 17.6.0 and on `main` alike. `content/docs/**` carries no per-npm-version convention. ## Changeset `.changeset/10720-grid-columns-docs.md` — `@object-ui/layout`: patch. The docblock ships in the package's `.d.ts`, so this is a released-surface text change. The docs row needs none (`content/docs/**` is not a published package). ## Serial constraints Draft PR objectui#8941 also edits `content/docs/api/schema-reference.md`, inside the `detail-view` JSON example's action `icon` value (the `lucide-react` icon-name bump). That is a different table from this PR's `grid` properties table, with no hunk overlap. ## Gates (all run at head `fc4b1f312d`, from a fresh `origin/main` fetch; no closure build needed, since none of these read `dist/`) - `pnpm check:doc-fences` — exit 0: "every TypeScript block in 227 document(s) is fenced …" - `pnpm check:doc-types` — exit 0: "Every documented component type is registered." - `pnpm docs:check-links` (`node scripts/check-doc-links.mjs`) — exit 0: "Links are valid across 17 scan roots." - `pnpm check:control-bytes` — exit 0: "OK (scanned 8987 tracked text file(s); skipped 85 binary)." - `pnpm check:new-line-citations` — exit 0: "0 new citation(s), enforcement report-only" - `node scripts/check-changeset-presence.mjs` — exit 0: "1 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s)" - `node scripts/check-changeset-no-major.mjs` — exit 0: "No changeset declares a `major` bump." - `git merge-tree --write-tree origin/main HEAD` — one clean tree, no conflict markers, against `origin/main` re-fetched right before the check. - `node scripts/pm/check-governed-merges.mjs --test` over the 3 changed paths (objectstack checkout) — "NOT governed — ordinary queue landing applies to a PR with exactly this file list." Not run: `pnpm test` / `pnpm lint` (repo-wide, CI's). ## Acceptance notes - `packages/types/src/mobile.ts`'s `BreakpointName` docblock still names `BreakpointColumnMapSchema` in its history section. That is correct: it is in the past tense, as the spec name objectstack#11027 retired. Not a defect; left untouched. - Body replaced by the dispatching seat at landing. It applies the dev's `pr_body_replacement`, which drops the `path:line` citations the `changeset-claim-re-read` comment flagged. The seat also corrected one false sentence: the original said the zod mirror is "unchanged, still `z.record`", but it is narrowed by objectui#8516. --- _Generated by [Claude Code](https://claude.ai/code)_ Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8505
Partial[Record[BreakpointName, number]], never the real spelling. AGENTS.md's "GitHub 会改写你写进 issue/PR 正文的字节" section records that tag-shaped fragments are deleted on save, backticks and fenced blocks included, and this PR is entirely about the shape of one type. Session:https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S.What changed
GridSchema.columns(packages/types/src/layout.ts) goes fromnumber | Record[string, number]tonumber | Partial[Record[BreakpointName, number]].BreakpointNameis declared in this package's ownmobile.ts, which imports nothing, so the layering carries no cycle. Plus one pin file and a changeset. Three files, no other edit.The
gridrenderer reads exactly six keys —xs sm md lg xl 2xl, the whole ofBreakpointName— andgrid-breakpoint-columns-7097.test.tsxalready pinned that read set exhaustive in both directions. Only the type still said "any string", so{ xxl: 6 }compiled, passed zod, emitted no class and rendered at thexscount on every screen. Last surviving copy of the shape objectui#7097 fixed at the value level.⭐ Which surface this closes: the TypeScript one ONLY
The card asked for this to be decided deliberately and stated here, so: the zod mirror is not narrowed by this PR.
zod/layout.zod.tskeepsz.record(z.string(), z.number()), soos-ui validatestill admits{ xxl: 6 }from JSON.That is a byte measurement, not a preference. The console
frameworkchunk ispackages/(core|react|types)andcheck-eager-closure-budget.mjsceilings it at 71,000 gzip bytes; on this branch's base it measures 70,999 — one byte of headroom, which objectui#8485 had just spent down while explicitly refusing to raise the ceiling. A zod narrowing ships real runtime bytes and would turnBundle Analysisred, making its own remedy a byte-hunt through two other packages. This change emits nothing —packages/types/dist/layout.jsisexport {};— and the budget gate is green on this head.Reported as #8516, with the byte figure and the shape questions it needs ruled. The last block of the new pin holds the current
success: truereading visible with a lit control beside it, as a handoff in the objectui#7070 sense, so it flips to a refusal when that card lands instead of quietly agreeing with whatever the mirror ends up doing.Producers: zero touched, and that is a measurement
The dispatch asked me to find producers before narrowing and to stop rather than widen this PR to absorb them. Two independent readings agree there are none.
Empirical.
turbo run type-checkrepo-wide, cache forced off: 81 tasks successful, 0 TS errors, no call site edited.pnpm type-check:coveragereports 42/42 packages compile their tests, so that number covers every package's source, test and example program rather than sources alone.Structural. A string index signature supplies every optional member of the target, so a computed
Record[string, number]still assigns; only fresh object LITERALS meet excess-property checking. That is pinned in the new file, so a future tightening that removes the escape reddens there and names its own blast radius instead of surfacing in a consumer's build.The instrument, and which program each red came from
packages/typesruns three programs.tsc --noEmit(source) compilessrc/layout.tsand excludes__tests__by directory;tsc -p tsconfig.test.json(test) compiles both. Verified with--listFilesrather than assumed, per the objectui#8342 note on the card:src/layout.tstsc --noEmittsc -p tsconfig.test.jsonThe test program contains zero files from
packages/types/dist, so the pin reads the declaration as source and no stale.d.tscan sit between them. Every red quoted below is from the test program. A vitest run proves nothing about any of it and none is claimed from one.⭐ The caricature was RUN, not reasoned about
Four mutations of the member, from the committed implementation, each restored by state (
git diff HEADempty ANDgit hash-objectequal togit rev-parse HEAD:PATH), trap onEXIT INT TERM, absolute paths, mutation proven on disk by a before/after count on both the removed and the injected text.number | Record[string, number](the bug restored)@ts-expect-errorgo TS2578 "unused" + bothEqassertionsnumber | Record[never, number](reject everything)_keyedByVocabulary+ the 5 TS2578Partial[Record[BreakpointName, number]](bare-number arm dropped)_columnsShape, the bare-number row, and 2 independent reds in the siblingzod-mirror-paritypinnumber | Partial[Record['xs', number]](reject 5 of 6)ONE_KEY_NODESrows, one per lost breakpoint, + bothEqs + 2 positive rowsONE_KEY_NODES— the six-rowRecord[BreakpointName, GridSchema]— is what catches the reject-everything caricature. It is not.Record[never, number]is{}, TypeScript runs no excess-property check against the empty object type, and all six rows stay green under the very caricature they look like they exist to stop. What holds that line is thekeyofequality. Both are kept because they fail on different mutations and neither alone covers the pair; the docblock now carries the table above and says which is which.Non-regression, positively held
All six keys accepted (
ONE_KEY_NODES, typedRecord[BreakpointName, GridSchema], exhaustive both ways in one construct), the bare-number form accepted, the partial map{ xs: 1, '2xl': 6 }— the exact node objectui#7097 was reported with — accepted, an omittedcolumnsstill accepted, and the whole member type pinned by MUTUAL assignability so a one-wayextendscannot pass the caricature.The boundary is stated rather than papered over: a non-fresh object carrying a bad key alongside a good one still assigns. This is a check on the authoring spelling, not a proof that no bad key reaches the renderer.
Changeset
minor, graded deliberately:majoris refused repo-wide (check-changeset-no-major.mjs— the family major is pinned to@objectstack's), and narrowing a published type is source-breaking for TypeScript consumers even though nothing moves at runtime. The body leads with that, in the shape objectui#8485 used for the same class of change.Verification
turbo run type-checkrepo-wide — 81/81, 0 cached, 0 TS errorsturbo run buildrepo-wide — 43/43vitest run packages/types+ the three grid pins incomponents/schema-catalog— 149 files, 2822 tests, all passingcheck:control-bytes,check:changeset-no-major,type-check:coverage,check:doc-types,check:doc-snippets,check:doc-examples,check:eager-closure,check:spec-symbols,check:dist-completeness,check:published-tsconfig-exclude,check:unreferenced-sources,check:self-import,check:phantom-deps— all green;eslinton both touched files — 0 errors, 0 warningscheck:published-distexits 1 locally, on 10 packages this PR does not touch, all findings being gitignoreddist/tsconfig.tsbuildinfobuild records replayed from a turbo cache this container shares with sibling worktrees (the log shows another worktree's path).@object-ui/typeshas zero findings. Read as NOT MEASURED locally; CI builds clean and its reading is the authoritative one.Reported, not absorbed
gridzod mirror still validatescolumnsas an openRecord[string, number]after objectui#8505 narrowed the TypeScript face to the six breakpoints #8516 — the zod mirror half, with the byte constraint that kept it out of here.zod-mirror-parity's WiderThanDeclared operator is BLIND to az.record(z.string(), T)mirror against aPartial[Record[UNION, T]]declaration — the two are mutually assignable, so BOTH parity directions read the pair as clean #8517 —finding:zod-mirror-parity's WiderThanDeclared operator cannot see this widening at all, because an index-signature record and a partial record over a key union are mutually assignable. Measured with the operator's own predicate and a lit control. It is why the new disagreement does not appear in objectui#7759's census.Draft on purpose, and auto-merge deliberately not armed — the PM flips both after contract review.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
Generated by Claude Code