feat(np): Restore issue action buttons in the MSTeams renderer - #125160
Merged
hobzcalvin merged 4 commits intoSep 24, 2026
Merged
Conversation
hobzcalvin
added this pull request to stack #124985
September 21, 2026 23:30
hobzcalvin
force-pushed
the
gp/msteams_issue_actions
branch
from
September 21, 2026 23:44
cc6eee4 to
13d4dc3
Compare
Contributor
Sentry Snapshot Testing
|
hobzcalvin
force-pushed
the
gp/msteams_issue_actions
branch
2 times, most recently
from
September 22, 2026 17:48
6d4c47b to
6924651
Compare
hobzcalvin
force-pushed
the
gp/msteams_issue_actions
branch
2 times, most recently
from
September 22, 2026 20:05
9d87fcf to
49a94b5
Compare
hobzcalvin
force-pushed
the
gp/msteams_issue_actions
branch
from
September 22, 2026 20:10
49a94b5 to
36b3d92
Compare
hobzcalvin
force-pushed
the
gp/msteams_issue_actions
branch
from
September 22, 2026 21:02
36b3d92 to
5355250
Compare
hobzcalvin
marked this pull request as ready for review
September 22, 2026 21:18
hobzcalvin
requested review from
Christinarlong,
GabeVillalobos and
leeandher
September 22, 2026 21:19
hobzcalvin
force-pushed
the
gp/msteams_issue_actions
branch
from
September 22, 2026 23:00
5355250 to
7745b6a
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7745b6a. Configure here.
hobzcalvin
force-pushed
the
gp/msteams_issue_actions
branch
from
September 23, 2026 18:01
7745b6a to
1e7e260
Compare
hobzcalvin
added a commit
that referenced
this pull request
Sep 23, 2026
Stacked on #124857 (`gp/add_renderer_registry`). Supersedes #112890, which could not be reopened after the branch was rebased. ### Summary Adds `IssueMSTeamsRenderer`, so issue alerts sent through the notification platform produce the same Adaptive Card the legacy `MSTeamsIssueMessageBuilder` path produces today. The renderer registers itself for `(MSTEAMS, ISSUE)` with the registry from the parent PR rather than adding a `get_renderer` override to the provider. Original work by @GabeVillalobos; rebased onto current master and adapted to the registry. Actions are limited to a single "View Issue" link. The legacy card also offers resolve/archive/assign, which need the `RpcIntegration` for action webhook routing; that is coming in #125160 --------- Co-authored-by: Gabe Villalobos <gabriel.villalobos@sentry.io> Co-authored-by: Cursor <cursoragent@cursor.com>
The card action handler read payload["eventId"] unguarded and returned a 404 once the event lookup came back empty. That happens after _issue_state_change has already applied, so the action takes effect but the card is never redrawn. Look the event up only when the payload carries an id, and let the issue card builder take a group without one, so a card can offer actions for a group that has no particular event attached. Co-authored-by: Cursor <cursoragent@cursor.com>
Build the same resolve/archive/assign action set as MSTeamsIssueMessageBuilder, minus the integration id the legacy builder embeds in each action payload, which the renderer cannot supply because it has no access to the target the card is being sent to. The webhook resolves the integration from the request instead. Cover it with a test that diffs the rendered card against the legacy builder's across every group state, rather than relying only on the hand-reconstructed expected card, which can drift in lockstep with a renderer bug. Co-authored-by: Cursor <cursoragent@cursor.com>
Adaptive Cards types Input.ChoiceSet choice values as strings, and Teams returns whatever it was given as a string regardless, which is why the webhook already coerces the archive count with int(). Emit the archive choices as strings and narrow InputChoice.value off object so the two cannot diverge. Co-authored-by: Cursor <cursoragent@cursor.com>
hobzcalvin
force-pushed
the
gp/msteams_issue_actions
branch
from
September 23, 2026 18:34
1e7e260 to
e85df64
Compare
Christinarlong
approved these changes
Sep 23, 2026
Christinarlong
left a comment
Contributor
There was a problem hiding this comment.
makes sense to me
| "groupId": self.event.group.id, | ||
| "eventId": self.event.event_id, | ||
| "groupId": self.group.id, | ||
| "eventId": self.event.event_id if self.event else None, |
Member
There was a problem hiding this comment.
Can this ever be true? I wonder if we should guard against this case rather than just assuming it can be None.
| assert without_integration_id(self.legacy_card()) == without_integration_id( | ||
| self.platform_card() | ||
| ) | ||
|
|
Member
There was a problem hiding this comment.
Nice, I'm a fan of these tests, though I wonder if we should try to make this more data-driven testing, with different inputs to ensure content parity.
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.

Build the same resolve/archive/assign action set as MSTeamsIssueMessageBuilder,
minus the integration id the legacy builder embeds in each action payload,
which the renderer cannot supply because it has no access to the target the
card is being sent to. The webhook resolves the integration from the request
instead.
Cover it with a test that diffs the rendered card against the legacy builder's
across every group state, rather than relying only on the hand-reconstructed
expected card, which can drift in lockstep with a renderer bug.
Look the event up only when the payload carries an id, and let the issue card
builder take a group without one, so a card can offer actions for a group that
has no particular event attached.
Also pass strings, not ints, to Teams as that's their spec (and they coerce it / we were already translating back to ints).