mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-05 13:29:44 +02:00
* fix(desktop): derive appUrl from apiUrl in dev so copy-link follows the connected env Local desktop dev was hardcoding appUrl to http://localhost:3000, so the "Copy issue link" output pointed at localhost even when the renderer was connected to a remote (e.g. test) backend — the resulting URL only worked on the developer's machine. - runtime-config dev path now mirrors the production loader: when VITE_APP_URL is unset, derive appUrl from apiUrl (host-only). The localhost api host is special-cased to keep the local web port (3000), while a remote api host (api.test.x) yields a remote appUrl. - Web navigation adapter now implements getShareableUrl directly with window.location.origin instead of leaving it undefined. - NavigationAdapter.getShareableUrl is now required; copyLink callers drop the window.location fallback branch and call it unconditionally. - Add the missing getShareableUrl mock in issue-detail.test.tsx. Co-authored-by: multica-agent <github@multica.ai> * fix(desktop): strip leading api. label when deriving appUrl Address Emacs' code review on PR #2298. The previous derivation kept the api hostname unchanged, so VITE_API_URL=https://api.test.multica.ai produced appUrl=https://api.test.multica.ai — not the env's actual web URL. Multica's convention exposes the api at api.<web-host>; strip that leading label (when the host has at least 3 labels, to avoid mangling short hosts like api.local) so a single api configuration produces the correct shareable web origin. - api.multica.ai → multica.ai - api.test.multica.ai → test.multica.ai - api-staging.x.com → unchanged (no leading "api." label) - congvc-x99.ts.net → unchanged Update both the dev and production tests; also fix the existing runtime-config-loader test that asserted the unstripped value. Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: multica-agent <github@multica.ai>