Skip to content

Add custom snooze times - #4677

Open
colonelpanic8 wants to merge 3 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/add-custom-snooze-time
Open

Add custom snooze times#4677
colonelpanic8 wants to merge 3 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/add-custom-snooze-time

Conversation

@colonelpanic8

@colonelpanic8 colonelpanic8 commented Jul 27, 2026

Copy link
Copy Markdown

What Changed

  • add a “Custom time…” option to the sidebar snooze popover and native context menus
  • let users choose a local date and time for one thread or a multi-selection
  • reject invalid and past wake times before dispatching the existing snooze command
  • add focused coverage for local datetime formatting, defaults, conversion, and validation

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

Snooze menu before the change

After

Snooze menu with the custom-time option

Custom snooze date and time dialog

Checklist

  • vp check (passes; reports 11 existing warnings)
  • vp test run apps/web/src/components/Sidebar.snooze.test.ts (10 tests pass)
  • exercised the real sidebar flow in an isolated web environment
  • vp run typecheck — blocked on current main by the patched @effect/vitest package not exporting assert/describe; this occurs before the changed web package and is unrelated to this PR

Note

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.ts introduces formatSnoozeDateTimeLocal, defaultCustomSnoozeDateTime, and parseCustomSnoozeDateTime for native datetime-local values—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.tsx wires a Custom time… entry into the snooze popover and context menus, opens CustomSnoozeDialog with inline validation, and routes confirmed ISO timestamps through the existing snooze path (attemptSnooze now takes { snoozedUntil } instead of a full preset). Tests cover formatting, defaults, parsing, and DST cases in Sidebar.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

  • Adds a 'Custom time…' option to the snooze popover and context menus (single and multi-select) in SidebarV2.tsx, opening a new CustomSnoozeDialog for picking an arbitrary future time.
  • CustomSnoozeDialog initializes 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.
  • Adds parseCustomSnoozeDateTime, formatSnoozeDateTimeLocal, and defaultCustomSnoozeDateTime helpers in Sidebar.snooze.ts with full DST edge-case handling (repeated hour and gap detection via round-trip validation).
  • The internal attemptSnooze handler is refactored to accept a direct snoozedUntil timestamp object instead of a preset.

Macroscope summarized 9b728ae.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4c179803-e20b-4b8d-88c9-bef9dec7526b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ 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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 27, 2026
Comment thread apps/web/src/components/Sidebar.snooze.ts
Comment thread apps/web/src/components/SidebarV2.tsx
Comment thread apps/web/src/components/Sidebar.snooze.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ 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.

Comment thread apps/web/src/components/Sidebar.snooze.ts Outdated
Comment thread apps/web/src/components/SidebarV2.tsx Outdated
@macroscopeapp

macroscopeapp Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@colonelpanic8
colonelpanic8 force-pushed the t3code/add-custom-snooze-time branch from f283f8a to 04c9f94 Compare July 27, 2026 20:12
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
… and time)

# Conflicts:
#	apps/web/src/components/SidebarV2.tsx
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
… and time)

# Conflicts:
#	apps/web/src/components/SidebarV2.tsx
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
… and time)

# Conflicts:
#	apps/web/src/components/SidebarV2.tsx
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 28, 2026
… and time)

# Conflicts:
#	apps/web/src/components/SidebarV2.tsx
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-custom-snooze-time branch from 20cf068 to f85e6e7 Compare July 28, 2026 02:08
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-custom-snooze-time branch from f85e6e7 to 9b728ae Compare July 28, 2026 02:51
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 28, 2026
…ate and time)

# Conflicts:
#	apps/web/src/components/SidebarV2.tsx
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 28, 2026
…ate and time)

# Conflicts:
#	apps/web/src/components/SidebarV2.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant