Skip to content

Studio block designer publishes three page-component inputs no renderer reads (objectui, found by #4001 batch A) #7973

Description

@os-zhuang

Filed from #4001 batch A (ui/component.zod.ts strictness conversion) under AGENTS.md Prime Directive #10 — out of that PR's scope, and the fix lives in the sibling repo objectstack-ai/objectui.

Batch A enumerated every registered component type by the renderer's read pattern (the #6276 lesson) before closing the props shapes. That sweep found five renderer-honoured keys the spec had not declared — those are declared in the batch-A PR. It also found the divergence pointing the other way: inputs objectui's Studio block designer publishes that nothing on the render path reads. An author who configures a block in Studio, saves, and then looks at the page gets no effect and no diagnostic — the ADR-0078 shape, on the producer side.

Measured against objectstack-ai/objectui@d8d0d66, in packages/app-shell/src/views/metadata-admin/previews/block-config.ts:

Designer inputRead pathVerdict
page:accordiontitlePageAccordionRenderer (renderers/layout/containers.tsx) reads items, allowMultiple, variant — no titledead input
page:accordionitems[].valuethe renderer overwrites it: items.map((it, idx) => ({ ...it, value: \panel-${idx}` })) (containers.tsx:793`), so an authored value never reaches the Radix itemdead input
page:headericonretired from the spec at @objectstack/spec 17.0.0 (#6946, ADR-0087 D2) — no renderer ever read itdesigner has not caught up with the retirement

Two notes that matter for whoever picks this up:

  1. The accordion value case is not symmetric with page:tabs. One component over, an authored items[].valueis read (containers.tsx:566, with a tab-<idx> fallback), which is why the spec declares it there and showcase 的 project-detail 页在 page:tabs 上授权 items[].key,renderer 读的是 items[].value —— 两个 tab 的稳定 URL token 从未生效 #5776 exists for the keyvalue rewrite. The accordion's is genuinely derived. Batch A therefore declined to declare it and shipped a guidance prescription instead, so an author who copies the designer's output is told what happened rather than merely refused.
  2. page:header.icon will now be refused, not dropped. Batch A closed these shapes, so a designer-authored icon raises the [spec] Retire three zero-reader UI keys per maintainer ruling: PageHeaderProps.icon, PageCardProps.actions, RecordDetailsProps.layout (objectui#3829 / objectui#3818) #6946 tombstone (with its os migrate meta --from 16 prescription) at the authoring gate instead of being stripped in silence. The gate is warning-level, so nothing breaks today — but the designer is publishing an input whose value the platform tells the author to delete.

Suggested fix, objectui side: drop the three inputs from block-config.ts (page:accordion.title, page:accordion.items[].value, page:header.icon). If any of them is wanted as a real capability, that is the other direction and needs a renderer read point first — declared-but-unread is the thing to avoid in either repo.

Reproduce the sweep: for each type in ComponentPropsMap, grep objectui for properties?.<key> / hoisted schema?.<key> reads and diff against the declared shape. It is cheap and it is what turned both directions up.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions