Jelly forwarding#65
Open
transcental wants to merge 8 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reduces noise in Jelly by adding logic to selectively forward inbound emails sent to stardance@hackclub.com to the support team, using a mix of simple filters and an AI classifier. It also introduces a dedicated mailer to forward the inbound message and expands mailbox tests to cover the new forwarding behavior.
Changes:
- Add
Rsvp::ReplyMailbox#should_forward?to decide when to forward inbound messages to Jelly, and skip local tic-tac-toe processing when forwarded. - Add
SupportMailer.forwardto forward inbound emails to the Jelly support address. - Improve AI service plumbing (OpenAI key via Rails credentials fallback; raise on non-200 responses) and add tests for forwarding scenarios.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/mailboxes/rsvp/reply_mailbox_test.rb | Adds tests for forwarding behavior and stubs the AI classifier. |
| config/credentials/production.yml.enc | Updates production credentials (likely for AI key/config). |
| config/credentials/development.yml.enc | Updates development credentials (likely for AI key/config). |
| app/services/openai_api_service.rb | Uses Rails credentials for OPENAI_API_KEY with ENV fallback. |
| app/services/ai_service.rb | Adds non-200 response handling for AI HTTP calls. |
| app/mailers/support_mailer.rb | New mailer for forwarding inbound emails to Jelly support. |
| app/mailboxes/rsvp/reply_mailbox.rb | Implements forwarding decision + forwarding side-effect in the mailbox. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+17
to
+19
| unless response.code == "200" | ||
| raise "AI API error: #{response.code} - #{response.body}" | ||
| end |
MMK21Hub
reviewed
May 10, 2026
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.
Currently ALL emails to stardance@hackclub.com are sent to Jelly which includes "Hey Stardance" RSVP confirmations and people playing tic tac toe. This PR uses a combination of filtering and AI detection to figure out which emails should be sent to the support team on Jelly. I've tested this as much as I can locally - the forwarding logic with the Action Mailer has not been tested.