Skip to content

[OPE-167] Fix Slack reaction handler: refresh card and post confirmation after ack/resolve#99

Merged
singret merged 1 commit into
mainfrom
ope-167-slack-bidirectional-sync
May 26, 2026
Merged

[OPE-167] Fix Slack reaction handler: refresh card and post confirmation after ack/resolve#99
singret merged 1 commit into
mainfrom
ope-167-slack-bidirectional-sync

Conversation

@singret
Copy link
Copy Markdown
Contributor

@singret singret commented May 25, 2026

Summary

  • After a ✅ or 🔴 reaction on the incident card updates status, the Slack card now refreshes to reflect the new status/buttons (was staying stale)
  • Posts a public <@user> acknowledged/resolved INC-N via reaction message so the team sees who acted — mirrors the existing button handler behaviour
  • Adds a missing early return in the error path so the confirmation isn't posted when the DB update fails

Root cause

handleReactionAdded called UpdateIncidentStatus then did nothing after — no card refresh, no channel message. The button handler (handleStatusButton) did both. This brings reactions into parity.

Test plan

  • Add ✅ reaction to incident card in Slack → incident moves to Acknowledged in Regen UI, card updates, confirmation message appears in channel
  • Add 🔴 reaction to incident card in Slack → incident moves to Resolved in Regen UI, card updates, confirmation message appears in channel
  • Reaction on a non-incident message → no action taken
  • Reaction on already-resolved incident → gracefully ignored (existing transition guard)

Note: Requires Slack app Event Subscriptions to be enabled in the app dashboard (message.channels, app_mention, reaction_added) and the app reinstalled. See OPE-169 for the manifest fix.

…n ack/resolve

When ✅ or 🔴 reactions were added to the incident card, the status was
updated in the DB and timeline, but the Slack card stayed stale and no
team-visible confirmation was posted. Mirrors the behaviour of the button
handler: re-fetches the updated incident, calls refreshIncidentCard, and
posts a public "<@user> acknowledged/resolved INC-N via reaction" message.

Also adds a missing early return on UpdateIncidentStatus error so the
confirmation path is not reached when the update fails.
@singret singret merged commit c13febb into main May 26, 2026
4 checks passed
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