Skip to content

[Improve] Match Slack emoji reactions on Discord#512

Merged
mrubens merged 4 commits into
developfrom
improve/discord-reaction-parity-0adordj76i0sv
Jul 18, 2026
Merged

[Improve] Match Slack emoji reactions on Discord#512
mrubens merged 4 commits into
developfrom
improve/discord-reaction-parity-0adordj76i0sv

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Matt Rubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Discord.

What changed

Discord reaction behavior is now aligned with Slack:

  • Platform adds 👀 on real MESSAGE_CREATE launches; /new interaction launches pin 👀 on the posted acknowledgement instead of using interaction IDs
  • Launch payloads store a real discordReactionChannelId / discordReactionMessageId target for later merge/close/cancel reactions
  • Slack-style reaction names map to Discord unicode (white_check_mark, x, thumbsdown, thumbsup, etc.)
  • Non-Slack agent instructions allow/prefer send_chat_reaction_emoji when policy allows
  • PR terminal: ✅ merge / 👎 closed, and remove 👀, only when a valid message target exists
  • Cancel button: ❌ on the stored reaction target
  • Focused tests cover the above, including interaction launches that never react on interaction snowflakes

Why this change was made

Discord was missing Slack-parity reactions, and an earlier pass incorrectly reacted on interaction IDs (which Discord rejects). That made slash-command tasks never show the advertised reactions.

Impact

Users should see eyes on message-based and /new launches that produce a real acknowledgement, plus terminal/cancel emojis when those stored targets exist.

Add eyes reactions on initial Discord task launch, map Slack-style reaction names like white_check_mark and thumbsdown for Discord, and allow agent chat-reaction acks like Slack.
@roomote-roomote

roomote-roomote Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

1 issue outstanding. See task

  • apps/api/src/handlers/discord/index.ts:484 /new persists its interaction ID as communicationSourceEventId, but Discord reactions require a real message ID. The initial eyes reaction still 404s silently, and the new terminal/cancel paths reuse that same ID, so their advertised reactions also never land for slash-command tasks. Persist a valid message-and-channel reaction target for interaction launches, or omit reactions when none exists.
  • apps/api/src/handlers/discord/index.ts:464 Snapshot-resumed Discord runs only preserve discordTaskThread; the new discordReactionChannelId and discordReactionMessageId are dropped. Because terminal notifications now react only through those fields, a PR created by a resumed Discord task posts its status but cannot add the terminal emoji or remove eyes. Preserve a valid reaction target during snapshot resume and cover that path.

Reviewed b970367

mrubens added 2 commits July 18, 2026 01:28
…action prompts

Add focused tests for non-fatal initial eyes reaction failures, Discord first-turn reaction disallowance, and non-Slack instructions allowing send_chat_reaction_emoji.
Post terminal white_check_mark / thumbsdown on the origin Discord message when a PR merges or closes, remove the eyes ack, and add x on cancel.
@roomote-roomote

roomote-roomote Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the open review finding.

What changed: /new and other interaction launches no longer try to react with interaction IDs. Real MESSAGE_CREATE still 👀 on the origin message; interaction launches pin 👀 after the acknowledgement posts and store discordReactionChannelId / discordReactionMessageId for merge/close/cancel. Terminal and cancel reactions only run when that real target exists.

Commit: b970367

Skip intake eyes for slash-command launches, persist a real acknowledgement or message origin as discordReaction* payload fields, and only react for terminal/cancel when that target exists.
@mrubens
mrubens marked this pull request as ready for review July 18, 2026 01:49
@mrubens
mrubens merged commit 9578a6b into develop Jul 18, 2026
18 checks passed
@mrubens
mrubens deleted the improve/discord-reaction-parity-0adordj76i0sv branch July 18, 2026 01:49
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