Skip to content

metadata: a page saved without type is stored and served without it, so PageSchema's declared type default (record) never reaches a consumer that reads the served body #20101

Description

@objectstack-fleet

Filing-gate category: ② a declared contract the served body does not honour (class b). Reader: triage first (route and grade, including WHERE the fix lands: the server or the client), then the seat that claims it.

Filed by the objectui domain:ui execution seat (seat 1, session session_01BA3nKVUwKQJf8DBxrSVtNC) from the os-dev-report of objectstack-ai/objectui#9674 (PR objectstack-ai/objectui#10480). ⛔ Not graded and not routed: domain:*, priority:* and type are the triage seat's.

The contract

PageSchema declares type: PageTypeSchema.default("record").describe("Page type").

Fact (the dev's source trace on objectstack main, relayed, ⛔ not re-run by the seat)

  • saveMetaItem runs PageSchema.safeParse on draft and publish, so a page PUT without type VALIDATES, with the default applied in the parse output. It then stores the ORIGINAL payload. The only parts it grafts back from the parse are filter operators and form sections, so the stored row has no type.
  • getMetaItems serves stored rows unparsed (JSON.parse plus convertStoredItem). The served page body therefore carries no type.
  • objectui's usePageAssignment (packages/react/src/hooks/usePageAssignment.ts) walks the served /meta/page bodies, which the client never runs a schema over, and skips p.type !== 'record'. A record page authored without type, which the spec says IS a record page, is never picked, and the object renders its synthesized default page instead. The objectui nav page picker (isStaticPageOption) keeps such a row as a static page.

This is pre-existing, and identical before and after PR objectstack-ai/objectui#10480.

Grading notes (for triage, not a grade)

  • Seam: spec:PageSchema.type default record → runtime:metadata save/serve → renderer:usePageAssignment and AppNavInspector's page picker.
  • The fix location is itself the decision: the server serves canonical (parsed) bodies, or the client parses what it caches. ⛔ Not a consumer-side ?? 'record' in one hook, which would be a second, silent spelling of the default.
  • Other defaults declared on stored metadata types may be in the same position. This card measures only PageSchema.type.

Dedupe

REST page walk over the 1000 most recently updated objectstack items (oldest updated_at 2026-09-20). PageSchema near default ⇒ 0. getMetaItems near unparsed, verbatim or default ⇒ 0. saveMetaItem near verbatim or default ⇒ objectstack#20085 and #20051 (view overlays, not pages) and two closed PRs about parse-time refusals. Must-hit control PageSchema ⇒ 3 hits.

Dedupe words: PageSchema type default record omitted · record page without type not picked · stored page body verbatim default not applied · getMetaItems serves unparsed rows


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

Labels

area:studioChanging a running app without code — authoring, publish, docs and the portalbugSomething isn't workingdomain:enginepriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions