From 2482f76b308f089418a2b1f3cd23d4a4030f9af9 Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Thu, 28 Aug 2025 09:46:15 -0700 Subject: [PATCH 1/2] Work around Electron Windows command-line args quirk (#53510) Summary: Changelog: [Internal] Electron imposes a [strange undocumented limitation](https://github.com/electron/electron/pull/13039) on the format of command-line arguments, which for some reason only affects Windows. Basically, the command line is truncated after the first argument that looks like a URL. Electron's recommendation for avoiding this is to prefix the argument list with `--`, but I prefer switching to a different arg format (`--x=y` instead of `--x y`) that will prevent us from ever running into this issue. NOTE: I will follow up with a diff to harden arg parsing in our Electron code so that it only accepts the `--x=y` format. Differential Revision: D81237713 --- packages/dev-middleware/src/utils/DefaultBrowserLauncher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dev-middleware/src/utils/DefaultBrowserLauncher.js b/packages/dev-middleware/src/utils/DefaultBrowserLauncher.js index 1cfe3a1a2afe..dfe393c409f1 100644 --- a/packages/dev-middleware/src/utils/DefaultBrowserLauncher.js +++ b/packages/dev-middleware/src/utils/DefaultBrowserLauncher.js @@ -74,7 +74,7 @@ const DefaultBrowserLauncher = { windowKey: string, ): Promise { return await unstable_spawnDebuggerShellWithArgs( - ['--frontendUrl', url, '--windowKey', windowKey], + ['--frontendUrl=' + url, '--windowKey=' + windowKey], { mode: 'detached', flavor: process.env.RNDT_DEV === '1' ? 'dev' : 'prebuilt', From 87eb41947ee89bc15c6789f8274a79382726fc0a Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Thu, 28 Aug 2025 09:46:15 -0700 Subject: [PATCH 2/2] Auto-hide main menu on Windows/Linux Summary: Changelog: [Internal] TSIA Differential Revision: D81237715 --- packages/debugger-shell/src/electron/MainInstanceEntryPoint.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/debugger-shell/src/electron/MainInstanceEntryPoint.js b/packages/debugger-shell/src/electron/MainInstanceEntryPoint.js index 3434787d5f67..a7d0adeb3662 100644 --- a/packages/debugger-shell/src/electron/MainInstanceEntryPoint.js +++ b/packages/debugger-shell/src/electron/MainInstanceEntryPoint.js @@ -64,6 +64,8 @@ function handleLaunchArgs(argv: string[]) { // Icon for Linux icon: path.join(__dirname, 'resources', 'icon.png'), }); + // Auto-hide the Windows/Linux menu bar + frontendWindow.setMenuBarVisibility(false); } // Open links in the default browser instead of in new Electron windows.