feat(sdui): standardize on_change payload to { id, value } across all renderers#463
Merged
roblevintennis merged 3 commits intomasterfrom Mar 23, 2026
Merged
Conversation
… renderers
All form input nodes (AgInput, AgCheckbox, AgToggle, AgRadio, AgSelect,
AgSelectionButtonGroup, AgSelectionCardGroup) now dispatch a structured
payload { id: node.id, value: <current value> } to on_change action handlers.
This is the prerequisite for adaptive questionnaire flows (issue #461):
consumers can accumulate answers[id] = value without parsing DOM events.
Also adds SPECIFICATION.md section 5.4 documenting the questionnaire
integration pattern and updates section 5.1 to describe the standardized
payload shape.
Closes #461
✅ Deploy Preview for agnosticui-demo-vue ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for agnosticui-demo-react ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for agnosticui-demo-lit ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Add componentActionPayloadMap, vueComponentActionPayloadMap, and
litComponentActionPayloadMap to codegen.config.ts so that the codegen
emits the correct { id, value } payload for each form input component
without conflating the different event detail shapes (checked boolean
vs value string) across Checkbox, Input, Radio, Select, and Toggle.
Update codegen.ts generators to check the component-level map before
falling back to the generic actionPayloadMap.
Regenerate React and Vue renderer files to match.
Vue component wrappers type their event callbacks with specific detail
types (e.g. CheckboxChangeEventDetail), not the base Event type. Using
(e: Event) in generated Vue handlers caused TS2769 no-overload-match
errors because Event is structurally incompatible with detail types.
Changing to (e: unknown) satisfies all Vue wrapper callback signatures
and is consistent with the existing (e as unknown as {...}) casts in
vueComponentActionPayloadMap expressions.
Regenerate all three renderer files.
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
{ id: node.id, value: currentValue }toon_changehandlers across the React, Vue, and Lit renderersanswers[id] = valuewithout parsing DOM events{ id, value }shape for consistencyPayload shapes by component
valuetypestring(input text)string | string[]string(radio value)boolean(checked state)boolean(checked state)string(selected value)string(selected value)Test plan
cd v2/sdui/renderers/react && npm run buildcd v2/sdui/renderers/vue && npm run buildcd v2/sdui/renderers/lit && npm run buildon_changeaction and confirm the payload shape in the consoleon_changecontinue to no-op (no regression)Closes #461
🤖 Generated with Claude Code