Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Restore device defaults now ignores snooze-option row order when detecting changed settings, matching the existing snooze settings UI. Product defaults and reset behavior remain unchanged. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dismissing prior approval to re-evaluate 18c0877
EvidenceEnvironment: web client in Chromium, 1280×800, light theme, separate fresh scenario databases, synthetic project, browser clock fixed at 23:16 on both sides. Steps: On fresh settings, open Settings > General; then Settings > Threads > Snooze options at browser-local 2026-12-03 23:16. Today 6 PM is passed and sorts last. Click Add option, remove option 6 (the added In 30 minutes row), observe the five defaults with no row reset action, and return to General. On base, click Restore device defaults, observe the Snooze options confirmation, and cancel. On head the restore button remains disabled. Scenario: Restore device defaults ignores snooze display orderProven: the scenario fails on base e378a3dcaa and passes on head 18c08771eb.
|








Problem
"Restore device defaults" lists "Snooze options" as a change, and stays enabled, when the snooze options are the same as the defaults and only their row order differs.
Steps (any device, no sign-in; do it at a time of day when "Today 6 PM" falls between "In 1 hour" and "In 3 hours", for example 4:00 PM):
Cause
useSettingsRestoreinSettingsPanels.tsx:564comparedsettings.snoozePresetswithEqual.equals, which is order sensitive. The Snooze row itself usessameSnoozePresets(SnoozePresetsSettings.tsx:111, compares sorted ids, "Row order is only display order") and saves rows in wake-time order. The two checks disagreed.Change
sameSnoozePresetsis now exported where it already lives andchangedSettingLabelsuses it. Three lines changed in two files, no code moved, so the row and the restore button agree.Scope
Small fix of an obvious bug, steps reproduce it, so it needs no issue.
Verification
New case in
SnoozeRestore.browser.test.tsx,does not list snooze options that only differ from the defaults in row order: renders the realuseSettingsRestorewith the default snooze options but "Today 6 PM" before "In 3 hours", and expects "Restore: nothing".Test commit alone, fails on main ae203ef:
Test Files 1 failed (1), Tests 1 failed (1)
With the fix: the new test and the existing
SnoozePresetsSettings.browser.test.tsxandSnoozePresetsSettings.logic.test.tspass (3 files, 7 tests).vp run check:changed: format, lint, knip, typecheck (2 packages), test (4 files, 23 tests) and react compiler all pass.Not verified: I did not click through Settings in a running app at 4:00 PM; the test drives the real restore hook with the same saved order the row writes.
Model: Claude Opus 5.5. Harness: Claude Code in T3 Code.