From 5cda771f72ef183c4db02d863031462bdfdaf904 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 17 Feb 2026 05:00:59 +0000 Subject: [PATCH] Make perf scripted interactions best-effort in CI Co-authored-by: Julius Marminge --- apps/desktop/src/desktopPerfAutomation.ts | 35 +++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/apps/desktop/src/desktopPerfAutomation.ts b/apps/desktop/src/desktopPerfAutomation.ts index 382d0dc5a2..bde1bf6f47 100644 --- a/apps/desktop/src/desktopPerfAutomation.ts +++ b/apps/desktop/src/desktopPerfAutomation.ts @@ -955,12 +955,37 @@ export async function runDesktopPerfAutomation(window: BrowserWindow): Promise thread.id), - ); + let rendererInteractions: RendererPerfInteractions = { + threadClicks: 0, + typedChars: 0, + selectedModel: null, + largeThreadRenderStats: [], + benchmarkThreadIds: [], + }; + try { + rendererInteractions = await runRendererPerfInteractions( + window, + seed.benchmarkThreads.map((thread) => thread.id), + ); + } catch (rendererError) { + const message = rendererError instanceof Error ? rendererError.message : String(rendererError); + console.warn("[desktop-perf] renderer scripted interactions failed; continuing:", message); + } console.log("[desktop-perf] running terminal shortcut interactions"); - const terminalInteractions = await runTerminalPerfInteractions(window); + let terminalInteractions: TerminalPerfInteractions = { + openedByShortcut: false, + splitCount: 0, + commandMarker: "", + commandEchoObserved: false, + commandFileTouched: false, + modifierUsed: process.platform === "darwin" ? "meta" : "control", + }; + try { + terminalInteractions = await runTerminalPerfInteractions(window); + } catch (terminalError) { + const message = terminalError instanceof Error ? terminalError.message : String(terminalError); + console.warn("[desktop-perf] terminal scripted interactions failed; continuing:", message); + } const interactions = { ...rendererInteractions, terminal: terminalInteractions,