Skip to content

feat(web): drag snooze options to choose their menu order - #11

Closed
jagrat7 wants to merge 2 commits into
mainfrom
feat/snooze-preset-order
Closed

jagrat7 wants to merge 2 commits into
mainfrom
feat/snooze-preset-order

Conversation

@jagrat7

@jagrat7 jagrat7 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Problem

Snooze options in Settings → Threads are always sorted soonest first, and every snooze menu uses that same order. To get a preferred option to the top, you had to delete every option above it and add them back. There was no way to move one.

Change

  • Snooze menus now list options in the order they appear in Settings, not by wake time. Hiding a "Today" option once its time has passed still works. When two options wake at the same minute, the one higher in the list is kept.
  • Each row in the settings editor gets a drag handle. Dragging (mouse, or keyboard with Space plus the arrow keys) saves the new order right away. Rows no longer re-sort when focus leaves the list.
  • Reset now also shows when only the order differs from the defaults.
  • The ordering logic lives in packages/client-runtime's resolveSnoozePresets, so the web/desktop sidebar, the thread action menu, and mobile all follow the saved order. Mobile has no snooze editor, so nothing else changes there.
  • The user guide line that said menus list options soonest first is updated.
Settings rows (drag to reorder) ──save──▶ settings.snoozePresets (ordered)
                                                   │
                                  resolveSnoozePresets (keeps order, drops
                                  passed "Today" and same-minute duplicates)
                                                   │
                       web sidebar · thread menu · mobile thread list

Scope and approval

This configures an existing capability: the customizable snooze options added in pingdotgg#26208. It only controls the order of options a user has already chosen. No new snooze kinds, storage fields, or schema changes. snoozePresets was already an ordered array.

PR #26208 deliberately chose automatic ordering ("Menus always list options soonest first, so there is no reordering to manage"), and #26427 made the editor match. This PR reverses that choice, so upstream would need maintainer sign-off. Existing users with saved presets will see their menu in saved order, which is usually the sorted order the editor already wrote.

Verification

  • vp test run packages/client-runtime/src/state/threadSnoozed.test.ts: 36 passed. The two resolveSnoozePresets cases that asserted soonest-first ordering now assert settings order, and both failed before the change.
  • vp run check:changed: format, lint, knip, typecheck (7 packages), tests, and React compiler all pass.
  • Manual pass in the dev web app: moved Tomorrow to the top with the drag handle. "Menu now" updated, and the thread context menu's Snooze submenu then listed Tomorrow first.

Before: the editor always sorts rows soonest first, with no reorder control (screenshot from the current app):

Before: snooze options sorted soonest first

After: rows have drag handles, and the description says menus follow this order:

After: snooze options with drag handles, Tomorrow moved to the top

After: the thread's Snooze menu follows the saved order:

After: snooze submenu lists Tomorrow first

Reorder, then open the menu:

Reordering a snooze option and opening the snooze menu

Not verified: dragging with a real mouse in the recording. Browser automation could not produce the intermediate pointer moves dnd-kit needs, so the recording shows the keyboard reorder instead. The mouse path uses the same PointerSensor setup as the existing route list in EnvironmentRoutesList. Mobile was not run, because it only consumes the shared ordering function that the tests above cover.

Claude Opus 5.5 via Claude Code in T3 Code.


Devin Review

jagrat7 and others added 2 commits November 8, 2026 19:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Nov 9, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Devin Review

Comment on lines +318 to +323
return (options.presets ?? DEFAULT_SNOOZE_PRESETS)
.flatMap((setting) => resolveSnoozePreset(setting, now, options.formatTime) ?? [])
.filter((preset) => {
if (seen.has(wakeMinute(preset))) return false;
seen.add(wakeMinute(preset));
return true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Default ordering needs approval check

With unedited presets, resolveSnoozePresets now follows the built-in array even when wake times differ. The contribution rules require prior approval for changed product defaults; the PR description does not link it.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@jagrat7 jagrat7 closed this Nov 9, 2026
@jagrat7
jagrat7 deleted the feat/snooze-preset-order branch November 9, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant