From 25cf3d3930eb8d92fd245e126b27e18046cd7f91 Mon Sep 17 00:00:00 2001 From: Jiang Bohan Date: Tue, 21 Apr 2026 15:53:17 +0800 Subject: [PATCH] fix(desktop): default shareable URL to localhost web in dev The renderer's navigation adapter fell back to https://multica.ai when VITE_APP_URL was unset (i.e. desktop dev builds), so "Copy link" in a dev build produced a production URL instead of one pointing at the running dev web frontend. Match the fallback used by pages/login.tsx (http://localhost:3000) so dev links stay on the dev host. --- apps/desktop/src/renderer/src/platform/navigation.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/desktop/src/renderer/src/platform/navigation.tsx b/apps/desktop/src/renderer/src/platform/navigation.tsx index df9f148da..efe14fe6e 100644 --- a/apps/desktop/src/renderer/src/platform/navigation.tsx +++ b/apps/desktop/src/renderer/src/platform/navigation.tsx @@ -15,10 +15,11 @@ import { } from "@/stores/tab-store"; import { useWindowOverlayStore } from "@/stores/window-overlay-store"; -// Public web app URL — injected at build time via .env.production. Falls -// back to the production host for dev builds so "Copy link" yields a URL -// that actually points somewhere a teammate can open. -const APP_URL = import.meta.env.VITE_APP_URL || "https://multica.ai"; +// Public web app URL — injected at build time via .env.production. In dev +// (no VITE_APP_URL set) falls back to the local web dev server so "Copy +// link" in a dev build yields a URL that points at the running dev +// frontend, not the prod host. Matches the fallback used in pages/login.tsx. +const APP_URL = import.meta.env.VITE_APP_URL || "http://localhost:3000"; /** * Extract the leading workspace slug from a path, or null if the path isn't