Skip to content

Fix action context resolution bug #1155#1162

Open
selamw1 wants to merge 4 commits intomainfrom
fix/action-context-resolution-only
Open

Fix action context resolution bug #1155#1162
selamw1 wants to merge 4 commits intomainfrom
fix/action-context-resolution-only

Conversation

@selamw1
Copy link
Copy Markdown
Collaborator

@selamw1 selamw1 commented Apr 13, 2026

Strings in action context that matched component IDs were incorrectly resolved to component nodes, causing data corruption (e.g., [object Object] in payloads).

Fix

Added an isInsideAction flag to skip component resolution when processing action contexts in model-processor.ts.

Verification

  • Added a regression test in model-processor.test.ts.
  • Verified all unit tests pass.

Fixes #1155

Pre-launch Checklist

  • I signed the [CLA].
  • I read the [Contributors Guide].
  • I read the [Style Guide].
  • I have added updates to the [CHANGELOG].
  • I updated/added relevant documentation.
  • My code changes (if any) have tests.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a mechanism to prevent the resolution of component references when they appear within an action context in the A2uiMessageProcessor, including a new unit test for verification. Feedback suggests extending the isInsideAction guard to component array references to fully address potential data corruption, ensuring the flag propagates correctly for nested actions, and using double quotes for string literals to maintain style consistency.

Comment thread renderers/web_core/src/v0_8/data/model-processor.ts
Comment thread renderers/web_core/src/v0_8/data/model-processor.ts Outdated
Comment thread renderers/web_core/src/v0_8/data/model-processor.ts Outdated
Copy link
Copy Markdown
Collaborator

@zeroasterisk zeroasterisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do the isComponentArrayReference recommendation too

@selamw1
Copy link
Copy Markdown
Collaborator Author

selamw1 commented Apr 15, 2026

Please do the isComponentArrayReference recommendation too

All done! This was taken care of in commit 0438e34. The !isInsideAction check has been safely layered over isComponentArrayReference now as well. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Form submission contains incorrect data if the element ids match keys in action context

2 participants