Skip to content

SuggestedActionSubmitActivity for suggestedAction/submit invoke#434

Merged
heyitsaamir merged 3 commits into
microsoft:mainfrom
ShanmathiMayuramKrithivasan:shmayura/suggested-actions
May 26, 2026
Merged

SuggestedActionSubmitActivity for suggestedAction/submit invoke#434
heyitsaamir merged 3 commits into
microsoft:mainfrom
ShanmathiMayuramKrithivasan:shmayura/suggested-actions

Conversation

@ShanmathiMayuramKrithivasan

@ShanmathiMayuramKrithivasan ShanmathiMayuramKrithivasan commented May 22, 2026

Copy link
Copy Markdown
Contributor

Adds support for suggestedActions/submit invoke activity - dispatched by the platform when a user clicks an Action.Submit suggested-action click.

  • New SuggestedActionSubmitInvokeActivity model and on_suggested_action_submit handler.
  • New CardActionType.SUBMIT enum value for constructing outbound suggested-action chips.
  • Marked @experimental("ExperimentalTeamsSuggestedAction") until the platform feature stabilizes.
  • New examples/suggested-actions sample app.
image

Copilot AI review requested due to automatic review settings May 22, 2026 12:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds first-class support for Teams suggestedActions/submit invoke activities (generated app handler + route config), along with API models, tests, and an end-to-end example.

Changes:

  • Introduces SuggestedActionSubmitInvokeActivity and wires it into invoke activity dispatching.
  • Adds an on_suggested_action_submit handler registration method and route selector for suggestedActions/submit.
  • Adds unit tests, fixtures, and a runnable example demonstrating Action.Submit suggested-action chips.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/apps/src/microsoft_teams/apps/routing/generated_handlers.py Adds on_suggested_action_submit handler registration API for apps.
packages/apps/src/microsoft_teams/apps/routing/activity_route_configs.py Registers route config/selector for suggestedActions/submit invoke activities.
packages/api/src/microsoft_teams/api/activities/invoke/suggested_action_submit.py Defines the new experimental invoke activity model.
packages/api/src/microsoft_teams/api/activities/invoke/init.py Exports and includes the new activity in the invoke discriminated union.
packages/api/src/microsoft_teams/api/models/card/card_action_type.py Adds CardActionType.SUBMIT for Action.Submit.
packages/api/tests/unit/test_suggested_action_submit.py Adds unit tests for model parsing/serialization + experimental warning behavior.
packages/api/tests/unit/test_fixtures.py Registers the new fixture for generic fixture-type validation.
packages/api/tests/fixtures/suggested_action_submit_invoke_activity.json Adds fixture payload for suggestedActions/submit.
examples/suggested-actions/src/main.py New example app that sends Action.Submit chips and handles suggestedActions/submit.
examples/suggested-actions/pyproject.toml Adds example packaging/deps configuration.
examples/suggested-actions/README.md Documents behavior, experimental API note, and run instructions.

Comment thread examples/suggested-actions/pyproject.toml
Comment thread packages/api/tests/unit/test_suggested_action_submit.py
Comment thread packages/api/src/microsoft_teams/api/activities/invoke/suggested_action_submit.py Outdated

@heyitsaamir heyitsaamir left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall looks good to me. Minor nits.

  1. Can you attach a screenshot/video of this working please?
  2. Can you give a timeline on when this is going to be available for folks to use?

Comment thread packages/api/src/microsoft_teams/api/activities/invoke/suggested_action_submit.py Outdated
Comment thread packages/api/src/microsoft_teams/api/activities/invoke/suggested_action_submit.py Outdated
Comment thread packages/api/src/microsoft_teams/api/activities/invoke/suggested_action_submit.py Outdated
@ShanmathiMayuramKrithivasan

ShanmathiMayuramKrithivasan commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Overall looks good to me. Minor nits.

  1. Can you attach a screenshot/video of this working please?
  2. Can you give a timeline on when this is going to be available for folks to use?

