Skip to content

[_]: feat(email): handle concurrent draft updates with conflict response#86

Open
jzunigax2 wants to merge 1 commit into
masterfrom
fix/draft-deduplicate
Open

[_]: feat(email): handle concurrent draft updates with conflict response#86
jzunigax2 wants to merge 1 commit into
masterfrom
fix/draft-deduplicate

Conversation

@jzunigax2

Copy link
Copy Markdown
Contributor
  • Introduced DraftUpdateConflictError to manage concurrent modifications of drafts.
  • Updated EmailService to throw a ConflictException when a draft is modified concurrently.
  • Enhanced EmailController to return a conflict response for concurrent draft updates.
  • Added unit tests to verify conflict handling in EmailService and JmapMailProvider during draft updates.

- Introduced `DraftUpdateConflictError` to manage concurrent modifications of drafts.
- Updated `EmailService` to throw a `ConflictException` when a draft is modified concurrently.
- Enhanced `EmailController` to return a conflict response for concurrent draft updates.
- Added unit tests to verify conflict handling in `EmailService` and `JmapMailProvider` during draft updates.
@jzunigax2 jzunigax2 added the bug Something isn't working label Jul 8, 2026
@jzunigax2 jzunigax2 requested a review from xabg2 July 8, 2026 23:53
@jzunigax2 jzunigax2 self-assigned this Jul 8, 2026
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jzunigax2, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 32a015c4-27b3-4c5e-92c6-136faec3acda

📥 Commits

Reviewing files that changed from the base of the PR and between 1e57acc and a05bae9.

📒 Files selected for processing (6)
  • src/modules/email/email.controller.ts
  • src/modules/email/email.service.spec.ts
  • src/modules/email/email.service.ts
  • src/modules/email/mail-provider.port.ts
  • src/modules/infrastructure/jmap/jmap-mail.provider.spec.ts
  • src/modules/infrastructure/jmap/jmap-mail.provider.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/draft-deduplicate

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.

@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants