From 3272c29c2eb363ee0a18e268a009f9c4c48d14da Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Wed, 25 Mar 2026 18:51:43 +0100 Subject: [PATCH] fix(cli): include path in dev URL and use open.default for browser - Append &path= to the printed/opened URL when --path is specified - Use open.default(url) instead of open.openApp for more reliable browser opening Co-Authored-By: Claude Opus 4.6 (1M context) --- cli/src/commands/dev/dev.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/src/commands/dev/dev.ts b/cli/src/commands/dev/dev.ts index fef06442fa..3419475f2c 100644 --- a/cli/src/commands/dev/dev.ts +++ b/cli/src/commands/dev/dev.ts @@ -636,11 +636,12 @@ export async function dev(opts: GlobalOptions & SyncOptions & DevOpts) { const port = await getPort.default({ port: PORT }); const url = `${workspace.remote}dev?workspace=${workspace.workspaceId}&local=true&wm_token=${workspace.token}` + - (port === PORT ? "" : `&port=${port}`); + (port === PORT ? "" : `&port=${port}`) + + (opts.path ? `&path=${opts.path}` : ""); console.log(`Go to ${url}`); try { - open.openApp(open.apps.browser, { arguments: [url] }).catch((error) => { + open.default(url).catch((error) => { console.error( `Failed to open browser, please navigate to ${url}, error: ${error}` );