Skip to content

feat/fix(gchat) support Select and RadioSelect card actions#383

Open
mdnanocom wants to merge 1 commit intovercel:mainfrom
mdnanocom:fix_gchat_support_select_and_radios
Open

feat/fix(gchat) support Select and RadioSelect card actions#383
mdnanocom wants to merge 1 commit intovercel:mainfrom
mdnanocom:fix_gchat_support_select_and_radios

Conversation

@mdnanocom
Copy link
Copy Markdown
Contributor

Summary

This fixes a Google Chat adapter gap where Select and RadioSelect elements inside Actions were not converted into Google Chat selectionInput widgets.

The cross-platform card API exposes these primitives as supported interactive elements, but in @chat-adapter/gchat they were effectively dropped during card conversion, which could result in empty action sections for cards that used selection widgets instead of buttons.

What changed

  • convert Select in Actions to Google Chat selectionInput dropdown widgets
  • convert RadioSelect in Actions to Google Chat selectionInput radio widgets
  • read selected values from commonEventObject.formInputs in handleCardClick() when parameters.value is not present
  • keep existing button and link button behavior unchanged
  • preserve action ordering when buttons and selection inputs are mixed in the same Actions group

Why this shape

Google Chat surfaces selection widget values through form inputs rather than the same parameter path used by button clicks, so fixing rendering alone is not enough. This PR updates both sides of the adapter so selection widgets render and round-trip correctly through onAction.

Tests

Added adapter-level coverage for:

  • Select -> selectionInput
  • RadioSelect -> selectionInput
  • mixed action groups preserve both button and selection widgets
  • selection widget actions resolve the chosen value from formInputs
  • existing button click payloads still use parameters.value

Validation

  • pnpm --filter @chat-adapter/gchat test
  • pnpm --filter @chat-adapter/gchat typecheck

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 14, 2026

@mdnanocom is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant