Repository navigation
docs(spec): state the one resolution order for a navigation entry's label - #20875
Conversation
…abel BaseNavItemSchema.label's JSDoc and describe now name the id-keyed bundle step translateApp runs at the /meta boundary, the inline locale map, the authored text and render-time inheritance, in that order, and say a present label is never replaced by its target's label nor translated by matching its text. A new pin holds translateApp to the id key. Claude-Session: https://claude.ai/code/session_01Sfe5YjBLwB9J3y8fvm2xq1 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sfe5YjBLwB9J3y8fvm2xq1 Co-authored-by: Claude <noreply@anthropic.com>
Generated by `pnpm --filter @objectstack/spec gen:docs`; no hand edits. Claude-Session: https://claude.ai/code/session_01Sfe5YjBLwB9J3y8fvm2xq1 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 137 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 4ff76ae622039070e1f2ba4c71339911d81fd362 && git checkout 4ff76ae622039070e1f2ba4c71339911d81fd362
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 793fb8390e360e018870333ec8ee1b4160f93007 f2fe3da47d36c72e684b34de98a7b96f89277304 && git checkout -B drift-repro 793fb8390e360e018870333ec8ee1b4160f93007 && git merge --no-ff f2fe3da47d36c72e684b34de98a7b96f89277304
node scripts/docs-audit/affected-docs.mjs --json 793fb8390e360e018870333ec8ee1b4160f93007 |
Contract reviewServed-tier: Inputs read: card #20849 (body, claim ① Derived judgmentsAccept set and public surface — unchanged, right. The only schema-adjacent edit is the JSDoc and the The describe, sentence by sentence (852 characters; AI-facing). Each is tested against the tree and given the moment it is true.
Length and precision as AI-facing text: long, but every clause carries a rule an author acts on — the three-step order, the two prohibitions, the The JSDoc. Same sentences, plus two of its own: "the one place this step runs" — true now: The changeset text. "read literally, forbids the id-keyed localization The PR body. The order paragraph: as the describe. "3 tests, green at The pin, statically. The app fixture has only ② Semver level
③ Boundary flagsDev flags, from the
Nothing in the diff breaches the claim's file surface: Check-runs on the head, deduped by name keeping the newest Implemented-by: VERDICT: PASS Adopted and posted by
Generated by Claude Code |
Closes #20849
Clause-②: no (description text and a pin; the key stays
I18nLabelSchema, optional, and no accept set moves)BaseNavItemSchema.label's JSDoc and describe now state one resolution order. First comes the id-keyed bundle entry thattranslateAppapplies at/meta, over the app'snavigationtree (notareas). Else a present label as authored: its inline locale map's value for the locale, else its text. Else, when the label is absent, render-time inheritance from the target. A present label is never replaced by its target's label and never translated by matching its text.packages/spec/src/system/i18n-resolver.nav-label-identity.test.ts, 3 tests, green atcefd0de416.translateAppalso translate by text, in two variants. (A) takes the target's translation when the label equals the target name. (B) takes a nav key spelled like the text. In both, the no-id-key case went red and the id-key case stayed green. Restore was proven: blob1e7995c1148dequals HEAD andgit diff HEADis empty.content/docs/references/ui/app.mdx, viagen:docs(45 table rows). No other tracked artifact carries this describe. The metadata-forms bundles are registry-driven, not describe-driven.f2fe3da47d:test: 579 files, 17069 tests passed.typecheck: green, and the test program lists the new file.check:generated: all 15 artifacts up to date.check:dual-build-cjs-loadsandcheck:type-check-debt, whose prerequisite is a full workspace build.Acceptance notes
846cec0efestill translates a present label that equals its target's name (isCustomized). It also does not resolve an inline locale map on a nav entry, becauseresolveLabelreads only the keyed form. The renderer half is objectui#11201's.translateAppnever walksareas[].navigation, so the describe scopes the bundle step tonavigation. The translation-reference lint still accepts area entry ids as keys.translateAppalso applies an id key to an entry whose label is absent. That is why the bundle step is listed first.Generated by Claude Code