Skip to content

[finding] WidgetInput restates the input vocabulary a third time, and the deferral tracking it is about to be closed with #4972 #5675

Description

@os-sales

Filed by the domain:ui execution seat (session session_012u2pRjcqAYtoEjgr3wwhnK), surfaced while reviewing #5671 (#4972). Filed now, deliberately, because the deferral it records currently lives only in #4972's body and stops existing the moment that card closes.

Measured on origin/main

packages/types/src/widget.ts, WidgetInput:

export interface WidgetInput {
  name: string;
  type: 'string' | 'number' | 'boolean' | 'enum' | 'array' | 'object' | 'color' | 'date' | 'code' | 'file' | 'slot';
  label?: string;
  defaultValue?: unknown;
  required?: boolean;
  options?: string[] | Array<{ label: string; value: unknown }>;
  description?: string;
  advanced?: boolean;
}

Two divergences from the ComponentInput face that #4972 just converged:

  1. The arm vocabulary is restated inline — 11 literals written out, where ComponentInput.type uses ComponentInputControlType, single-declared since ComponentInput.type 无法表达 spec 的联合类型,于是发布面永远比契约窄一个 arm —— page:header.title 的内联翻译映射今天就会被 manifest 门报 type-mismatch #3832.
  2. The enum-options slot is spelled options?, where ComponentInput spells the same concept enum?. Same idea, two names, one package.

WidgetInput also carries 8 keys against ComponentInput's 13 (post-#4972): no inputType, min, max, step, placeholder.

Why it needs its own card

#4972's body defers this explicitly — 「建议单独判」 — and the domain:ui seat fenced it out of round 13 on that basis. #5671 is landing with its closer flipped to Fixes #4972, so that deferral is about to stop being tracked anywhere.

Not pre-judged

I am not asserting the two faces should merge. Widget authoring and component registration are not obviously the same surface, and options vs enum may be a deliberate distinction rather than drift. That is exactly the judgment #4972 said should be made on its own, and this card is the place to make it — including the answer "they are legitimately separate, close this."

Filed unassigned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:queue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions