fix(terminal): log pane recovery at warn, not error (#10796)

* fix(terminal): log pane recovery at warn, not error

STA-2373 made this path routine: every daemon death now remounts each live
pane, so error level floods logs and crash telemetry with a message that
reports recovery *succeeding*. The breadcrumb right below is what
diagnostics actually consume.

* 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.
This commit is contained in:
Brennan Benson
2026-07-29 20:39:54 -07:00
committed by GitHub
parent f908ba38bc
commit f37b9f63d3
2 changed files with 5 additions and 2 deletions
@@ -35,7 +35,7 @@ beforeEach(() => {
vi.stubGlobal('window', {
api: { pty: { hasPty: mocks.hasPty } }
})
vi.spyOn(console, 'error').mockImplementation(() => {})
vi.spyOn(console, 'warn').mockImplementation(() => {})
})
afterEach(() => {
@@ -276,7 +276,10 @@ export async function requestTerminalPaneRecovery(request: RecoveryRequest): Pro
// would suppress input on a pane that never recovered.
armTerminalInputQuarantine(request.tabId)
}
console.error(
// 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 the logs.
console.warn(
`[terminal] recovering pane tab ${request.tabId} — ${request.reason} with a live PTY (${request.ptyId ?? 'unbound'}); remounting to rebuild the renderer`
)
recordRendererCrashBreadcrumb('terminal_pane_recovery_remount', {