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

fix(types): key GridSchema.columns by the breakpoint vocabulary, not string - #8519

Merged
os-justin merged 1 commit into
mainfrom
claude/issue-8505-gridschema-columns-breakpoint-narrowing
Sep 8, 2026
Merged

os-justin merged 1 commit into
mainfrom
claude/issue-8505-gridschema-columns-breakpoint-narrowing

Conversation

@os-justin

Copy link
Copy Markdown
Collaborator

Fixes #8505

⚠️ Notation. Generic type arguments are written with SQUARE brackets throughout — 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 from number | Record[string, number] 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. Plus one pin file and a changeset. Three files, no other edit.

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. Only the type still said "any string", so { xxl: 6 } compiled, passed zod, emitted no class and rendered at the xs count 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.ts keeps z.record(z.string(), z.number()), so os-ui validate still admits { xxl: 6 } from JSON.

That is a byte measurement, not a preference. The console framework chunk is packages/(core|react|types) and check-eager-closure-budget.mjs ceilings 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 turn Bundle Analysis red, making its own remedy a byte-hunt through two other packages. This change emits nothing — packages/types/dist/layout.js is export {}; — 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: true reading 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-check repo-wide, cache forced off: 81 tasks successful, 0 TS errors, no call site edited. pnpm type-check:coverage reports 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/types runs three programs. tsc --noEmit (source) compiles src/layout.ts and excludes __tests__ by directory; tsc -p tsconfig.test.json (test) compiles both. Verified with --listFiles rather than assumed, per the objectui#8342 note on the card:

program src/layout.ts the new pin
tsc --noEmit present absent
tsc -p tsconfig.test.json present present

The test program contains zero files from packages/types/dist, so the pin reads the declaration as source and no stale .d.ts can 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 HEAD empty AND git hash-object equal to git rev-parse HEAD:PATH), trap on EXIT INT TERM, absolute paths, mutation proven on disk by a before/after count on both the removed and the injected text.

member mutated to tsc what caught it
number | Record[string, number] (the bug restored) 7 errors 5 @ts-expect-error go TS2578 "unused" + both Eq assertions
number | Record[never, number] (reject everything) 6 errors _keyedByVocabulary + the 5 TS2578
Partial[Record[BreakpointName, number]] (bare-number arm dropped) 4 errors _columnsShape, the bare-number row, and 2 independent reds in the sibling zod-mirror-parity pin
number | Partial[Record['xs', number]] (reject 5 of 6) 9 errors 5 ONE_KEY_NODES rows, one per lost breakpoint, + both Eqs + 2 positive rows

⚠️ One thing I asserted and the measurement refuted, corrected in the file rather than left standing. I first wrote that ONE_KEY_NODES — the six-row Record[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 the keyof equality. 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, typed Record[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 omitted columns still accepted, and the whole member type pinned by MUTUAL assignability so a one-way extends cannot 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: major is 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-check repo-wide — 81/81, 0 cached, 0 TS errors
  • turbo run build repo-wide — 43/43
  • vitest run packages/types + the three grid pins in components / schema-catalog — 149 files, 2822 tests, all passing
  • gates: check: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; eslint on both touched files — 0 errors, 0 warnings
  • ⚠️ check:published-dist exits 1 locally, on 10 packages this PR does not touch, all findings being gitignored dist/tsconfig.tsbuildinfo build records replayed from a turbo cache this container shares with sibling worktrees (the log shows another worktree's path). @object-ui/types has zero findings. Read as NOT MEASURED locally; CI builds clean and its reading is the authoritative one.

Reported, not absorbed

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

…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
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3473.9 KB 3512.7 KB
Main entry chunk (gzip) 143.9 KB 350 KB
Entry file index-CAY86W1K.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) 498.87KB 114.10KB
core (index.js) 7.48KB 2.96KB
create-plugin (index.js) 10.12KB 3.28KB
data-objectstack (index.js) 191.36KB 53.16KB
fields (index.js) 243.24KB 61.42KB
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) 11.71KB 4.29KB
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) 5.12KB 1.74KB
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.52KB 46.34KB
plugin-dashboard (index.js) 131.48KB 34.45KB
plugin-designer (index.js) 213.21KB 43.63KB
plugin-detail (index.js) 248.73KB 63.97KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 131.01KB 32.32KB
plugin-gantt (index.js) 167.16KB 40.99KB
plugin-grid (index.js) 208.37KB 56.63KB
plugin-kanban (index.js) 55.40KB 15.71KB
plugin-list (index.js) 112.74KB 27.70KB
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.33KB 3.25KB
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 (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-justin
os-justin marked this pull request as ready for review September 8, 2026 05:12
@os-justin
os-justin enabled auto-merge September 8, 2026 05:12
@os-justin
os-justin added this pull request to the merge queue Sep 8, 2026
Merged via the queue into main with commit 512c84b Sep 8, 2026
34 checks passed
@os-justin
os-justin deleted the claude/issue-8505-gridschema-columns-breakpoint-narrowing branch September 8, 2026 05:42
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>
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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GridSchema.columns is typed Record&lt;string, number&gt; — the last copy of the declared-but-not-read bug objectui#7097 fixed at the value level

1 participant