Skip to content

finding(examples,docs): the four alert-dialog schema-catalog fixtures author an actions array no surface carries — the docs page's own examples render an empty footer #7693

Description

@claude

Found while implementing objectui#7104 (declaring the keys the alert-dialog renderer reads). Filed rather than folded in: the fixtures live under examples/schema-catalog/, outside that card's four-file fence, and the conversion is not mechanical (see below).

Measured on origin/main a3eb5d07a.

The measurement

All four fixtures under examples/schema-catalog/src/schemas/components-overlay-alert-dialog/basic-alert-dialog.json, confirmation-dialog.json, custom-actions.json, destructive-action.json — author their buttons as an actions array of button nodes, e.g. destructive-action.json:

{
  "type": "alert-dialog",
  "title": "Confirm Deletion",
  "description": "This will permanently delete your account and all associated data.",
  "trigger": { "type": "button", "label": "Delete", "variant": "destructive" },
  "actions": [
    { "type": "button", "label": "Cancel" },
    { "type": "button", "label": "Delete", "variant": "destructive" }
  ]
}

actions is carried by no surface: it is not on the TS interface, not in the zod mirror, and schema.actions appears nowhere in packages/components/src/renderers/overlay/alert-dialog.tsx (pinned by packages/types/src/__tests__/overlay-node-slot-doc-types-7082.test.ts). The renderer draws its footer from two other keys only: line 37 renders the cancel button only when schema.cancelText is truthy, and line 38 renders the action button only when schema.actionText is truthy (wiring schema.onAction as its click handler).

So every one of the four examples embedded on content/docs/components/overlay/alert-dialog.mdx through SchemaExample renders a dialog with a header and an EMPTY footer — no cancel button, no confirm button. custom-actions.json is embedded under a heading literally called "With Custom Actions".

Lit controls (same git grep, tracked files, node_modules/dist excluded): cancelText / actionText have three in-repo producers on an alert-dialog node — the renderer's registered inputs (alert-dialog.tsx:49-50), its defaultProps (:67-68), and packages/app-shell/src/__tests__/widget-dom-leak-sweep.test.tsx:719; actions on an alert-dialog node has exactly these four producers, all in the catalog; cancelLabel / confirmLabel / confirmVariant have zero producers on any alert-dialog node.

Why it is not a drive-by conversion

Rewriting the fixtures to cancelText / actionText is lossy. Two of the four give the confirm button variant: "destructive" (basic-alert-dialog, destructive-action) and one gives the cancel button variant: "ghost" (confirmation-dialog). The read dialect has no spelling for a button variant: AlertDialogAction renders buttonVariants() at its default and the renderer passes nothing else. AlertDialogSchema.confirmVariant exists on the declared face but nothing reads it (objectui#7104's inert-key readings), so the conversion needs a decision first — accept the loss of the destructive styling in the examples, or make a variant key live before converting.

Why nothing red covers it

The catalog fixtures parse green — BaseSchema is .passthrough(), so actions rides through unexamined — and no test renders a catalog alert-dialog and counts its footer buttons. check:doc-snippets compiles ts/tsx fences only, and the fixtures are JSON loaded through examples/schema-catalog/src/index.ts.

Refs: objectui#7104 — the declaration half. Its PR corrects the docs page's Schema block to the read dialect and removes the actions row there, but leaves these four fixtures for this card.

Filed by the Claude Code dev seat working objectui#7104, session session_01KbJQ1y1J12nZxYzFWhP8Q3.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repofindingpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions