Skip to content

fix(spec): page type is the page kind, not a visualization (ADR-0047)#1832

Merged
xuyushun441-sys merged 1 commit into
mainfrom
chore/page-type-honest-enum
Jun 14, 2026
Merged

fix(spec): page type is the page kind, not a visualization (ADR-0047)#1832
xuyushun441-sys merged 1 commit into
mainfrom
chore/page-type-honest-enum

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

Why

In the page editor the type dropdown listed 16 values, but most were misleading or dead:

  • grid / kanban / calendar / gallery / timeline — these are visualizations of a list (interface) page, configured via interfaceConfig.appearance.allowedVisualizations and switched at runtime. The renderer never branched on them as page types (it always read the visualization from interfaceConfig), so selecting page type "kanban" did nothing — the exact confusion users hit.
  • dashboard / form / record_detail / record_review / overview / blank — declared for roadmap parity but have no dedicated renderer yet; they silently fall back to the list renderer. Offering them in the dropdown presents dead options.

Only record / home / app / utility / list actually render distinctly today.

What

  • page.zod.ts — remove grid/kanban/calendar/gallery/timeline from PageTypeSchema. VisualizationTypeSchema (the real home for those values) is unchanged. Roadmap kinds stay valid in the schema. Expanded the doc comment to state the page-kind-vs-visualization rule.
  • page.form.ts — give the type field explicit, labelled options for the 5 implemented kinds, so the authoring dropdown only offers what renders. Clearer helpText.
  • page.test.ts — update fixtures that asserted the old behavior; add a test asserting visualizations are rejected as page types.

Design note

Page type answers what kind of page (platform page vs interface page, which interface kind). How a list page looks (grid / kanban / calendar / …) is a visualization on the list, not a page type. This matches ADR-0047's two run modes.

Verification

  • PageTypeSchema rejects grid/kanban/calendar/gallery/timeline; accepts list/record/home/app/utility + roadmap kinds (asserted in tests).
  • Built dist pageForm serves exactly the 5 labelled options to the dropdown (verified against dist).
  • objectui consumes a loose pageType?: string and only branches on home/app/utility/record — unaffected by the narrowed union. No other framework package imports PageType.
  • pnpm --filter @objectstack/spec test6543 passed; tsc --noEmit clean.

🤖 Generated with Claude Code

Remove grid/kanban/calendar/gallery/timeline from PageTypeSchema — they are
visualizations of a `list` interface page (interfaceConfig.appearance.
allowedVisualizations), switched at runtime, never distinct page kinds. The
renderer never branched on them as page types, so they only misled authors
(selecting page type "kanban" did nothing). VisualizationTypeSchema is unchanged
and remains the home for those values.

The page authoring form (page.form.ts) now offers only the kinds with a
dedicated renderer — list / record / home / app / utility — via explicit
labelled options, so the dropdown stops presenting dead options. Roadmap kinds
(dashboard/form/record_detail/record_review/overview/blank) remain valid in the
schema but are hidden from the form until they render distinctly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 14, 2026 4:57am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests protocol:ui tooling size/m and removed documentation Improvements or additions to documentation tests protocol:ui tooling labels Jun 14, 2026
@xuyushun441-sys
xuyushun441-sys merged commit 4b01250 into main Jun 14, 2026
12 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the chore/page-type-honest-enum branch June 14, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants