Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(plugins): open browser login on install, never claim connected early
rubenluetke10-beepa601f4259eab
diff --git a/jarvis/ui/web/frontend/src/components/docs/DocsContent.test.tsx b/jarvis/ui/web/frontend/src/components/docs/DocsContent.test.tsxindex 99e5573a46..14f7867ab1 100644--- a/jarvis/ui/web/frontend/src/components/docs/DocsContent.test.tsx+++ b/jarvis/ui/web/frontend/src/components/docs/DocsContent.test.tsx@@ -56,7 +56,7 @@ describe("DocsContent", () => {);const openSpy = vi.spyOn(openExternal, "openExternalUrl")- .mockResolvedValue(undefined);+ .mockResolvedValue(true);const client = new QueryClient({defaultOptions: { queries: { retry: false, gcTime: 0 } },});diff --git a/jarvis/ui/web/frontend/src/components/docs/DocsOverview.test.tsx b/jarvis/ui/web/frontend/src/components/docs/DocsOverview.test.tsxindex 931756912a..2c44705d1e 100644--- a/jarvis/ui/web/frontend/src/components/docs/DocsOverview.test.tsx+++ b/jarvis/ui/web/frontend/src/components/docs/DocsOverview.test.tsx@@ -58,7 +58,7 @@ describe("DocsOverview", () => {);const openSpy = vi.spyOn(openExternal, "openExternalUrl")- .mockResolvedValue(undefined);+ .mockResolvedValue(true);renderOverview();diff --git a/jarvis/ui/web/frontend/src/lib/openExternal.test.ts b/jarvis/ui/web/frontend/src/lib/openExternal.test.tsnew file mode 100644index 0000000000..0b574e80e7--- /dev/null+++ b/jarvis/ui/web/frontend/src/lib/openExternal.test.ts@@ -0,0 +1,54 @@+import { afterEach, describe, expect, it, vi } from "vitest";++import { openExternalUrl } from "@/lib/openExternal";++afterEach(() => {+ vi.restoreAllMocks();+ vi.unstubAllGlobals();+});++describe("openExternalUrl", () => {+ it("reports true when the backend bridge opens the browser", async () => {+ vi.stubGlobal(+ "fetch",+ vi.fn(async () => ({+ ok: true,+ json: async () => ({ opened: true }),+ })) as unknown as typeof fetch,+ );+ const winOpen = vi.spyOn(window, "open").mockImplementation(() => null);+ await expect(openExternalUrl("https://example.test/auth")).resolves.toBe(true);+ expect(winOpen).not.toHaveBeenCalled();+ });++ it("falls back to a tab and reports whether one was created", async () => {+ vi.stubGlobal(+ "fetch",+ vi.fn(async () => ({+ ok: true,+ json: async () => ({ opened: false }),+ })) as unknown as typeof fetch,+ );+ const winOpen = vi+ .spyOn(window, "open")+ .mockImplementation(() => ({}) as unknown as Window);+ await expect(openExternalUrl("https://example.test/auth")).resolves.toBe(true);+ expect(winOpen).toHaveBeenCalledWith(+ "https://example.test/auth",+ "_blank",+ "noopener,noreferrer",+ );+ });++ it("reports false when the bridge misses and the popup blocker eats the tab", async () => {+ vi.stubGlobal(+ "fetch",+ vi.fn(async () => ({+ ok: true,+ json: async () => ({ opened: false }),+ })) as unknown as typeof fetch,+ );+ vi.spyOn(window, "open").mockImplementation(() => null);+ await expect(openExternalUrl("https://example.test/auth")).resolves.toBe(false);+ });+});diff --git a/jarvis/ui/web/frontend/src/lib/openExternal.ts b/jarvis/ui/web/frontend/src/lib/openExternal.tsindex 8eee8d4ae8..bc2af8ee40 100644--- a/jarvis/ui/web/frontend/src/lib/openExternal.ts+++ b/jarvis/ui/web/frontend/src/lib/openExternal.ts@@ -16,16 +16,22 @@* keep working — without depending on a shell-detection flag that can be unset.*/-function openInThisBrowser(url: string): void {- window.open(url, "_blank", "noopener,noreferrer");+function openInThisBrowser(url: string): Window | null {+ try {+ return window.open(url, "_blank", "noopener,noreferrer");+ } catch {+ return null;+ }}/**- * Open `url` in the user's browser. Resolves once dispatched; never throws.+ * Open `url` in the user's browser. Resolves true when a browser was+ * reached (backend bridge reported opened, or a fallback tab was created),+ * false otherwise. Never throws.* Tries the local bridge first, falls back to a `window.open` tab.*/-export async function openExternalUrl(url: string): Promise<void> {- if (!url) return;+export async function openExternalUrl(url: string): Promise<boolean> {+ if (!url) return false;try {const res = await fetch("/api/settings/open-external", {method: "POST",@@ -34,10 +40,15 @@ export async function openExternalUrl(url: string): Promise<void> {});if (res.ok) {const data = (await res.json().catch(() => null)) as { opened?: boolean } | null;- if (data?.opened) return;+ if (data?.opened) return true;}} catch {// Bridge unreachable — fall through to a best-effort window.open.}- openInThisBrowser(url);+ try {+ const tab = openInThisBrowser(url);+ return tab !== null;+ } catch {+ return false;+ }}diff --git a/jarvis/ui/web/frontend/src/views/PluginUploadDialog.tsx b/jarvis/ui/web/frontend/src/views/PluginUploadDialog.tsxindex edf2d25f4a..882c62d08b 100644--- a/jarvis/ui/web/frontend/src/views/PluginUploadDialog.tsx+++ b/jarvis/ui/web/frontend/src/views/PluginUploadDialog.tsx@@ -82,7 +82,7 @@ export function PluginUploadDialog({setError(null);try {const result = await uploadPlugin(picked);- await qc.invalidateQueries({ queryKey: ["marketplace", "plugins"] });+ await qc.invalidateQueries({ queryKey: ["marketplace-plugins"] });onInstalled?.(result.plugin.id);onClose();} catch (err) {diff --git a/jarvis/ui/web/frontend/src/views/PluginsCommunity.test.tsx b/jarvis/ui/web/frontend/src/views/PluginsCommunity.test.tsxindex 886dde5d4c..b26cc1b1ed 100644--- a/jarvis/ui/web/frontend/src/views/PluginsCommunity.test.tsx+++ b/jarvis/ui/web/frontend/src/views/PluginsCommunity.test.tsx@@ -79,13 +79,13 @@ function installFetchMock(overrides?: Partial<CommunityResponse>) {return fetchMock;}-function renderTab() {+function renderTab(props?: { onInstalled?: (name: string) => void }) {const qc = new QueryClient({defaultOptions: { queries: { retry: false } },});return render(<QueryClientProvider client={qc}>- <CommunityTab />+ <CommunityTab {...props} /></QueryClientProvider>,);}@@ -194,4 +194,20 @@ describe("CommunityTab", () => {await screen.findByText(/switched off in the configuration/i),).toBeDefined();});++ it("notifies the parent after install so it can start the browser login", async () => {+ installFetchMock();+ const onInstalled = vi.fn();+ renderTab({ onInstalled });+ await screen.findByText("TodoFox");++ fireEvent.click(screen.getAllByRole("button", { name: "Install" })[0]);+ const dialog = await screen.findByRole("dialog");+ const confirm = screen+ .getAllByRole("button", { name: "Install" })+ .find((b) => dialog.contains(b));+ fireEvent.click(confirm!);++ await waitFor(() => expect(onInstalled).toHaveBeenCalledWith("todo-fox"));+ });});diff --git a/jarvis/ui/web/frontend/src/views/PluginsCommunity.tsx b/jarvis/ui/web/frontend/src/views/PluginsCommunity.tsxindex 839bcc6cdf..c3541489df 100644--- a/jarvis/ui/web/frontend/src/views/PluginsCommunity.tsx+++ b/jarvis/ui/web/frontend/src/views/PluginsCommunity.tsx@@ -176,7 +176,7 @@ const AUTH_MODE_LABEL: Record<string, string> = {hosted_mcp_allowlist: "Account allowlist",};-export function CommunityTab() {+export function CommunityTab({ onInstalled }: { onInstalled?: (pluginName: string) => void } = {}) {const queryClient = useQueryClient();// The storefront section shows the same index with room to browse it; this// tab keeps the plugin connect flow next to the installed plugins.@@ -216,12 +216,15 @@ export function CommunityTab() {}return res.json();},- onSuccess: () => {+ onSuccess: (_data, name) => {setConsentPlugin(null);// The installed plugin is now a first-class store card — both lists- // must reflect it.+ // must reflect it. The parent then runs its connect flow at once, so a+ // fresh install lands on "Not connected → browser login" instead of+ // looking done before the provider was ever opened.queryClient.invalidateQueries({ queryKey: ["marketplace-community"] });queryClient.invalidateQueries({ queryKey: ["marketplace-plugins"] });+ onInstalled?.(name);},});diff --git a/jarvis/ui/web/frontend/src/views/PluginsView.test.tsx b/jarvis/ui/web/frontend/src/views/PluginsView.test.tsxindex b8a619c688..2491029137 100644--- a/jarvis/ui/web/frontend/src/views/PluginsView.test.tsx+++ b/jarvis/ui/web/frontend/src/views/PluginsView.test.tsx@@ -130,6 +130,32 @@ describe("PluginsView live badge", () => {});});+describe("PluginsView window catalog states connection in connection words", () => {+ it("says Connect/Connected, never Add/Added, so install and auth cannot mix", async () => {+ installCatalogFetchMock();+ const client = new QueryClient({+ defaultOptions: { queries: { retry: false }, mutations: { retry: false } },+ });+ render(+ <QueryClientProvider client={client}>+ <PluginsView inDialog />+ </QueryClientProvider>,+ );++ await waitFor(() => expect(screen.getByText("GitHub")).toBeDefined());+ expect(screen.getByText("Vercel")).toBeDefined();+ // Untouched card offers a connection, connected card names it. (The+ // window catalog buttons are labelled Connect/Disconnect.)+ expect(screen.getByRole("button", { name: "Connect" })).toBeDefined();+ expect(screen.getByRole("button", { name: "Disconnect" })).toBeDefined();+ expect(screen.getByText("Connect")).toBeDefined();+ expect(screen.getByText("Connected")).toBeDefined();+ // No install wording on connection buttons: "Installed" already names the+ // tab and the community badge, and "Added" read as done-before-authed.+ expect(screen.queryByText("Added")).toBeNull();+ });+});+// Regression: `/connect/start` takes ~0.6s with no other feedback, so a user// clicked the "+" several times and EACH click launched its own OAuth flow — a// burst of browser tabs + multiple DCR client registrations. The button must@@ -419,7 +445,7 @@ describe("PluginsView opens the PKCE pre-connect dialog", () => {});describe("PluginsView publishes OAuth success immediately", () => {- it("shows Gmail as connected while the catalog revalidation is still pending", async () => {+ it("opens a provisioned browser login at once and shows Gmail as connected", async () => {let catalogReads = 0;const fetchMock = vi.fn(async (input: RequestInfo | URL) => {const url = String(input);@@ -488,8 +514,9 @@ describe("PluginsView publishes OAuth success immediately", () => {await waitFor(() =>expect(screen.getByRole("button", { name: "Connect plugin" })).toBeDefined(),);+ // A provisioned browser flow opens the provider at once — no intermediate+ // setup form. (Unprovisioned flows still show the pre-connect dialog.)fireEvent.click(screen.getByRole("button", { name: "Connect plugin" }));- fireEvent.click(await screen.findByRole("button", { name: /^continue$/i }));await screen.findByText("Gmail connected");expect(diff --git a/jarvis/ui/web/frontend/src/views/PluginsView.tsx b/jarvis/ui/web/frontend/src/views/PluginsView.tsxindex 56d1b810de..c4f4b38faa 100644--- a/jarvis/ui/web/frontend/src/views/PluginsView.tsx+++ b/jarvis/ui/web/frontend/src/views/PluginsView.tsx@@ -622,8 +622,16 @@ export function PluginsView({ inDialog = false }: { inDialog?: boolean } = {}) {: { method: "POST" },);if (!res.ok) {- const err = await res.json().catch(() => ({ detail: `HTTP ${res.status}` }));- throw new Error(err.error_code ?? "unknown");+ const err = (await res.json().catch(() => ({ detail: `HTTP ${res.status}` }))) as {+ error_code?: string;+ error?: string;+ detail?: string;+ };+ // The backend serves `{detail}` for HTTP errors; OAuth handlers use+ // `{error_code}`. Prefer the code for known flows so the dialog can+ // map it, otherwise surface the human-readable detail instead of a+ // bare "unknown" (e.g. the 409 publisher-provisioning message).+ throw new Error(err.error_code ?? err.error ?? err.detail ?? `HTTP ${res.status}`);}return res.json() as Promise<{flow_id: string;@@ -677,9 +685,11 @@ export function PluginsView({ inDialog = false }: { inDialog?: boolean } = {}) {return false;}// Auto-open the pre-filled verify URL if available; user lands- // on the consent page with the code already typed in.+ // on the consent page with the code already typed in. Awaited so the+ // bridge dispatch happens before the dialog paints; when it reports+ // failure the dialog's manual link + retry button take over.if (verifyUrlComplete) {- void openExternalUrl(verifyUrlComplete);+ await openExternalUrl(verifyUrlComplete);}setDeviceSession({flowId: r.flow_id,@@ -696,7 +706,11 @@ export function PluginsView({ inDialog = false }: { inDialog?: boolean } = {}) {setConnectFailure("The sign-in page is unavailable. Please try again.");return false;}- void openExternalUrl(r.open_url);+ // Awaited: the bridge must dispatch before the pending dialog paints.+ // When neither the bridge nor a fallback tab reaches a browser (popup+ // blocker, headless host), the dialog keeps an explicit retry + a+ // copyable link instead of claiming a tab opened.+ await openExternalUrl(r.open_url);setOauthSession({flowId: r.flow_id,pluginId: r.plugin_id,@@ -713,7 +727,10 @@ export function PluginsView({ inDialog = false }: { inDialog?: boolean } = {}) {port_in_use: "The sign-in callback is busy. Close the other sign-in attempt and try again.",misconfigured: "Browser sign-in is pending publisher setup. No developer setup is required from you.",};- setConnectFailure(messages[code] ?? `Could not connect ${p.name}. Please try again. If this continues, check the service availability.`);+ // Known OAuth codes map to a short sentence; anything else is already a+ // backend-provided human-readable detail (e.g. the 409 provisioning+ // note) and is shown verbatim instead of a generic fallback.+ setConnectFailure(messages[code] ?? code);return false;}};@@ -758,15 +775,25 @@ export function PluginsView({ inDialog = false }: { inDialog?: boolean } = {}) {setConnectingPlugin(p);return;}- if (p.authMode === "oauth_pkce_loopback" ||- (p.authMode === "oauth_device_flow" && !p.browserReady)) {+ // The pre-connect dialog is only for browser flows whose shared client is+ // still pending (!browserReady): it explains the wait and offers the+ // collapsed expert token fallback. A provisioned browser flow (PKCE or+ // device) goes straight to /connect/start so the provider opens at once —+ // the standard is "Connect → provider opens", not "Connect → setup form".+ // An already-stored own OAuth client is still picked up by the backend's+ // resolve step, so skipping the form loses no expert path.+ if (+ (p.authMode === "oauth_pkce_loopback" || p.authMode === "oauth_device_flow") &&+ !p.browserReady+ ) {setPkceSetupPlugin(p);return;}if (p.authMode === "hosted_mcp_oauth_dcr" ||p.authMode === "local" ||- p.authMode === "oauth_device_flow"+ p.authMode === "oauth_device_flow" ||+ p.authMode === "oauth_pkce_loopback") {await startOAuthFlow(p);return;@@ -781,6 +808,28 @@ export function PluginsView({ inDialog = false }: { inDialog?: boolean } = {}) {);const handleDisconnect = (id: string) =>setDisconnectingPlugin(allPlugins.find((p) => p.id === id) ?? null);++ // A fresh install is never usable yet — installed ≠ connected. Bring the+ // new card into view and immediately run its connect flow, so the provider+ // opens in the browser and the card stays "Not connected" until the OAuth+ // callback completes AND the verification check passes. Never marks the+ // card connected optimistically.+ const handleFreshInstall = async (pluginId: string) => {+ setView("list");+ setListFilter("installed");+ try {+ const fresh = await fetchCatalog();+ qc.setQueryData<CatalogResponse>(["marketplace-plugins"], fresh);+ const found = fresh.plugins.map(adapt).find((p) => p.id === pluginId);+ if (found) {+ await handleConnect(found);+ return;+ }+ } catch {+ // Fall through to a plain refetch: the card still lands in Installed.+ }+ void qc.refetchQueries({ queryKey: ["marketplace-plugins"] });+ };const categoryOrder = useMemo(() => orderedCategories(data, allPlugins),[data, allPlugins],@@ -867,9 +916,9 @@ export function PluginsView({ inDialog = false }: { inDialog?: boolean } = {}) {<PluginUploadDialogopen={uploadOpen}onClose={() => setUploadOpen(false)}- onInstalled={() => {- setListFilter("installed");- void refetch();+ onInstalled={(id) => {+ setUploadOpen(false);+ void handleFreshInstall(id);}}/>@@ -997,7 +1046,7 @@ export function PluginsView({ inDialog = false }: { inDialog?: boolean } = {}) {<><BackLink label={translate("plugins_view.title")} onClick={() => setView("list")} /><div className="mt-5">- <CommunityTab />+ <CommunityTab onInstalled={(name) => void handleFreshInstall(name)} /></div></>,);@@ -1320,12 +1369,16 @@ function WindowConnectButton({ plugin, onConnect, onDisconnect }: { plugin: Plugelse await onConnect(plugin);} finally { setBusy(false); }};+ // Connection state in connection words, never install words: "Installed"+ // already names the marketplace tab and the community badge, so a connected+ // card saying "Added" read as done-before-authed. Connected says Connected,+ // untouched says Connect.return <button type="button" disabled={busy || Boolean(plugin.unavailableReason)} title={plugin.unavailableReason} onClick={() => void act()}aria-label={translate(connected ? "plugins_view.disconnect" : reconnect ? "plugins_view.reconnect" : "plugins_view.connect")}className={cn("flex shrink-0 items-center gap-1.5 rounded-full px-3 py-1.5 text-xs font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",connected ? "text-muted-foreground hover:bg-secondary" : "bg-secondary text-foreground hover:bg-accent-soft")}>{busy ? <Loader2 className="h-3.5 w-3.5 animate-spin" /> : connected ? <Check className="h-3.5 w-3.5 text-success" /> : reconnect ? <RotateCw className="h-3.5 w-3.5" /> : null}- {translate(connected ? "plugins_view.added" : reconnect ? "plugins_view.reconnect" : "plugins_view.add")}+ {translate(connected ? "plugins_view.status_connected" : reconnect ? "plugins_view.reconnect" : "plugins_view.connect")}</button>;}@@ -2133,25 +2186,23 @@ function OAuthRedirectDialog({Authorize {PRODUCT_NAME} in your browser</p><p className="mt-1 text-xs leading-relaxed text-muted-foreground">- A browser tab opened for {pluginName}. Sign in if prompted,- click "Authorize", then come back here.+ Continue in the browser tab for {pluginName} — sign in if+ prompted, click "Authorize", then come back here. No tab+ visible? Open it again or copy the link below. The plugin+ stays "Not connected" until you finish there.</p></div>- <a- href={openUrl}- target="_blank"- rel="noopener noreferrer"- onClick={(e) => {- e.preventDefault();- void openExternalUrl(openUrl);- }}- className="text-micro text-muted-foreground underline-offset-4 hover:text-foreground-strong hover:underline"+ <button+ type="button"+ onClick={() => void openExternalUrl(openUrl)}+ className="inline-flex items-center gap-1.5 rounded-full bg-primary px-3.5 py-1.5 text-xs font-semibold text-primary-foreground transition-all hover:bg-primary/90">- Tab didn't open? Click here- </a>+ Open {pluginName} again+ <ExternalLink className="h-3 w-3" />+ </button><CopyableUrlurl={openUrl}- hint="Still nothing? Copy this link and paste it into your browser's address bar."+ hint="Or copy this link and paste it into your browser's address bar."/></div>)}diff --git a/jarvis/ui/web/frontend/src/views/feedback/FeedbackView.test.tsx b/jarvis/ui/web/frontend/src/views/feedback/FeedbackView.test.tsxindex c8d135991b..d0ccc4fa9d 100644--- a/jarvis/ui/web/frontend/src/views/feedback/FeedbackView.test.tsx+++ b/jarvis/ui/web/frontend/src/views/feedback/FeedbackView.test.tsx@@ -106,7 +106,7 @@ describe("FeedbackView", () => {it("opens a bug on the bug issue form with every field prefilled", async () => {stubFeedbackApi(STATUS_NOT_CONFIGURED);- const openSpy = vi.spyOn(openExternal, "openExternalUrl").mockResolvedValue(undefined);+ const openSpy = vi.spyOn(openExternal, "openExternalUrl").mockResolvedValue(true);render(<FeedbackView />);const submit = await screen.findByRole("button", { name: "Report the bug on GitHub" });@@ -129,7 +129,7 @@ describe("FeedbackView", () => {it("opens a feature request on the feature issue form", async () => {stubFeedbackApi(STATUS_NOT_CONFIGURED);- const openSpy = vi.spyOn(openExternal, "openExternalUrl").mockResolvedValue(undefined);+ const openSpy = vi.spyOn(openExternal, "openExternalUrl").mockResolvedValue(true);render(<FeedbackView />);await probeSettled();@@ -157,7 +157,7 @@ describe("FeedbackView", () => {it("keeps a long report inside the URL budget and saves the full text", async () => {stubFeedbackApi(STATUS_NOT_CONFIGURED);- const openSpy = vi.spyOn(openExternal, "openExternalUrl").mockResolvedValue(undefined);+ const openSpy = vi.spyOn(openExternal, "openExternalUrl").mockResolvedValue(true);const writeText = vi.fn(async (_text: string) => undefined);vi.stubGlobal("navigator", { ...navigator, clipboard: { writeText } });@@ -180,7 +180,7 @@ describe("FeedbackView", () => {it("does not open the tracker for a question", async () => {stubFeedbackApi(STATUS_NOT_CONFIGURED);- const openSpy = vi.spyOn(openExternal, "openExternalUrl").mockResolvedValue(undefined);+ const openSpy = vi.spyOn(openExternal, "openExternalUrl").mockResolvedValue(true);render(<FeedbackView />);await probeSettled();@@ -202,7 +202,7 @@ describe("FeedbackView", () => {it("shows what others already asked for, without any login", async () => {stubFeedbackApi(STATUS_NOT_CONFIGURED, { board: FULL_BOARD });- const openSpy = vi.spyOn(openExternal, "openExternalUrl").mockResolvedValue(undefined);+ const openSpy = vi.spyOn(openExternal, "openExternalUrl").mockResolvedValue(true);render(<FeedbackView />);@@ -262,7 +262,7 @@ describe("FeedbackView", () => {context: { app_version: "1.0.8", os: "TestOS-1.0", python: "3.11.0" },};stubFeedbackApi(legacyStatus, { board: EMPTY_BOARD });- const openSpy = vi.spyOn(openExternal, "openExternalUrl").mockResolvedValue(undefined);+ const openSpy = vi.spyOn(openExternal, "openExternalUrl").mockResolvedValue(true);render(<FeedbackView />);const submit = await screen.findByRole("button", { name: "Report the bug on GitHub" });diff --git a/jarvis/ui/web/frontend/src/views/socials/SocialsView.test.tsx b/jarvis/ui/web/frontend/src/views/socials/SocialsView.test.tsxindex 2912d91a1a..d600fb9254 100644--- a/jarvis/ui/web/frontend/src/views/socials/SocialsView.test.tsx+++ b/jarvis/ui/web/frontend/src/views/socials/SocialsView.test.tsx@@ -82,7 +82,7 @@ describe("SocialsView (grouped, read-only)", () => {it("a single-link platform is a direct link; a multi-link platform is a button", async () => {const openSpy = vi.spyOn(openExternal, "openExternalUrl")- .mockResolvedValue(undefined);+ .mockResolvedValue(true);installFetchMock({"GET /api/socials": () => ({ body: { entries: [DISCORD, GITHUB_REPO, GITHUB_PROFILE] } }),});@@ -100,7 +100,7 @@ describe("SocialsView (grouped, read-only)", () => {it("clicking a multi-link platform opens a detail page listing all its links", async () => {const openSpy = vi.spyOn(openExternal, "openExternalUrl")- .mockResolvedValue(undefined);+ .mockResolvedValue(true);installFetchMock({"GET /api/socials": () => ({ body: { entries: [DISCORD, GITHUB_REPO, GITHUB_PROFILE] } }),});