@devries-cameron20 / t3code-1 / commits / 515330058a
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(desktop): browser tabs no longer report loopback access as denied (#22835)

Co-authored-by: afrojun <1935642+afrojun@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: maria-rcks <maria@kuuro.net>

Arjun Radhakrishnan committed Oct 31, 2026 at 01:24 UTC 515330058a07edd025954ebce22d8c8e52f72bdd
2 files changed +16 -3
apps/desktop/src/preview/BrowserSession.test.ts
+14 -3
@@ -145,7 +145,7 @@ describe("BrowserSession", () => {
145 }).pipe(Effect.provide(layer)),
146 );
147
148 - it.effect("grants clipboard-sanitized-write through both the request and check handlers", () =>
148 + it.effect("grants preview permissions through both the request and check handlers", () =>
149 Effect.gen(function* () {
150 const browserSessions = yield* BrowserSession.BrowserSession;
151 const partition = yield* browserSessions.getPartition("scope-a");
@@ -168,7 +168,12 @@ describe("BrowserSession", () => {
168 return granted;
169 };
170
171 - for (const permission of ["clipboard-sanitized-write", "geolocation", "fullscreen"]) {
171 + for (const permission of [
172 + "clipboard-sanitized-write",
173 + "geolocation",
174 + "fullscreen",
175 + "loopback-network",
176 + ]) {
177 assert.isTrue(requestAllows(permission), `request handler should allow ${permission}`);
178 assert.isTrue(
179 checkHandler(null, permission) as boolean,
@@ -179,7 +184,13 @@ describe("BrowserSession", () => {
184 // `clipboard-write` is not a real Electron permission — the async write API
185 // uses `clipboard-sanitized-write` — so the stale name must not be granted,
186 // and unrelated permissions stay denied.
182 - for (const permission of ["clipboard-write", "notifications", "midi"]) {
187 + for (const permission of [
188 + "clipboard-write",
189 + "notifications",
190 + "midi",
191 + "local-network",
192 + "local-network-access",
193 + ]) {
194 assert.isFalse(requestAllows(permission), `request handler should deny ${permission}`);
195 assert.isFalse(
196 checkHandler(null, permission) as boolean,
apps/desktop/src/preview/BrowserSession.ts
+2
@@ -24,6 +24,8 @@ const ALLOWED_PREVIEW_PERMISSIONS: ReadonlySet<string> = new Set([
24 "geolocation",
25 // DesktopWindow confines HTML fullscreen to the guest's webview.
26 "fullscreen",
27 + // Loopback requests already succeed in Electron 44; permission-aware sign-in widgets query first.
28 + "loopback-network",
29 // Deny local-fonts to untrusted previews: it exposes installed-font fingerprints and file bytes.
30 // Deny notifications: pages could impersonate T3 Code; app notifications use the default session.
31 ]);