fix: make resume download responses ephemeral#227
fix: make resume download responses ephemeral#227lairwaves wants to merge 2 commits into508-dev:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughChanged the Discord CRM resume download flow to send three follow-up messages as ephemeral, making error and success notifications visible only to the initiating user. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/discord_bot/src/five08/discord_bot/cogs/crm.py`:
- Around line 4633-4635: The follow-up send call is misformatted for ruff/black;
update the await interaction.followup.send call in the crm.py block (the line
that sends "❌ Failed to download resume: {str(e)}") to use a multi-line argument
style and remove the redundant str() around the exception, e.g. break into await
interaction.followup.send( f"❌ Failed to download resume: {e}", ephemeral=True
), so the call is properly wrapped and formatted.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6628e9a6-8dd1-463d-81af-2d915176f28e
📒 Files selected for processing (2)
apps/discord_bot/src/five08/discord_bot/cogs/crm.pytests/unit/test_crm.py
Title
Fix: Make resume download responses ephemeral
Issue
When using the /search-member command and clicking the "Resume" button, the response is sent to everyone in the channel instead of being visible only to the user who triggered the command. This behavior is inconsistent with the expected use case — the response should be ephemeral (visible only to the caller).
Description
Resume responses sent via the Resume button (from /search-members)
were visible to all channel members. This fix ensures all responses
from the resume download flow are ephemeral — only visible to the
user who triggered the interaction.
Fixed three missing
ephemeral=True:_download_and_send_resume_download_and_send_resumeResumeDownloadButton.callbackHow Has This Been Tested?
Updated existing unit test
test_download_and_send_resume_api_errorto assert ephemeral=True is passed. All 907 unit tests pass.
Summary by CodeRabbit
Improvements
Tests