Add custom snooze times - #4677
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f283f8a. Configure here.
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature (custom snooze time selection) with a new dialog component and workflow. New features that add user-facing capabilities should receive human review to ensure the behavior aligns with product expectations. You can customize Macroscope's approvability policy. Learn more. |
f283f8a to
04c9f94
Compare
… and time) # Conflicts: # apps/web/src/components/SidebarV2.tsx
… and time) # Conflicts: # apps/web/src/components/SidebarV2.tsx
… and time) # Conflicts: # apps/web/src/components/SidebarV2.tsx
… and time) # Conflicts: # apps/web/src/components/SidebarV2.tsx
20cf068 to
f85e6e7
Compare
f85e6e7 to
9b728ae
Compare
…ate and time) # Conflicts: # apps/web/src/components/SidebarV2.tsx
…ate and time) # Conflicts: # apps/web/src/components/SidebarV2.tsx

What Changed
Why
The preset snooze times cover common cases, but they cannot express a specific deadline or return time. A custom picker keeps the quick presets while allowing precise scheduling when needed.
UI Changes
The snooze menu now includes a separated “Custom time…” action. It opens a compact date/time dialog with a future-time default, inline validation, and the existing snooze confirmation flow.
Before
After
Checklist
vp check(passes; reports 11 existing warnings)vp test run apps/web/src/components/Sidebar.snooze.test.ts(10 tests pass)vp run typecheck— blocked on currentmainby the patched@effect/vitestpackage not exportingassert/describe; this occurs before the changed web package and is unrelated to this PRNote
Low Risk
Client-only UI and validation on top of the existing snooze command; no server or auth changes. DST handling is the main subtlety and is covered by tests.
Overview
Adds custom snooze scheduling alongside the existing presets: users can pick an exact local date and time for one thread or a multi-selection.
Sidebar.snooze.tsintroducesformatSnoozeDateTimeLocal,defaultCustomSnoozeDateTime, andparseCustomSnoozeDateTimefor nativedatetime-localvalues—defaults at least one hour ahead on 15-minute steps, rejects past/invalid input, and handles DST gaps and the repeated fall hour via round-trip validation.SidebarV2.tsxwires a Custom time… entry into the snooze popover and context menus, opensCustomSnoozeDialogwith inline validation, and routes confirmed ISO timestamps through the existing snooze path (attemptSnoozenow takes{ snoozedUntil }instead of a full preset). Tests cover formatting, defaults, parsing, and DST cases inSidebar.snooze.test.ts.Reviewed by Cursor Bugbot for commit 9b728ae. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add custom snooze times to sidebar thread snooze flow
CustomSnoozeDialogfor picking an arbitrary future time.CustomSnoozeDialoginitializes to at least one hour ahead on a 15-minute boundary, validates input on change, and rejects past, invalid, or DST-gap times before submitting an ISO timestamp.parseCustomSnoozeDateTime,formatSnoozeDateTimeLocal, anddefaultCustomSnoozeDateTimehelpers in Sidebar.snooze.ts with full DST edge-case handling (repeated hour and gap detection via round-trip validation).attemptSnoozehandler is refactored to accept a directsnoozedUntiltimestamp object instead of a preset.Macroscope summarized 9b728ae.