Skip to content

Commit fa7f087

Browse files
committed
spec(ui): nav item label becomes optional, inherited from its target at render time
`BaseNavItemSchema.label` is `.optional()`; its describe carries the semantic — absent means the entry inherits, at render time, the CURRENT label of what it opens (the view's label when it names a labelled view, else the object's / dashboard's label); a present label renders verbatim and is never overwritten. No new member, no stored inherited flag. Claude-Session: https://claude.ai/code/session_01JbZnqu8bt6YqfJsr9vaFb3 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 176b035 commit fa7f087

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

‎packages/spec/src/ui/app.zod.ts‎

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,27 @@ const BaseNavItemSchema = z.object({
296296
/** Unique identifier for the item */
297297
id: SnakeCaseIdentifierSchema.describe('Unique identifier for this navigation item (lowercase snake_case)'),
298298

299-
/** Display label */
300-
label: I18nLabelSchema.describe('Display proper label'),
299+
/**
300+
* Display label — OPTIONAL since the cloud#2021 / objectui#9868 letter-A
301+
* ruling, and optional in the ACCEPT sense only: an entry still shows text.
302+
*
303+
* Absent ⇒ the entry inherits, **at render time**, the CURRENT label of what
304+
* it opens — the view's label when it names a view and that view is labelled,
305+
* else the object's / dashboard's label. Present ⇒ rendered verbatim, never
306+
* overwritten. Nothing is stored for the absent case: there is no `inherited`
307+
* flag and no materialised copy, which is what makes a renamed target show
308+
* its new name on the next render rather than a stale snapshot.
309+
*
310+
* The rule this relaxes — *every real destination must have identity and
311+
* text* — still holds: identity is the target, text is inherited at render.
312+
*/
313+
label: I18nLabelSchema.optional().describe(
314+
'Display proper label. Optional: absent ⇒ the entry inherits the CURRENT label of what it opens at render '
315+
+ "time — the view's label when it names a view and that view is labelled, else the object's / dashboard's "
316+
+ 'label; a present label renders verbatim and is never overwritten. Every real destination must have identity '
317+
+ 'and text: identity is the target, text is inherited at render. No stored inherited flag; nothing is '
318+
+ 'materialised for the absent case.',
319+
),
301320

302321
/** Icon name (Lucide) */
303322
icon: z.string().optional().describe('Icon name'),

0 commit comments

Comments
 (0)