fix(spec): page type is the page kind, not a visualization (ADR-0047)#1832
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
In the page editor the
typedropdown listed 16 values, but most were misleading or dead:list(interface) page, configured viainterfaceConfig.appearance.allowedVisualizationsand switched at runtime. The renderer never branched on them as page types (it always read the visualization frominterfaceConfig), so selecting page type "kanban" did nothing — the exact confusion users hit.Only
record / home / app / utility / listactually render distinctly today.What
page.zod.ts— remove grid/kanban/calendar/gallery/timeline fromPageTypeSchema.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 thetypefield explicit, labelledoptionsfor 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
typeanswers 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
PageTypeSchemarejects grid/kanban/calendar/gallery/timeline; accepts list/record/home/app/utility + roadmap kinds (asserted in tests).pageFormserves exactly the 5 labelled options to the dropdown (verified againstdist).pageType?: stringand only branches on home/app/utility/record — unaffected by the narrowed union. No other framework package importsPageType.pnpm --filter @objectstack/spec test→ 6543 passed;tsc --noEmitclean.🤖 Generated with Claude Code