Repository navigation
fix(types,components)!: renderer props index signatures map to unknown, not any - #26293
Merged
Merged
Conversation
…ep 0) Claude-Session: https://claude.ai/code/session_01GJjkZ6pmdwWoDYH8fE8FAn Co-authored-by: Claude <noreply@anthropic.com>
… (mechanical, breaks pending) Claude-Session: https://claude.ai/code/session_01GJjkZ6pmdwWoDYH8fE8FAn Co-authored-by: Claude <noreply@anthropic.com>
…stProps) and narrow per site Claude-Session: https://claude.ai/code/session_01GJjkZ6pmdwWoDYH8fE8FAn Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GJjkZ6pmdwWoDYH8fE8FAn Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GJjkZ6pmdwWoDYH8fE8FAn Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
Seat Blocked-by: #26220 When #26220 lands, this branch merges |
This was referenced Oct 26, 2026
Brings in the ADR-0087 gate fix. Resolves the five renderer conflicts by keeping main's text and this branch's unknown index signature + RendererHostProps; main's filter-builder value declaration replaces this branch's cast. The per-package sdui records were retired on main and are dropped here. Claude-Session: https://claude.ai/code/session_01GJjkZ6pmdwWoDYH8fE8FAn Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
席位核对 · ACCEPT · seat
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steve · project thread
Part of #25918. This PR is the triage in-scope item named in the claim:
ComponentRendererPropsand the inline renderer props copies underui/packages/components/src/renderers/**move from an index signature toanyto one tounknown. #25918 remains open for the other items: the(schema as any)reads in ListView / ObjectGrid / ObjectView (a separate slice), and theno-explicit-anylint gate onui/packages/types/src, which triage holds out of scope until the maintainer names it. No ESLint config change here.Clause-②: yes (narrowing)
Metadata-protocol: none
What changed
@object-ui/types:ComponentRendererPropskeeps its index signature (forwarded keys stay admitted, the SchemaRenderer forward path is untouched), but the signature maps tounknown, so a renderer has to narrow a forwarded key before it uses it.@object-ui/components: the 77 renderer props annotations (74 files) that carried an index signature toanynow carry one tounknown. The class of reads that broke is declared, not cast:RendererHostProps(new, package-local,src/lib/renderer-host-props.ts) types the three host keys renderers read by name and hand to their root element:data-obj-id,data-obj-type(written bySchemaRendererfrom the node'sid/type) andstyle(forwarded fromBaseSchema.style). It is intersected into the 49 annotations that read them.onPageChange(pagination),onChange/value(input-otp),loading(button),className(text), and on the form's internalRenderFieldPropsreact-hook-form'sref(RefCallBack),fieldandemptyHint.filter-builderneeds no cast: main's components: the filter-builder renderer hands an authoredFilterGroupto a builder typed onFilterBuilderRowGroup, and the two row shapes are assignable in neither direction (hidden byanyuntil #26293) #26306 declaredvalue?: FilterGroupon the renderer schema, so the read type-checks as written (seat note, headb9a43f1d)..changeset/25918-renderer-props-unknown-index.md(patchon both packages, BREAKING type narrowing, FROM → TO migration for a renderer typed withComponentRendererProps).maindroppedscripts/sdui-manifest.sources/{types,components}.json, and CI's Build & E2E UI regeneratessdui.manifest.jsonitself.Measured (origin/main 617f27e + this branch)
base.tsone-liner alone: 0 type errors in@object-ui/components,@object-ui/types,@object-ui/reactand@object-ui/core(type-check, both programs each).ComponentRendererPropshas no renderer consumer; its only readers are the reconciliation pin in@object-ui/reactand the closed-face pin in@object-ui/types, which asserts the index signature exists and stays green.tsc --noEmit; about 45 of them were the host-key class above.@object-ui/components' entry (src/index.ts), so no downstream package's type-check reads them;ComponentRendererPropshas no consumer outside the two pins.Tests and gates (head
b9a43f1d; earlier readings at 67418d8 / e349c83 kept where still true)pnpm --filter @object-ui/components type-check: exit 0 (tsc --noEmit && tsc -p tsconfig.test.json).@object-ui/types,@object-ui/react,@object-ui/coretype-check: exit 0.pnpm --dir ui exec vitest run packages/components/ packages/types/ packages/react/src/__tests__/ComponentRendererProps.reconciliation.test.ts --maxWorkers=2: Test Files 826 passed, 1 skipped (827); Tests 14866 passed, 24 skipped.b9a43f1d(merge ofmaine890bedc),node scripts/check-adr-0087-registration.mjs --base origin/mainexits 0: "verified: ui/packages/types/src/base.ts#ComponentRendererProps ([key: string]: any -> [key: string]: unknown)". The gate now reads ui packages (fix(scripts): ADR-0087 registration gate reads ui workspace packages and .tsx modules #26319) and admits anany→unknownindex-signature change (D8, ADR amendment docs(adr-0087): amend D8 predicate 4 and D9 predicate 1 for ui packages #26455, gate fix(scripts): ADR-0087 gate reads an any index signature (D8 p4) and a src/index.tsx entry (D9) #26496). The changeset keepstype-surface-only. dispatch-gates: 28 derived, 28/28 atb9a43f1d.(narrowing)arm), on headb9a43f1d, run as CI runs it (build@objectstack/dogfood^..., thenpnpm --filter @objectstack/dogfood test): command exit 0. Test Files 300 passed, 3 skipped (303); Tests 2494 passed, 18 skipped (2512).Acceptance notes
ActionGroupSchemaandActionMenuSchema(inaction-group.tsx/action-menu.tsx) are exported schema interfaces, not renderer props, and still carry an index signature toany; they are outside this claim and left byte-identical.html-elements.tsx's sharedAnyPropsnow has anunknownindex signature but still typesschema: any; that member is not an index signature and is outside this claim.filter-builder: theFilterGroup/FilterBuilderRowGroupgap is closed onmainby components: the filter-builder renderer hands an authoredFilterGroupto a builder typed onFilterBuilderRowGroup, and the two row shapes are assignable in neither direction (hidden byanyuntil #26293) #26306, so this PR no longer carries a cast there.ui/AGENTS.md#0.1 says renderer props keep their signature (tolerance); the signature is kept as an index signature, only its value type changes, which is the triage item's own wording ("forwarded keys stay admitted").Generated by Claude Code