Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): deleting a thread skips snoozed and settled fallbacks #29666

Closedvoltcrash(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/29666/headopened View on GitHub

Showing 1 changed file with 54 additions and 0 deletions.

x
0 of 1 viewed, 1 left
54 additions and 0 deletionsapps/web/src/components/Sidebar.logic.test.tsModified
View file
@@ -630,6 +630,60 @@
expect(fallbackThreadId).toBe(ThreadId.make("thread-next"));
});
​
+ it.each([
+ {
+ state: "snoozed",
+ overrides: { snoozedUntil: "2026-03-09T14:00:00.000Z" },
+ eligible: false,
+ },
+ {
+ state: "settled",
+ overrides: { settledOverride: "settled" as const },
+ eligible: false,
+ },
+ {
+ state: "expired snooze",
+ overrides: { snoozedUntil: "2026-03-09T10:30:00.000Z" },
+ eligible: true,
+ },
+ {
+ state: "snoozed but waiting on input",
+ overrides: { snoozedUntil: "2026-03-09T14:00:00.000Z", hasPendingUserInput: true },
+ eligible: true,
+ },
+ ])("respects $state visibility when choosing a fallback", ({ overrides, eligible }) => {
+ const deletedThread = makeThread({ id: ThreadId.make("deleted") });
+ const candidate = makeThread({
+ id: ThreadId.make("candidate"),
+ createdAt: "2026-03-09T10:10:00.000Z",