The best way to control Claude Code, Codex and more from any computer or phone
fix(web): opening a project from the command palette skips settled and snoozed threads (#31894)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
spoukyii committed
Nov 14, 2026 at 19:55 UTC
81df733306645bc79855406964c751d913871e8d
2 files changed
+23
-3
apps/web/src/components/CommandPalette.browser.test.tsx
+15
-1
@@ -138,7 +138,7 @@ describe("CommandPalette open intents", () => {
138
await expect.element(input).toHaveValue("acme");
139
});
140
141
- it("opens a searched project's latest listed thread, not a newer subagent or delegated task", async () => {
141
+ it("opens a searched project's latest listed thread, not a newer subagent, delegated task, or parked thread", async () => {
142
const environmentId = EnvironmentId.make("local");
143
const projectId = ProjectId.make("acme");
144
const parentId = ThreadId.make("parent");
@@ -182,6 +182,20 @@ describe("CommandPalette open intents", () => {
182
projectId,
183
latestUserMessageAt: "2026-03-04T00:00:00.000Z",
184
}),
185
+ makeThreadFixture({
186
+ id: ThreadId.make("settled"),
187
+ environmentId,
188
+ projectId,
189
+ latestUserMessageAt: "2026-03-05T00:00:00.000Z",
190
+ settledOverride: "settled",
191
+ }),
192
+ makeThreadFixture({
193
+ id: ThreadId.make("snoozed"),
194
+ environmentId,
195
+ projectId,
196
+ latestUserMessageAt: "2026-03-06T00:00:00.000Z",
197
+ snoozedUntil: "2999-01-01T00:00:00.000Z",
198
+ }),
199
],
200
});
201
await using screen = await render(<CommandPalette>{null}</CommandPalette>);
apps/web/src/components/CommandPalette.tsx
+8
-2
@@ -178,6 +178,7 @@ import {
178
useRightPanelStore,
179
} from "../rightPanelStore";
180
import { getLatestThreadForProject, sortThreads } from "@t3tools/client-runtime/state/thread-sort";
181
+import { effectiveSnoozed } from "@t3tools/client-runtime/state/thread-settled";
182
import {
183
cn,
184
getLocalFileManagerName,
@@ -816,9 +817,14 @@ function OpenCommandPaletteDialog(props: {
817
),
818
)
819
: null;
820
+ // oxlint-disable-next-line react/purity -- runs in an event handler (oxc#27309)
821
+ const now = new Date().toISOString();
822
+ const openableThreads = threads.filter(
823
+ (thread) => thread.settledOverride !== "settled" && !effectiveSnoozed(thread, { now }),
824
+ );
825
const latestThread = groupedProjectKeys
826
? (sortThreads(
821
- threads.filter(
827
+ openableThreads.filter(
828
(thread) =>
829
thread.archivedAt === null &&
830
groupedProjectKeys.has(`${thread.environmentId}:${thread.projectId}`),
@@ -826,7 +832,7 @@ function OpenCommandPaletteDialog(props: {
832
clientSettings.sidebarThreadSortOrder,
833
)[0] ?? null)
834
: getLatestThreadForProject(
829
- threads.filter((thread) => thread.environmentId === project.environmentId),
835
+ openableThreads.filter((thread) => thread.environmentId === project.environmentId),
836
project.id,
837
clientSettings.sidebarThreadSortOrder,
838
);