Repository navigation
Commit c9ea363
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg5TiSxMNEj6hh6mizejX4T6)_
Fixes #39210
All four review items of #39207: N1 per the maintainer's ruling
(decision card, 2026-12-03 14:48Z: refuse an empty list at both doors),
N2, N3 and N4.
Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — `skills/**` does not teach navigation `keywords`
(grep over `skills/` finds no navigation keywords text)
## Why N1 is a narrowing
`@objectstack/spec` 19.0.0-next.4 (the `version packages (next)` cut,
779ff41, on npm since 15:39Z) shipped both keys while this PR was open,
and it accepts `keywords: []`. Refusing it now narrows a released shape,
so N1 carries its own BREAKING changeset and an ADR-0087 ledger entry.
The two consumed notes under `.changeset/pre/` are left as main has
them.
## What changes
- **N1 (ruled, narrowing).** A navigation `keywords` list is never
empty: `.min(1)` with a message that says to leave the key out, on the
nav item's `navKeywordsSchema` (`packages/spec/src/ui/app.zod.ts`) and
on the translation node's `keywords`
(`packages/spec/src/system/translation.zod.ts`). Describes read "at
least 1, at most 20". The `@object-ui/types` mirror follows
(`ui/packages/types/src/zod/app.zod.ts`). `[]` joins `REFUSED_KEYWORDS`
in `app-nav-keywords.test.ts`, which holds both doors to the same
verdicts. `content/docs/references/ui/app.mdx` is regenerated.
`requiredOneOf` is untouched, and `.min(1)` projects as `minItems`. No
writer emits `[]`: the nav editor omits the key, and `mergeNavKeywords`
answers `undefined`.
- Changeset `.changeset/39210-nav-keywords-never-empty.md`
(`@objectstack/spec` minor, `@object-ui/types` patch), BREAKING, with
`adr-0087: registered nav-keywords-empty-list-refused`.
- Ledger entry
`packages/spec/src/migrations/entries/semantic/19.nav-keywords-empty-list-refused.ts`,
relevance `stack-declares ['apps', 'translations']`, pinned in
`semantic-relevance.test.ts` and
`semantic-relevance-coverage-38929.test.ts`.
- **N2.** The `translation-contributed-nav-bundle.test.ts` header now
describes the current control: a node with neither `label` nor
`keywords` is refused at the schema. It used to say a node "still owes
its own `label`, at both layers".
- **N3.** The new spec changeset names the two other faces that took the
19.0.0-next.4 widening and take this narrowing:
`PlatformTranslationData` and `ServedTranslationData` (the body of `GET
/i18n/translations/:locale`).
- **N4 (defect, user-reachable).**
`ui/packages/app-shell/src/layout/designModeMenuSave.ts`
`writeMenuTranslation`: clearing an entry's translated label used to
delete the whole navigation translation node, and this locale's
`keywords` went with it. A cleared label now drops `label` only, and the
node stays when it still has keywords. A node left with no keywords is
deleted as before. Changeset
`.changeset/39210-menu-clear-label-keeps-keywords.md`
(`@object-ui/app-shell` patch).
## Tests
- New
`ui/packages/app-shell/src/layout/__tests__/designModeMenuSave-39210.test.ts`:
a node with keywords loses only its label. CONTROLs: a label-only node
(deleted), an empty keywords list (deleted), a set label (keywords
kept).
- ui vitest on designModeMenuSave-39210, designModeMenuSave-36538,
designModeMenuSave-36363 and DesignModeMenu-36363: 4 files, 130 tests
passed. `@object-ui/types` vitest: 391 files, 10528 tests passed.
- `@objectstack/spec` full vitest after N1, before the main merge: 1025
files passed (1 skipped), 30962 tests passed. After the merge:
`src/migrations` 6 files, 255 passed.
- `check-adr-0087-registration`: 1 declared-breaking changeset,
registered, new here.
- `@object-ui/app-shell` type-check clean. eslint clean on the touched
app-shell files.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Utp6CXktGqE1JUHFoagYGj)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent fb4735d commit c9ea363
13 files changed
Lines changed: 218 additions & 62 deletions
File tree
- .changeset
- content/docs/references/ui
- packages/spec/src
- migrations
- entries/semantic
- system
- ui
- ui/packages
- app-shell/src/layout
- __tests__
- types/src/zod
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 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 | + | |
| 19 | + | |
Large diffs are not rendered by default.
| 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 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
| 373 | + | |
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
| 421 | + | |
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1391 | 1391 | | |
1392 | 1392 | | |
1393 | 1393 | | |
1394 | | - | |
| 1394 | + | |
1395 | 1395 | | |
1396 | 1396 | | |
1397 | 1397 | | |
| |||
1413 | 1413 | | |
1414 | 1414 | | |
1415 | 1415 | | |
1416 | | - | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
1417 | 1420 | | |
1418 | 1421 | | |
1419 | 1422 | | |
1420 | | - | |
| 1423 | + | |
1421 | 1424 | | |
1422 | 1425 | | |
1423 | 1426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
212 | 215 | | |
213 | 216 | | |
214 | 217 | | |
215 | | - | |
| 218 | + | |
216 | 219 | | |
217 | 220 | | |
218 | 221 | | |
| |||
434 | 437 | | |
435 | 438 | | |
436 | 439 | | |
437 | | - | |
| 440 | + | |
438 | 441 | | |
439 | 442 | | |
440 | 443 | | |
| |||
0 commit comments