From 1c9b6f51bc6589bfde7b979fd58645fb4bbad739 Mon Sep 17 00:00:00 2001 From: Raghav Chari Date: Mon, 17 Aug 2026 20:06:47 +0000 Subject: [PATCH] fix(reload): document restart from error page (382) The 'Something went wrong' Restart button was a no-op in the Amicode iframe because platform.restart only did window.location.reload without restarting the underlying opencode server. Upstream harmoniqs/opencode#210 fixes the app's restart to post amicode.restartServer to the extension host before reloading, so the server restarts and the panel recovers. The extension's allowlist already permits that command (chat_bridge), and this documents the trace so a future regression is diagnosable. Fixes https://github.com/harmoniqs/amicode/issues/382 Upstream: harmoniqs/opencode#210 --- packages/extension/src/extension.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/extension/src/extension.ts b/packages/extension/src/extension.ts index b2f0fe77..95760c3e 100644 --- a/packages/extension/src/extension.ts +++ b/packages/extension/src/extension.ts @@ -1638,6 +1638,10 @@ export async function activate(ctx: vscode.ExtensionContext): Promise { void vscode.window.showInformationMessage("Amicode: distilling recent sessions in the background."); }), vscode.commands.registerCommand("amicode.restartServer", async () => { + // Fix #382: error page's Restart now posts this from the iframe + // (opencode#210's entry.tsx posts amicode.restartServer before reload); + // the bridge allowlist already permits it, so the server restart here + // clears the "Something went wrong" state instead of being a no-op. opencodeChannel.appendLine(`[boot] restart requested`); // Fleet client: no local server to restart — just re-probe the tunnel if (binary !== undefined && isFleetClientGuard(binary)) {