The best way to control Claude Code, Codex and more from any computer or phone
fix(web): deleting an archived thread also clears its draft, staged uploads and terminal state (#29164)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Alex Southwell committed
Nov 10, 2026 at 01:30 UTC
a3cd0aa8233c1bd4d67a8df423649ca08dc29aea
2 files changed
+9
apps/web/src/hooks/useThreadActions.permissions.test.ts
+6
@@ -331,6 +331,12 @@ describe("thread action permissions", () => {
331
expect(state.requests).toEqual([
332
expect.objectContaining({ action: "delete", environmentId: secondary }),
333
]);
334
+ expect(state.localEffects).toEqual([
335
+ "refresh-archive",
336
+ "release-uploads",
337
+ "clear-draft",
338
+ "clear-terminal-ui",
339
+ ]);
340
expect(threadPanelStatePresence(target)).toEqual(panelStateCleared);
341
});
342
apps/web/src/hooks/useThreadActions.ts
+3
@@ -447,6 +447,9 @@ export function useThreadActions() {
447
if (result._tag === "Success") {
448
expireThreadUndos(target, [...LIST_PLACEMENT_UNDO_KINDS, "archive"]);
449
refreshArchivedThreadsForEnvironment(target.environmentId);
450
+ releaseComposerDraftUploads(target);
451
+ clearComposerDraftForThread(target);
452
+ clearTerminalUiState(target);
453
clearDeletedThreadPanelState(target);
454
}
455
return result;