close
Skip to content

fix(notifications): show error toast when notification snooze or un-snooze fails#8955

Open
selenaalpha77-sketch wants to merge 1 commit intomakeplane:previewfrom
selenaalpha77-sketch:fix/space-snooze-option-missing-error-toast
Open

fix(notifications): show error toast when notification snooze or un-snooze fails#8955
selenaalpha77-sketch wants to merge 1 commit intomakeplane:previewfrom
selenaalpha77-sketch:fix/space-snooze-option-missing-error-toast

Conversation

@selenaalpha77-sketch
Copy link
Copy Markdown

@selenaalpha77-sketch selenaalpha77-sketch commented Apr 27, 2026

Problem

NotificationItemSnoozeOption shows a success toast when snoozeNotification or unSnoozeNotification succeeds, but the catch blocks only call console.error — silently swallowing the failure from the user's perspective. The user clicks the snooze option, nothing visible happens, and they have no idea whether the action succeeded or failed.

This is an inconsistency: the happy path gives explicit feedback via setToast, but the error path provides none.

Fix

Add setToast calls with TOAST_TYPE.ERROR in both catch blocks, mirroring the pattern already used on success. The user now receives visible feedback when snooze or un-snooze fails, instead of silently being left in an unknown state.

Files Changed

  • apps/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/root.tsx

Summary by CodeRabbit

  • Bug Fixes
    • Snooze operations now display an error message when they fail
    • Unsnooze operations now display an error message when they fail

When snoozeNotification or unSnoozeNotification throws, the catch blocks
only call console.error — silently swallowing the error from the user's
perspective. The success path already uses setToast to give feedback, so
failures should do the same. Add error-level setToast calls in both catch
blocks so the user knows the action did not complete.
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


evan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 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: d8cc9558-e047-40c3-a9e1-ff720e85b461

📥 Commits

Reviewing files that changed from the base of the PR and between a40e064 and 5c0c25f.

📒 Files selected for processing (1)
  • apps/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/root.tsx

📝 Walkthrough

Walkthrough

Error toast notifications are now displayed when snooze and unsnooze operations fail, providing user feedback in addition to existing console error logging.

Changes

Cohort / File(s) Summary
Snooze Notification Error Handling
apps/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/root.tsx
Added error toast notifications (TOAST_TYPE.ERROR) to catch handlers for both snoozeNotification() and unSnoozeNotification() failures, with localized messages (notification.toasts.snooze_failed, notification.toasts.un_snooze_failed).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 When snoozes go wrong, don't stay silent and lone,
A toast pops to tell you the error has shown!
No more hidden failures in console's dark night,
Users will know when their notifications aren't quite right! 🍞✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding error toast feedback when notification snooze/un-snooze operations fail.
Description check ✅ Passed The description includes a clear problem statement, solution explanation, and affected files. However, it lacks required template sections like Type of Change, Test Scenarios, and References.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

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