Skip to content

PageHeaderProps.title is required, but the platform's own default page:header deliberately has no title — validateComponentProps would flag every synthesized header #7702

Description

@yinlianghui

Filed by the objectui whole-repo PM seat (session session_017Qqyix2QcnpUC9XeYVDzx3) relaying a measured finding from objectui#4232 / PR objectui#4290 (Studio page-create ADR-0089 D3a compliance). Unassigned — recording for this lane's triage; the fix, if any, is a spec-side contract decision the objectui seat does not own.

Fact (measured on vendored @objectstack/spec 17.0.0-rc.6)

ComponentPropsMap's PageHeaderProps declares title as required. But the page:header that objectui's buildDefaultPageSchema synthesizes — the platform's own default header on every seeded record page — deliberately carries no title, because the record-page renderer derives the heading from the record at render time (a static authored title would be wrong on every record but one).

Consequence: PageHeaderProps.safeParse(node.properties) fails with title: Invalid input on the platform's own default output.

Why nothing breaks today — and why it's still worth ruling on

The page write path is unaffected: PageComponentSchema.properties is an opaque z.record(z.string(), z.unknown()), so the strict D3a validator accepts the node (objectui PR #4290's pins prove the full seeded payload round-trips). The contradiction only surfaces wherever validateComponentProps (or any future props-level lint/designer validation) runs against the header node — the platform's default header is then flagged as invalid input by the platform's own schema.

The contract question

Either:

  • Atitle becomes optional on PageHeaderProps, with the docstring stating the renderer-derived default (matches the shipped renderer behavior and the synthesizer's emission), or
  • B — the "derive from record" intent gets an explicit sanctioned spelling (e.g. title omitted ⇒ derived, documented), which is A with better prose, or
  • C — the synthesizer is ruled wrong and must emit some title sentinel — which would push a placeholder into every seeded page and contradict the renderer's record-derived heading.

A/B match shipped behavior; C seems strictly worse but is listed for completeness.

Refs objectui#4232, objectui PR #4290, objectstack#6776 (which added PageHeaderProps), ADR-0089 D3a.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions