You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(spec)!: reject unknown keys across the app shell and navigation tree (#4165)
Closes the last high-traffic authorable surface in the unknown-key ratchet
(#4001 app step, PR B).
- AppSchema and all sub-schemas .strict(): branding, navigation area,
context selector (incl. optionsSource / filter blocks), nav contribution.
- NavigationItemSchema converted to a union discriminated on `type` — a
single unrecognized_keys issue against the branch the author actually
wrote, at an exact path, instead of an invalid_union aggregate wall.
- Deliberately left open: PageNavItem.params / ComponentNavItem.params /
ActionNavItem.actionDef.params.
- Gate finding #6, in first-party platform metadata: ACCOUNT_APP declared
`defaultOpen` on three nav groups (the key is `expanded`), so they had
been shipping collapsed. Producer fixed contract-first; alias added.
- Docs: apps.mdx claimed eight navigation item types where the schema has
nine, and omitted `separator` — which is .strict() over only
type/id/order, so base props on one are now hard errors.
Refs #4001
Copy file name to clipboardExpand all lines: content/docs/ui/apps.mdx
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ const crmApp = {
57
57
58
58
## Navigation Items
59
59
60
-
The navigation tree supports eight item types, combined to create rich menu structures. The most common are shown below (`object`, `dashboard`, `page`, `url`, `group`); the spec also defines `report`, `action`, and `component` items.
60
+
The navigation tree supports nine item types, combined to create rich menu structures. The most common are shown below (`object`, `dashboard`, `page`, `url`, `group`, `separator`); the spec also defines `report`, `action`, and `component` items.
61
61
62
62
### Object Navigation
63
63
@@ -121,9 +121,23 @@ Groups items into collapsible sections with children:
121
121
}
122
122
```
123
123
124
+
### Separator
125
+
126
+
A visual divider in the navigation list. It renders no target and carries no
127
+
label — the only keys it accepts are `type`, an optional `id`, and an optional
128
+
`order`:
129
+
130
+
```typescript
131
+
{ type: 'separator', order: 30 }
132
+
```
133
+
124
134
### Common Navigation Properties
125
135
126
-
All navigation items share these base properties. Every item **must** declare a unique `id` (lowercase `snake_case`) — it is required by the schema and is referenced by `homePageId` and `mobileNavigation.bottomNavItems`:
136
+
All navigation items **except `separator`** share these base properties. Every
137
+
item **must** declare a unique `id` (lowercase `snake_case`) — it is required by
138
+
the schema and is referenced by `homePageId` and `mobileNavigation.bottomNavItems`.
139
+
(On a `separator`, `id` is optional and the remaining properties below are
140
+
rejected — a divider has nothing to label, gate, or badge.)
|`app.zod.ts`| 11 | authorable |**PR A done (#4001app step): the seven audit-dead keys (`version`/`aria`/`objects`/`apis`/`sharing`/`embed`/`mobileNavigation`) are `retiredKey()` tombstones + an ADR-0087 conversion** — the ADR-0049 precondition for strict. **PR B next**: `AppSchema` + nav union `.strict()`; the union-error question is settled — convert `NavigationItemSchema`to `z.discriminatedUnion('type', …)` (verified: matched-branch-only unknown-key errors, precise recursive paths, `toJSONSchema` clean) |
140
+
|`app.zod.ts`| 11 | authorable |**strict as of #4001 PR B** — `AppSchema` + branding / area / context-selector / contribution, and the nav-item union converted to `z.discriminatedUnion('type', …)` (the union-error question, settled empirically: matched-branch-only errors, exact recursive paths, `toJSONSchema` clean). Per-target `params` stay open. PR A (#4142) tombstoned the seven audit-dead keys first|
0 commit comments