fix(types): describe ClassNameStylePropsSchema by its two keys - #7730
Merged
Conversation
`.describe()` on this package is published runtime metadata — it lands in the generated JSON-Schema `description` and in the derived docs — so it is the only label the reader who never sees the const name gets. objectui#5928 renamed the const off `StyleProps` because the like-named TS `StyleProps` is the Tailwind-scale vocabulary (`padding`, `margin`, `gap`, ...) and shares zero keys with these two. That rename reached source readers only: the description went on saying what the retired name said, leaving a reader who meets the schema through generated JSON-Schema hunting `padding` or `gap` under a label that promised them. The string now names the two keys verbatim. The object is untouched — same two optional keys, same accept set, same export name; nothing validates differently. Pinned in `classname-style-describe-7578.test.ts`, read off the live schema exported by the published `@object-ui/types/zod` barrel, with the key set and a neighbouring schema's own description as controls. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAZFhALsQsGqxui8sNqM8s
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 5, 2026 12:58
This was referenced Sep 5, 2026
This was referenced Sep 5, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #7578
What
ClassNameStylePropsSchema(packages/types/src/zod/base.zod.ts) now describes itself by the two keys it actually holds..describe('Style properties').describe('className and inline style')Nothing else moved: same two optional keys (
className,style), same accept set, same types, same export name, no other.describe()in the file touched. The card's four triage boundaries are honoured verbatim.Why this is a surface change and not copy polish
On this package
.describe()is published runtime metadata — it lands in the generated JSON-Schemadescriptionand in the derived docs — so it is the only label the reader who never sees the const name gets. objectui#5928 renamed the const offStylePropsbecause the like-named TypeScriptStylePropsis the Tailwind-scale vocabulary (padding,margin,gap,backgroundColor, and the rest) and shares ZERO keys with these two. That rename reached source readers only; the description went on saying what the retired name said, leaving a reader who meets the schema through generated JSON-Schema huntingpaddingorgapunder a label that promised them. Hence a changeset (@object-ui/types: patch), which states what a consumer of the emitted JSON-Schema will see change.Label choice — one declared deviation
The card and triage proposed
Class name and inline styleand required a label that NAMES the two keys, banning another generic word. Landed text isclassName and inline style: identical in meaning, but with the VERBATIM key spellings, so the label answers "what is in here" with names the reader can act on and the pin below asserts key containment literally rather than through a normalized match. Both are within the card's candidate; the substitution is declared here rather than taken silently.Measurement (triage boundary 2)
git grep 'Style properties'over the whole tree atb74a859: exactly ONE occurrence, the const itself. No snapshot, fixture or test pinned it; the repo checks in no generated JSON-Schema artefact for this package (no file matching a schema-dot-json name pattern exists anywhere in the tree), so nothing else had to move in this PR.Pin
packages/types/src/__tests__/classname-style-describe-7578.test.ts, reading the description off the LIVE schema exported by the published@object-ui/types/zodbarrel rather than off the source text — a.describe()that stops reaching the schema leaves the source line looking right while the emitted JSON-Schema carries nothing.Three legs on the description (equals the literal · names both keys verbatim · no longer carries the retired wording) plus two controls: the key set is unchanged, and a neighbouring schema in the same file (
HTMLAttributesSchema) still carries its own description, so an edit that swept every.describe()inbase.zod.tsreddens here instead of passing as "the string changed".Ablation (fix committed first, trap-guarded, absolute paths)
Reverting only
base.zod.tstob74a859and re-running the pin:The mutation reaches the test directly because the pin imports the barrel by a source-relative path, so no rebuild step sits between the edit and the run.
Gates — exit codes captured before any pipe, at
0d6bfefdpnpm --filter @object-ui/types buildpnpm --filter @object-ui/types type-checkpnpm exec vitest run --maxWorkers=2 packages/types/node scripts/check-changeset-presence.mjsnode scripts/check-changeset-fixed.mjsnode scripts/check-changeset-no-major.mjsnode scripts/check-control-bytes.mjsnode scripts/check-spec-symbol-derivation.mjspnpm exec eslinton the two changed source filesno-explicit-anywarning atbase.zod.ts:52, untouched region)Build, type-check and the package test run went through the container's shared verify lock (
VERDICT command-exit 0).Governed-surface predicate on the final file list: 0 of 3 paths hit the register — not governed.
Merged
origin/mainbefore opening (b74a859, unchanged; PR #7726 for objectui#7530 edits a different region of the same file and has not landed yet).Generated by Claude Code