From ae6712b9041dcd6085ac6babf7bd44ce3203695d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 17 Feb 2026 06:05:24 +0000 Subject: [PATCH] Keep perf seed retry logic while trimming verbose diagnostics Co-authored-by: Julius Marminge --- apps/desktop/src/desktopPerfAutomation.ts | 44 ++++++----------------- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/apps/desktop/src/desktopPerfAutomation.ts b/apps/desktop/src/desktopPerfAutomation.ts index 065adb63d3..619d8bc997 100644 --- a/apps/desktop/src/desktopPerfAutomation.ts +++ b/apps/desktop/src/desktopPerfAutomation.ts @@ -427,32 +427,21 @@ async function seedRendererState( return window.webContents.executeJavaScript(script, true); } -async function readRendererPersistedStateSnapshot(window: BrowserWindow): Promise<{ - url: string; - projects: number; - threads: number; -}> { +async function readRendererPersistedThreadCount(window: BrowserWindow): Promise { const script = ` (() => { const key = "t3code:renderer-state:v7"; const raw = localStorage.getItem(key); - let projects = 0; let threads = 0; if (raw) { try { const parsed = JSON.parse(raw); - projects = Array.isArray(parsed?.projects) ? parsed.projects.length : 0; threads = Array.isArray(parsed?.threads) ? parsed.threads.length : 0; } catch { - projects = -1; threads = -1; } } - return { - url: window.location.href, - projects, - threads, - }; + return threads; })(); `; return window.webContents.executeJavaScript(script, true); @@ -1051,38 +1040,25 @@ export async function runDesktopPerfAutomation(window: BrowserWindow): Promise