diff --git a/apps/desktop/src/desktopPerfAutomation.ts b/apps/desktop/src/desktopPerfAutomation.ts index 520e8dc7ed..acf1481201 100644 --- a/apps/desktop/src/desktopPerfAutomation.ts +++ b/apps/desktop/src/desktopPerfAutomation.ts @@ -409,7 +409,6 @@ async function seedRendererState( const script = ` (() => { const key = "t3code:renderer-state:v7"; - localStorage.setItem("t3code:perf-debug", "1"); localStorage.setItem("t3code:perf-bootstrap-skip", "1"); localStorage.setItem(key, JSON.stringify(${JSON.stringify(state)})); let projects = -1; diff --git a/apps/web/src/store.ts b/apps/web/src/store.ts index a686aad189..6b38d7b007 100644 --- a/apps/web/src/store.ts +++ b/apps/web/src/store.ts @@ -101,8 +101,6 @@ const initialState: AppState = { function readPersistedState(): AppState { if (typeof window === "undefined") return initialState; - const perfDebugEnabled = window.localStorage.getItem("t3code:perf-debug") === "1"; - try { const rawCurrent = window.localStorage.getItem(PERSISTED_STATE_KEY); const legacyValues = LEGACY_PERSISTED_STATE_KEYS.map((key) => window.localStorage.getItem(key)); @@ -111,21 +109,7 @@ function readPersistedState(): AppState { if (!raw) return initialState; const rawCodethingV1 = window.localStorage.getItem("codething:renderer-state:v1"); const hydrated = hydratePersistedState(raw, !rawCurrent && raw === rawCodethingV1); - if (!hydrated) { - if (perfDebugEnabled) { - console.info("[perf-debug] hydratePersistedState returned null", { - rawLength: raw.length, - hasCurrent: rawCurrent !== null, - }); - } - return initialState; - } - if (perfDebugEnabled) { - console.info("[perf-debug] hydrated persisted state", { - projects: hydrated.projects.length, - threads: hydrated.threads.length, - }); - } + if (!hydrated) return initialState; const threads = hydrated.threads.map((thread) => normalizeThreadTerminals(thread)); const activeThreadId = threads.some((thread) => thread.id === hydrated.activeThreadId) @@ -134,9 +118,6 @@ function readPersistedState(): AppState { return { ...hydrated, threads, activeThreadId, diffOpen: false }; } catch { - if (perfDebugEnabled) { - console.info("[perf-debug] readPersistedState threw; falling back to initial state"); - } return initialState; } } @@ -145,14 +126,6 @@ function persistState(state: AppState): void { if (typeof window === "undefined") return; try { - const perfDebugEnabled = window.localStorage.getItem("t3code:perf-debug") === "1"; - if (perfDebugEnabled) { - console.info("[perf-debug] persistState", { - projects: state.projects.length, - threads: state.threads.length, - activeThreadId: state.activeThreadId, - }); - } window.localStorage.setItem(PERSISTED_STATE_KEY, JSON.stringify(toPersistedState(state))); for (const legacyKey of LEGACY_PERSISTED_STATE_KEYS) { window.localStorage.removeItem(legacyKey);