| … | … | @@ -964,13 +966,27 @@ export function useThreadActions() { | |
| 974 | + | action: "Rescheduled", | |
| 975 | + | claim: action, | |
| 976 | + | undo: () => | |
| 977 | + | snoozeThreadMutation({ | |
🟠 High hooks/useThreadActions.ts:977
If Undo is clicked after previousWake has elapsed, this callback sends an expired timestamp that snoozeThreadMutation rejects, leaving the thread snoozed until the replacement time instead of restoring its awake state. Recheck previousWake when Undo runs and call unsnoozeThread(target) if it is no longer in the future.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/web/src/hooks/useThreadActions.ts around line 977: |
| 2 | |
| 3 | If Undo is clicked after `previousWake` has elapsed, this callback sends an expired timestamp that `snoozeThreadMutation` rejects, leaving the thread snoozed until the replacement time instead of restoring its awake state. Recheck `previousWake` when Undo runs and call `unsnoozeThread(target)` if it is no longer in the future. |
Fixed in abb04a5214: when the previous wake time has passed, Undo now wakes the thread instead of sending an expired timestamp. There's a test for this case in useThreadActions.undo.test.ts.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.