Added screenshot from sample app in the description.
It is expected to be available in preview by this week.

@singhk97 singhk97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@heyitsaamir
heyitsaamir merged commit c949552 into microsoft:main May 26, 2026
4 checks passed
corinagum added a commit that referenced this pull request May 27, 2026
## Summary

Brings `origin/main` into `release` for the **2.0.12** release. **No
carve-outs this time** — Quoted Replies (PR #321) is included.

`version.json`: `2.0.11` → `2.0.12`.

Aligns with teams.ts/teams.net cadence.

## What's in this release (delta from 2.0.11)

**Features**
- Quoted Replies & new quotes features (#321) — previously held back
- SuggestedActionSubmitActivity for `suggestedAction/submit` invoke
(#434)
- Default targeted replies for targeted inbound messages (#439)
- Reactions API marked GA (#427) — already shipped in 2.0.11 actually,
ignore if duplicate
- Prompt Preview support (#397)
- Sample: opt targeted-messages into slash commands (#430)
- Sample: a2a-in-teams (#401)
- Sample: proactive message update (#405)
- Allow custom HTTP client via `AppOptions` (#416)

**Security & fixes**
- Lock JsonWebToken trust-boundary contract (#432)
- Bump starlette 1.0.0 -> 1.1.0 for PYSEC-2026-161 / BadHost (#441)
- warn when bot starts without credentials (#435)
- fix(apps): support AAD v1 issuers in Entra token validation (#422)
- fix(apps): log inbound activities at info, warn on missing
Authorization (#425)
- fix(http-stream): wait for in-flight flush before sending final close
(#419)
- Mark reactions API as GA and fix sample remove flow (#427)
- Revert serviceUrl allowlist (ADO 5310460) (#415)
- Route `app.get_app_graph` + `ctx.*_graph` to sovereign endpoints via
`cloud.graph_scope` (#402)

**Deprecations / package changes**
- Remove ai, openai, mcpplugin, a2a, and devtools packages (#413)
- Restore and deprecate devtools package (#410)
- Deprecate ai, openai, mcpplugin, a2a packages (#406)
- Add agent framework example, remove chatprompt/mcp client samples
(#386)

**Dependency bumps**
- urllib3 2.6.3 → 2.7.0 (#426)
- python-multipart 0.0.26 → 0.0.27 (#424)
- microsoft-kiota-http 1.9.7 → 1.9.9 (#423)
- idna 3.11 → 3.15 (#431)
- starlette 1.0.0 → 1.1.0 (#441, security)
- /examples/tab/Web: qs, postcss, uuid, follow-redirects bumps

## Quoted Replies inclusion notes

- Teams client rendering is in-sync with the wire format as of
2026-05-06.
- APX QR rollout completed: Public 2026-04-10, GCCH/DoD/Gallatin
2026-04-14.
- Builder methods (`prepend_quote()`, `add_quote()`), `ctx.quote()`, and
the quote-aware `ctx.reply()` behavior are all present in this release.
- `examples/quoting` is included.

## Conflict resolution

The 2.0.11 release branch had the QR-removed shape for four files; took
`main`'s (QR-included) version for all of them:
- `examples/targeted-messages/src/main.py`
- `packages/api/src/microsoft_teams/api/activities/message/message.py`
- `packages/apps/src/microsoft_teams/apps/routing/activity_context.py`
- `packages/apps/tests/test_activity_context.py`

`version.json` conflict resolved to `2.0.12`.

## Test plan

- [x] `uv sync` clean
- [x] `poe check` (ruff format + lint) — clean
- [x] `poe test` — 609 passed
- [x] `pyright` — 0 errors, 0 warnings
- [ ] Pipeline build + test stages green on `release` after merge
- [ ] Publish pipeline run with **Public** → ESRP approval → PyPI
- [ ] `pip install microsoft-teams-apps==2.0.12` smoke install

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Aamir Jawaid <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Co-authored-by: Shanmathi Mayuram Krithivasan <[email protected]>
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.

5 participants