Skip to content

refactor(discord): let each flow own its interactions - #497

Open
Isaiahriveraa wants to merge 1 commit into
refactor/discord-rolesfrom
refactor/discord-interaction-routing
Open

Isaiahriveraa wants to merge 1 commit into
refactor/discord-rolesfrom
refactor/discord-interaction-routing

Conversation

@Isaiahriveraa

Copy link
Copy Markdown
Collaborator

Rationale

The button naming scheme was split across the HTTP route, the dispatcher, and both flows, so a new flow's buttons silently went to events and renaming approve would quietly stop the early acknowledgement. Each flow now says what it owns and which interactions are slow; the route only knows how to acknowledge early.

Observable Behavior

  • Event review buttons are now event-approve / event-deny; buttons on approval cards already posted still work.
  • RSO approvals are acknowledged first too, so a slow approval no longer risks Discord's 3-second deadline.
  • An interaction no flow owns gets "not available" instead of going to events.

Verification

  • acknowledges Discord first only for approvals, which do slow work — the early-acknowledgement rule
  • still approves from a card posted before review buttons had the event- prefix — old cards keep working
  • doesn't claim a button named after a built-in object property — constructor: no longer crashes the lookup
  • Not yet tried in the dev Discord server.

Stack Context

  • Moves the decision of who handles each interaction into the flows, which the approvals split above relies on.

🤖 Generated with Claude Code

The button naming scheme was split across four places: the HTTP route
checked for "approve" to decide when to acknowledge Discord early, the
dispatcher sent anything without an rso- prefix to events, and event
review buttons had no prefix. Each flow now says which interactions it
owns and which need Discord acknowledged first; the dispatcher asks the
flows, and the route only knows how to acknowledge early.

Event review buttons now use the event- prefix. Buttons on approval
cards posted earlier still work. Registered student organization (RSO)
approvals, which can create a role and grant two, are now acknowledged
first too, so slow approvals no longer risk Discord's reply deadline.
An interaction no flow owns gets "not available" instead of going to
events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🚀 Deployed on https://pr-497--iuga.netlify.app

@Isaiahriveraa
Isaiahriveraa added this pull request to stack #501 November 26, 2026 09:11
@Isaiahriveraa
Isaiahriveraa marked this pull request as ready for review November 26, 2026 09:18
Copilot AI balanced review requested due to automatic review settings November 26, 2026 09:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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.

2 participants