From 6ec60cdc6a7f9ea9cca5f8061ecb37f4e2156b29 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Sun, 26 Jul 2026 18:44:48 -0700 Subject: [PATCH] fix(terminal): correct recovery log comment and test console spy The comment claimed error level floods telemetry; nothing forwards renderer console into telemetry, and the breadcrumb below is untouched, so this change alters telemetry volume by zero. The test's console.error spy silenced the old call site and now stubs nothing, leaking 26 stderr lines under verbose. --- .../src/components/terminal-pane/terminal-pane-recovery.test.ts | 2 +- .../src/components/terminal-pane/terminal-pane-recovery.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/components/terminal-pane/terminal-pane-recovery.test.ts b/src/renderer/src/components/terminal-pane/terminal-pane-recovery.test.ts index 7e0486523ef..ba9e4d89370 100644 --- a/src/renderer/src/components/terminal-pane/terminal-pane-recovery.test.ts +++ b/src/renderer/src/components/terminal-pane/terminal-pane-recovery.test.ts @@ -34,7 +34,7 @@ beforeEach(() => { vi.stubGlobal('window', { api: { pty: { hasPty: mocks.hasPty } } }) - vi.spyOn(console, 'error').mockImplementation(() => {}) + vi.spyOn(console, 'warn').mockImplementation(() => {}) }) afterEach(() => { diff --git a/src/renderer/src/components/terminal-pane/terminal-pane-recovery.ts b/src/renderer/src/components/terminal-pane/terminal-pane-recovery.ts index 146dc82a6e2..b202e5c565c 100644 --- a/src/renderer/src/components/terminal-pane/terminal-pane-recovery.ts +++ b/src/renderer/src/components/terminal-pane/terminal-pane-recovery.ts @@ -263,7 +263,7 @@ export async function requestTerminalPaneRecovery(request: RecoveryRequest): Pro cancelPendingRecoveryRetry(request.tabId) // warn, not error: this is the recovery succeeding, and the breadcrumb below is // what diagnostics actually read. STA-2373 made this path routine (every daemon - // death remounts each live pane), so error level just floods logs and telemetry. + // death remounts each live pane), so error level just floods the logs. console.warn( `[terminal] recovering pane tab ${request.tabId} — ${request.reason} with a live PTY (${request.ptyId ?? 'unbound'}); remounting to rebuild the renderer` )