chore(desktop): drop debug console.logs from launch-mode reset flow

The console.log breadcrumbs added while diagnosing the menu also
caused an uncaught "write EPIPE" when the parent terminal pipe was
already closed by the time the user clicked Change Launch Mode.
Now that the flow is verified working, remove the chatter and keep
only the actual error-path logging.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-05-17 23:32:10 -07:00
parent dde2d062f0
commit 8b50b754cd
3 changed files with 2 additions and 18 deletions

View File

@@ -71,7 +71,6 @@ export function getCurrentDesktopLaunchMode(): DesktopLaunchMode {
}
async function resetLaunchModeAndReload(window: BrowserWindow): Promise<void> {
console.log("[desktop/main] resetLaunchModeAndReload start");
try {
const settings = await readShellSettings();
settings.desktopMode = null;
@@ -96,13 +95,10 @@ async function resetLaunchModeAndReload(window: BrowserWindow): Promise<void> {
// serverBaseUrl / shellMode query params so the gate re-prompts.
try {
if (isUrlRenderer()) {
console.log("[desktop/main] reloading URL renderer", getRendererUrl());
await window.loadURL(getRendererUrl());
} else {
console.log("[desktop/main] reloading file renderer", getRendererFilePath());
await window.loadFile(getRendererFilePath());
}
console.log("[desktop/main] resetLaunchModeAndReload complete");
} catch (error) {
console.error("[desktop/main] reload failed", error);
}

View File

@@ -18,11 +18,7 @@ function buildConnectionSubmenu(options: AppMenuOptions): MenuItemConstructorOpt
{
label: "Change Launch Mode…",
click: () => {
console.log("[desktop/menu] Change Launch Mode clicked");
if (!options.onChangeLaunchMode) {
console.warn("[desktop/menu] onChangeLaunchMode callback not provided");
return;
}
if (!options.onChangeLaunchMode) return;
void Promise.resolve(options.onChangeLaunchMode()).catch((error: unknown) => {
console.error("[desktop/menu] onChangeLaunchMode failed", error);
});