Repository navigation
Commit 660a9b2
fix(spec): BlueprintNavItemSchema.label says an absent label is inherited at render time, not defaulted (#20851)
Fixes #20841
Clause-②: no
## What changed
`BlueprintNavItemSchema.label`'s describe
(`packages/spec/src/ai/solution-blueprint.zod.ts:189`) read "Nav entry
label (defaults to the target label/name)". It now reads:
> Nav entry label. Optional: absent ⇒ the entry inherits the CURRENT
label of what it opens at render time (a renamed target shows its new
name); present ⇒ rendered verbatim, so never copy the target's label in
as a default.
- The key is untouched: `z.string().optional()`. No schema, export or
type change; the schema accepts and refuses the same blueprints.
- Regenerated from the describe:
`content/docs/references/ai/solution-blueprint.mdx` (the same row
renders twice on that page). `check:generated` named only `check:docs`
as stale; the JSON-schema tree is gitignored
(`packages/spec/json-schema/`), so there is no tracked JSON copy to
regenerate.
- One `patch` changeset:
`.changeset/20841-blueprint-nav-label-inherits.md`.
## Why restated, not referenced
The runtime field's describe is an inline string literal on the
module-local `BaseNavItemSchema` in `packages/spec/src/ui/app.zod.ts`:
no exported constant to import. Sharing it would mean exporting a new
constant from `app.zod.ts` (the card forbids widening that file) or
reading `.description` off a lazy runtime schema when the blueprint
module loads, which couples the blueprint schema to the UI schema's
internals. Its text also opens with "Display proper label" and spends
most of its length on which view or object label is inherited, which is
not what a blueprint author needs. So the meaning is restated in one
sentence in the runtime field's own terms (absent ⇒ inherits the current
label at render time; present ⇒ verbatim). `app.zod.ts` is not touched.
## Evidence
- Every changed generated hunk is that sentence: both changed rows in
the mdx equal the row prefix `` | **label** | `string` | optional | `` +
the describe string as evaluated out of the `.ts` source + ` |`, byte
for byte (checked by script); the `.ts` diff is that one line. Diffstat:
3 files, +21 / -3.
- `pnpm --filter @objectstack/spec check:generated` reported exactly one
stale artifact (`content/docs/references/**`) after the edit, and exited
0 on the committed tree.
- `pnpm --filter @objectstack/spec test`: 578 files, 17066 tests passed.
`pnpm --filter @objectstack/spec typecheck`: exit 0.
- Derived gates, `dispatch-gates --commands` at head `64e5e460e`,
reconciled with `--ran`: 102 derived, 101 run with exit 0, 1 NOT
MEASURED: `pnpm check:dual-build-cjs-loads` exited 3 (PREREQUISITE NOT
MET: it reads `dist/` of every published package, 83 of them unbuilt
here, and was not run after a full build). The change is a string inside
a `.describe()`, which cannot change whether a `require` entry point
loads; CI owns that gate. Five other gates first exited 3 for unbuilt
lint, client-react and objectql closures; those were built and the five
re-run: all exit 0.
## Acceptance notes
- The design model's generation contract is the strict mirror,
`StrictNavItem.label` in the same file: "Nav entry label, or null". It
never carried the "defaults" wording, so it was not the trap and is not
edited here; it also does not say that null means inherit. Noted, not
filed.
---
_Generated by [Claude
Code](https://claude.ai/code/session_018fxqvRJW12TaHC7DUQ89Y6)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent a94f3ba commit 660a9b2
3 files changed
Lines changed: 21 additions & 3 deletions
File tree
- .changeset
- content/docs/references/ai
- packages/spec/src/ai
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
0 commit comments