@devries-cameron20 / t3code Mirror · read-only / commits / 30448e37e9
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 23, 01:45 UTC

fix(desktop): built-in browser sites can no longer post notifications without permission (#20237)

Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

fixfon committed Oct 19, 2026 at 08:48 UTC 30448e37e98344764d4e81a7efc843c2c02cf247
2 files changed +3 -3
apps/desktop/src/preview/BrowserSession.test.ts
+1 -2
@@ -180,7 +180,6 @@ describe("BrowserSession", () => {
180 for (const permission of [
181 "clipboard-read",
182 "clipboard-sanitized-write",
183 - "notifications",
183 "geolocation",
184 "fullscreen",
185 ]) {
@@ -194,7 +193,7 @@ describe("BrowserSession", () => {
193 // `clipboard-write` is not a real Electron permission — the async write API
194 // uses `clipboard-sanitized-write` — so the stale name must not be granted,
195 // and unrelated permissions stay denied.
197 - for (const permission of ["clipboard-write", "midi"]) {
196 + for (const permission of ["clipboard-write", "notifications", "midi"]) {
197 assert.isFalse(requestAllows(permission), `request handler should deny ${permission}`);
198 assert.isFalse(
199 checkHandler(null, permission) as boolean,
apps/desktop/src/preview/BrowserSession.ts
+2 -1
@@ -33,7 +33,6 @@ export type BrowserSessionPartitionNamespace = "profile";
33 const ALLOWED_PREVIEW_PERMISSIONS: ReadonlySet<string> = new Set([
34 "clipboard-read",
35 "clipboard-sanitized-write",
36 - "notifications",
36 "geolocation",
37 // `DesktopWindow` disables HTML fullscreen window resizing for the app window
38 // and every preview guest, so a page that goes fullscreen fills its own
@@ -42,6 +41,8 @@ const ALLOWED_PREVIEW_PERMISSIONS: ReadonlySet<string> = new Set([
41 // Deliberately NOT local-fonts: preview sessions run untrusted web content,
42 // and silently granting it would hand every page the user's installed-font
43 // fingerprint (and font file bytes via FontData.blob()).
44 + // Deliberately NOT notifications: a page could post OS notifications branded
45 + // as T3 Code. T3's own come from the app window on the default session.
46 ]);
47
48 const NEVER_EXTERNAL_PROTOCOLS: ReadonlySet<string> = new Set([