From 6ea7514f5e9e2c129b0abd68c0e7f3b9deeb3151 Mon Sep 17 00:00:00 2001 From: nvtoan0201-swe Date: Wed, 30 Sep 2026 11:48:59 +0700 Subject: [PATCH] fix: normalize a typed browser address before opening a session BrowserScreen posted the raw text from Open session, while the in-session address bar and the computer sheet both run browserAddress first. The server requires an absolute URL, so typing copilotkit.ai failed validation even though the same text works everywhere else. Normalize the address before the request; browserAddress already covers schemes, credentials, and malformed input in its own tests. --- apps/mobile/src/screens.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/mobile/src/screens.tsx b/apps/mobile/src/screens.tsx index 86ba851d5..364760ead 100644 --- a/apps/mobile/src/screens.tsx +++ b/apps/mobile/src/screens.tsx @@ -39,6 +39,7 @@ import type { EmailDraft, } from "../../../packages/domain/src"; import { API_URL } from "./api"; +import { browserAddress } from "./browser-address"; import { localDateTime, zonedInstant } from "./date-time"; import { Button, @@ -828,7 +829,9 @@ export function BrowserScreen() { setError(""); setBusy(true); try { - const browser = await api.request("/api/browsers", { url }); + const browser = await api.request("/api/browsers", { + url: browserAddress(url), + }); await refresh(); setUrl(""); open({ type: "browser", browser });