Repository navigation
fix(web): adding the last snooze option no longer reorders rows mid-edit - #33279
benoneill66 wants to merge 1 commit into
Conversation
Disabling the focused "Add option" button at the limit dropped focus, which the list read as leaving it and sorted immediately. Use aria-disabled so focus stays put until the user actually leaves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — The snooze settings Add option button now retains focus at the preset limit, preventing rows from reordering mid-edit. The preset limit and settings-saving behavior remain unchanged. Needs human approval because:
Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Note Written by Verified in a real dev environmentverified exact head
matching preset data after the eighth add, main then pr. these images show the rows; the focus difference was checked directly above. Not verifiedmain reproduces the lost-focus bug, but this chrome build did not reproduce the immediate automatic row jump, in either headed or headless mode. the pr focus fix and sorting after an actual outside click were exercised directly. native desktop, ios/android, other providers, relay/tunnel connections, and automatic wake after waiting 24 hours were not exercised. |




Problem
In Settings → Threads → Snooze options, clicking Add option for the 8th (last allowed) option made the rows jump. The new option landed mid-list, and it looked like it had overwritten an existing row.
The rows are meant to sort by wake time only once focus leaves the list. At the limit, though, the button became
disabledwhile it had focus. Chromium then drops focus tobody, the list's blur handler treats that as leaving, and it sorts straight away.Change
At the limit the button uses
aria-disabledinstead ofdisabled, and its click handler is removed. Focus stays on the button, so sorting waits until the user actually leaves the list.Buttonalready stylesaria-disabled(dimmed,not-allowedcursor), so it looks the same.Scope and approval
This is a small, focused fix for an obvious bug, under the CONTRIBUTING exception: one prop swap in one component, plus a test. It doesn't change how or when rows sort otherwise.
Verification
SnoozePresetsSettings.browser.test.tsx: starting one short of the limit, it adds an option and checks that focus stays on Add, that the button isaria-disabled, and that the new row is last. It fails onmain(focus is lost) and passes with the fix. Headless Chromium doesn't fire the blur, so the test checks the root cause (lost focus) rather than the jump itself.vp run check:changedpasses.Reviewed with sol-loop: 1 round with gpt-6.1-sol. Sol verdict: approved.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code