From b3930001328efb3cc811ebde3f094b4d33f7733d Mon Sep 17 00:00:00 2001 From: murashit Date: Wed, 24 Jun 2026 15:12:20 +0900 Subject: [PATCH] Suppress workspace panel restoration console warnings --- src/workspace/panel-coordinator.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/workspace/panel-coordinator.ts b/src/workspace/panel-coordinator.ts index e959d7ee..53ad7c2e 100644 --- a/src/workspace/panel-coordinator.ts +++ b/src/workspace/panel-coordinator.ts @@ -40,6 +40,8 @@ interface WorkspacePanelReconcileOptions { loadRestoredLeaves?: boolean; } +const ignoreWorkspacePanelLoadError = (): void => undefined; + export interface OpenCodexPanelSnapshot extends ChatPanelSnapshot { lastFocused: boolean; } @@ -163,9 +165,7 @@ export class WorkspacePanelCoordinator { const leaves = this.panelLeaves(); const foregroundLeaf = this.foregroundPanelLeaf(leaves, hintLeaf); if (foregroundLeaf) { - void this.hydratePanelLeaf(foregroundLeaf).catch((error: unknown) => { - console.warn("Codex Panel could not hydrate a foreground panel leaf.", error); - }); + void this.hydratePanelLeaf(foregroundLeaf).catch(ignoreWorkspacePanelLoadError); } if (options.loadRestoredLeaves) { @@ -393,8 +393,8 @@ export class WorkspacePanelCoordinator { if (this.workspacePanelReconcileSchedule.kind === "cancelled") return; try { await leaf.loadIfDeferred(); - } catch (error) { - console.warn("Codex Panel could not load a restored panel leaf.", error); + } catch { + ignoreWorkspacePanelLoadError(); } }