Repository navigation
fix(web_core): keep Record props as data in ResolveA2uiProp - #2939
Merged
Merged
Conversation
josemontespg
force-pushed
the
web-core-record-props-data
branch
from
October 1, 2026 20:07
c4a49e0 to
22be209
Compare
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a new helper type HasStringIndex in typescript/web_core/src/resolution/generic-binder.ts to identify object types with a string index signature (such as Record<string, unknown>). It also updates the ResolveA2uiProp type utility to handle these types separately from ActionLike types, resolving them to Exclude<T, DynamicTypes> instead of callable functions. There are no review comments, so I have no feedback to provide.
josemontespg
added this pull request to stack #2940
October 1, 2026 20:12
josemontespg
force-pushed
the
web-core-record-props-data
branch
from
October 1, 2026 20:43
22be209 to
f7d9cd1
Compare
josemontespg
marked this pull request as ready for review
October 1, 2026 21:40
josemontespg
force-pushed
the
web-core-record-props-data
branch
from
October 1, 2026 21:42
f7d9cd1 to
707cb39
Compare
josemontespg
removed this pull request from stack #2940
October 1, 2026 21:56
josemontespg
added this pull request to stack #2946
October 1, 2026 21:56
josemontespg
force-pushed
the
web-core-record-props-data
branch
from
October 1, 2026 22:14
707cb39 to
3a7cb30
Compare
gspencergoog
approved these changes
Oct 1, 2026
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.
Summary
ResolveA2uiPropturns every prop whose type matchesActionLikeinto a() => Promise<void>thunk. Since #2859 addedV1ActiontoActionLike, whose function-call variant infers as the weak type{functionCall?: any}, every object type matches it, so props declared asz.record(z.unknown())(or anyRecord<string, ...>) now resolve to an action thunk instead of their data type. The runtime binder is unaffected (it reads the zod schema), so this is a type-only regression, but it breakstscfor catalogs that read such props, for example the iframe and MCP catalogs in #2797 and #2799.Object types with a string index signature now resolve as data, as before #2859. Props shaped like an action (
{event: ...},{functionCall: ...},V1Action) still resolve to the thunk.Changes
typescript/web_core/src/resolution/generic-binder.ts: addHasStringIndex<T>and check it inside theActionLikebranch ofResolveA2uiPropbefore producing the thunk type.typescript/web_core/CHANGELOG.md: Unreleased entry.Verification
yarn --cwd typescript/web_core test(842 tests) and./scripts/fix_format.sh --checkpass locally.