Skip to content

fix: make resume download responses ephemeral#227

Open
lairwaves wants to merge 2 commits into508-dev:mainfrom
lairwaves:fix/resume-button-ephemeral
Open

fix: make resume download responses ephemeral#227
lairwaves wants to merge 2 commits into508-dev:mainfrom
lairwaves:fix/resume-button-ephemeral

Conversation

@lairwaves
Copy link
Copy Markdown
Contributor

@lairwaves lairwaves commented Apr 8, 2026

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:

  • Successful resume file send in _download_and_send_resume
  • API error message in _download_and_send_resume
  • Unexpected error handler in ResumeDownloadButton.callback

How Has This Been Tested?

Updated existing unit test test_download_and_send_resume_api_error
to assert ephemeral=True is passed. All 907 unit tests pass.

Summary by CodeRabbit

  • Improvements

    • Resume download error notifications are now sent privately to the requesting user instead of publicly.
    • Successfully downloaded resumes are now delivered privately to the requesting user instead of publicly.
    • CRM API failure messages shown during resume download are now private to the requester.
  • Tests

    • Unit tests updated to expect private (ephemeral) follow-up messages for the resume-download error path.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8cd4ff93-b8b3-4c3a-b662-3aca9e5631e7

📥 Commits

Reviewing files that changed from the base of the PR and between 78a485f and eac3cfc.

📒 Files selected for processing (1)
  • apps/discord_bot/src/five08/discord_bot/cogs/crm.py
✅ Files skipped from review due to trivial changes (1)
  • apps/discord_bot/src/five08/discord_bot/cogs/crm.py

📝 Walkthrough

Walkthrough

Changed 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

Cohort / File(s) Summary
Resume Download Message Visibility
apps/discord_bot/src/five08/discord_bot/cogs/crm.py
Added ephemeral=True to three follow-up messages: ResumeDownloadButton.callback unexpected-error follow-up, _download_and_send_resume success follow-up (resume attachment), and _download_and_send_resume EspoCRM failure follow-up.
Test Updates
tests/unit/test_crm.py
Updated unit test to assert mock_interaction.followup.send is called with ephemeral=True for the CRM resume-download API error path.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 I hopped through code with nimble paws,
Ephemeral whispers hidden from the throng;
Success and error tucked behind a curtain,
A private note, a quiet song. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: make resume download responses ephemeral' clearly and accurately summarizes the main change: making resume download responses ephemeral to restrict visibility to the initiating user.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between ae410ab and 78a485f.

📒 Files selected for processing (2)
  • apps/discord_bot/src/five08/discord_bot/cogs/crm.py
  • tests/unit/test_crm.py

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