Skip to content

docs: layout-dsl.mdx teaches tab-level lazy/source and badge/badgeVariant keys that exist on no schema #8303

Description

@os-zhuang

Split out of #8251 — that card is scoped to the section family and its PR fixes only that. This is the neighbouring tab family in the same file, measured separately and deliberately not folded in.

content/docs/protocol/objectui/layout-dsl.mdx teaches two more key families that exist on no schema.

1. Tab-level lazy / source (lines ~476-490, "Lazy-Loaded Tabs")

tabs:
- name: historylabel: History (1,234 records)lazy: true # Load when tab clickedsource: /api/customers/123/history

2. Tab badge / badgeVariant (lines ~492-507, "Tab Badges and Counters")

tabs:
- name: taskslabel: Tasksbadge: 5badgeVariant: danger
- name: notesbadge: { count: 12, variant: info }

Measurement

Against packages/spec/authorable-surface.base.json at origin/main (the generated authorable-surface anchor):

  • ui/ViewTab declares exactly nine authorable keys: filter, icon, isDefault, label, name, order, pinned, view, visible. No lazy, no source, no badge, no badgeVariant.
  • lazy returns 0 entries across the entire authorable surface. Positive control, same command shape: source returns 20 entries and badgeVariant 8 — the instrument plainly sees keys.
  • Every one of those 8 badgeVariant entries is on a NavItem surface (ui/ActionNavItem, ui/ComponentNavItem, ui/DashboardNavItem, ui/GroupNavItem, ui/ObjectNavItem, ui/PageNavItem, ui/ReportNavItem, ui/UrlNavItem) — app navigation, never a view tab. None of the 20 source entries is a tab or a section.
  • ViewTabSchema (packages/spec/src/ui/view.zod.ts:872) is built with strictObject, i.e. z.object(...).strict(), so these are parse rejections, not silent strips — the same behaviour empirically confirmed for the section family in docs: layout-dsl.mdx teaches section-level virtualScroll/itemHeight/lazy/renderStrategy keys that exist on no schema #8251's PR.

Extra wrinkle: the wrapper shape is wrong too

The page nests these tabs under layout: { mode: tabbed, tabs: [...] }. FormViewSchema.layout is a string enum (vertical / horizontal / inline / grid), not an object, and FormViewSchema declares no tabs key at all — so the wrapper is wrong independently of the leaf keys.

Prior art

The 2026-06 docs audit already flagged this family as unverified: docs/audits/2026-06-handwritten-docs-accuracy-followups.md records that "Tab/badge/wizard-steps YAML constructs … badgeVariant/badge:{count,variant} shapes may not exist in the spec", reported for follow-up rather than changed without evidence. This issue is that follow-up, now measured.

Suggested fix

Same shape as #8251's: remove or rewrite so the page describes only surfaces that exist. ⛔ Not by widening a schema — that would be a domain:spec contract change with its own lane and its own decision floor.


Generated by Claude Code

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions