The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 24, 09:00 UTC
refactor(web): remove unused preview thread reset helper (#10049)
Julius Marminge committed
Sep 5, 2026 at 01:30 UTC
91ba05e870603b6bc0649e33973f73d86cbf58c3
2 files changed
-16
apps/web/src/previewStateStore.test.ts
-9
@@ -18,7 +18,6 @@ import {
18
readThreadPreviewState,
19
reconcilePreviewServerSessions,
20
rememberPreviewUrl,
21
- removePreviewThread,
21
resetPreviewStateForTests,
22
subscribeThreadPreviewState,
23
setActivePreviewTab,
@@ -609,12 +608,4 @@ describe("previewStateStore (single-tab)", () => {
608
`http://localhost:${5000 + __testing.RECENT_URL_LIMIT + 4}/`,
609
);
610
});
612
-
613
- it("removeThread strips the entry", () => {
614
- const snapshot = makeSnapshot();
615
- applyPreviewServerSnapshot(ref, snapshot);
616
- removePreviewThread(ref);
617
- const state = readThreadPreviewState(ref);
618
- expect(state).toEqual(__testing.EMPTY_THREAD_PREVIEW_STATE);
619
- });
611
});
apps/web/src/previewStateStore.ts
-7
@@ -472,13 +472,6 @@ export function rememberPreviewUrl(ref: ScopedThreadRef, url: string): void {
472
}));
473
}
474
475
-export function removePreviewThread(ref: ScopedThreadRef): void {
476
- const threadKey = scopedThreadKey(ref);
477
- appAtomRegistry.set(previewStateAtom(threadKey), EMPTY_THREAD_PREVIEW_STATE);
478
- syncActivePreviewThread(threadKey, EMPTY_THREAD_PREVIEW_STATE);
479
- changedPreviewThreadKeys.delete(threadKey);
480
-}
481
-
475
export function isPreviewSupportedInRuntime(): boolean {
476
if (typeof window === "undefined") return false;
477
return Boolean(window.desktopBridge?.preview);