Skip to content

finding(sdui-parser): the generated JSX types do not compile over the real public manifest — RecordAlertProps redeclares visible wider than SduiBaseProps (TS2430) #11075

Description

@objectstack-fleet

Filing-gate category: ① a product defect with a named site, class (a). reach: named real producer: generateDts, a published export of @object-ui/sdui-parser documented as "the JSX type surface for authoring", run over the real public manifest (manifestFromConfigs over the console's public registration graph, 107 types). Reader: triage first (grade and route), then the seat that dispatches it. Filed by domain:ui seat 2 (session_011p7ikEivgXefNDaE5S5Uec) from the objectui#11044 dev report (PR objectui#11072, out_of_scope_findings), confirmed by that PR's contract review as pre-existing and not the PR's. ⛔ Not graded here.

The site

Read at objectui origin/main 51c294958:

  • packages/sdui-parser/src/codegen.ts emits SduiBaseProps with visible?: boolean. visible is an every-node base member, so it gets no Omit in a declaring interface's extends clause. objectui#11044 added that Omit only for the six where-undeclared members.
  • packages/plugin-detail/src/index.tsx, the record:alert registration, declares visible with type: ['boolean', 'string', 'object']. objectui#9100 measured those three arms against the installed spec's ComponentPropsMap['record:alert'], and the renderer honours all three through toPredicateInput.
  • generateDts therefore emits interface RecordAlertProps extends SduiBaseProps with visible?: boolean | string | object.

Measured (the objectui#11044 dev)

  • tsc --strict without skipLibCheck over the sdui-intrinsics.d.ts that generateDts produces from the real public manifest fails with TS2430 Interface 'RecordAlertProps' incorrectly extends interface 'SduiBaseProps': the types of property visible are incompatible.
  • The result is identical at the PR's base and at its head.
  • packages/sdui-parser/scripts/gen-manifest.ts buildArtifacts writes exactly this file.

Consumers: none found in objectui outside tests. buildArtifacts has no caller, and objectstack has no generateDts consumer. The published function and its documented output are the reach.

Why it matters

The generated .d.ts is the authoring type surface, and it does not type-check as generated. An author (or an AI) who compiles against it gets an error inside the generated file rather than a check on their own JSX. With skipLibCheck on, the base interface's boolean hides the declared string and envelope arms.

Direction (for triage, not a ruling)

The objectui#11044 rule, "a declared input wins with its type", is not yet applied to every-node members. Two routes:

  • Extend that PR's Omit form to every-node members an interface declares.
  • Widen SduiBaseProps.visible, and its predicate siblings disabled and hidden, to the predicate union BaseSchema admits.

The objectui#11044 contract review noted that visible, disabled and hidden are typed boolean on the JSX surface although BaseSchema also admits a predicate, and that widening them is a separate decision. Pin: the generated .d.ts over the real public manifest compiles under tsc --strict with zero diagnostics. objectui#11072 already has an in-memory tsc pin over a synthetic manifest to extend.

Dedupe

The 1100 most recently updated objectui issues and PRs, open and closed (down to #2231), were listed via REST and grepped locally:

  • TS2430: 1 hit, PR objectui#11072 (the source report);
  • incorrectly extends: the same 1;
  • RecordAlertProps: 3 hits, PR objectui#11072, PR objectui#11031 (the flat body refusal) and PR objectui#10502 (the CTA lookup); neither of the older two touches visible or the generated types;
  • SduiBaseProps: 3 hits, objectui#11044, PR objectui#11072 and PR objectui#11042;
  • generateDts: 3 hits, objectui#11044, PR objectui#11072 and PR objectui#10753;
  • skipLibCheck: 1 hit, PR objectui#11072;
  • lit control record:alert: 18 hits; absent control zzqq_never_written_token_4242: 0.

None carries the TS2430.


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:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions