Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): re-snoozing a woken thread to the same wake time hides it again #15881

Closedvitalyiegorov(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/15881/headopened View on GitHub

Showing 3 changed files with 12 additions and 17 deletions.

x
0 of 3 viewed, 3 left
5 additions and 9 deletionsapps/server/src/orchestration-v2/Orchestrator.tsModified
View file
@@ -2767,20 +2767,16 @@
updatedAt: alreadyPinnedActive ? thread.updatedAt : now,
- case "thread.snooze": {
- const sameWakeTime =
- thread.snoozedUntil != null &&
- snoozedUntil !== null &&
- DateTime.toEpochMillis(thread.snoozedUntil) === DateTime.toEpochMillis(snoozedUntil);
- const existingSnoozedAt = sameWakeTime ? (thread.snoozedAt ?? null) : null;
+ case "thread.snooze":
+ // Always a fresh snoozedAt: re-snoozing a thread that a newer failure
+ // woke, usually to the same preset wake time, must hide it again.
return {
...thread,
snoozedUntil,
limitRecovery: thread.limitRecovery ? { ...thread.limitRecovery, snooze: false } : null,
- snoozedAt: existingSnoozedAt ?? now,
- updatedAt: existingSnoozedAt === null ? now : thread.updatedAt,
+ snoozedAt: now,
+ updatedAt: now,
- }
case "thread.unsnooze": {
const alreadyAwake = thread.snoozedUntil == null;
return {
6 additions and 3 deletionsapps/server/src/orchestration-v2/runtimeLayer.test.tsModified
View file