t3code icon indicating copy to clipboard operation
t3code copied to clipboard

Browser tabs in the right panel ignore the Integrations default zoom and appearance

Open KiKaraage opened this issue 1 month ago • 1 comments

What happened

Every browser tab opened in the right panel starts at 100% zoom and renders in light mode, even though Settings → Integrations has "Default browser zoom" = 80% and "Default browser appearance" = System, the OS is in dark mode, and the app itself renders dark (Appearance → System).

https://github.com/user-attachments/assets/d318b688-b3d1-4ddb-8895-2d0f6d152b36

This is not specific to any one site or entry point: it happens for tabs opened by clicking a link in the chat and for tabs opened with the browser panel's new-tab button. Zoom has to be reset by hand on every new tab, and each tab's appearance has to be toggled away from "System" and back before the page follows the OS scheme.

Diagnosis

The Integrations defaults are read and applied when the Electron tab is created, but the tab is created with runtime: "server", and for server-runtime tabs the desktop re-asserts the server snapshot's zoom and appearance. The server never populates those fields, so they fall back to 100% and "system":

  • apps/web/src/browser/previewRuntime.ts:13 — previewRuntimeFor() returns "server" for the primary environment in the desktop app, so every tab the client opens is a server tab.
  • packages/contracts/src/preview.ts:185 — PreviewOpenInput has no zoom or appearance field, and apps/server/src/preview/Manager.ts:183 stores the tab snapshot without zoomFactor / colorScheme.
  • apps/web/src/browser/ElectronBrowserHost.tsx:133 — for every server tab the desktop passes serverRendering: { colorScheme: snapshot.colorScheme ?? "system", zoomFactor: snapshot.zoomFactor ?? 1 }.
  • apps/web/src/browser/HostedBrowserWebview.tsx:125-134 — those values are applied unconditionally through setColorScheme / setZoomFactor, overwriting the defaults that apps/web/src/browser/desktopTabLifetime.ts:56 had just applied at creation.

So the client's browser defaults never reach a server-runtime tab, which is why the symptom is independent of entry point and site.

The appearance half is the light-mode behaviour already reported in #17732: an explicit "system" override applied at tab creation leaves the guest on the light scheme until the appearance is changed away and back. This report generalises it (zoom is affected too) and points at the shared cause.

The settings are persisted correctly, so this is not a settings-write problem — client-settings.json contains:

"browserDefaultAppearance": "system",
"browserDefaultZoomFactor": 0.8,

Steps to reproduce

  1. OS in dark mode. T3 Code Appearance → System. Settings → Integrations → "Default browser zoom" = 80%, "Default browser appearance" = System.
  2. Open the browser panel for a thread and create a new tab (any URL).
  3. The tab's zoom indicator reads 100% and the page renders in light mode.
  4. Open the tab's ⋮ menu → Appearance → pick "Dark", then "System" again. The page now renders dark and follows the OS scheme.
  5. Create another tab: it is light and at 100% again. Repeating step 4 is required per tab; zoom has to be corrected per tab by hand.

Version

0.1.2 (desktop AppImage, regular release)

Environment

Fedora 44, kernel 7.2.11, GNOME on Wayland, T3 Code desktop AppImage against a local server, Node v26.12.1. The t3 triage CLI that ran the investigation is 0.1.2 as well (that is only the CLI's version).

Evidence

~/.t3/userdata/client-settings.json (redacted, browser keys only):

"browserAutoShowFloatingPreview": true,
"browserDefaultAppearance": "system",
"browserDefaultProfileId": "default",
"browserDefaultViewport": { "_tag": "fill" },
"browserDefaultZoomFactor": 0.8

~/.t3/userdata/logs/desktop.trace.ndjson shows PreviewManager.createTab followed by PreviewManager.setColorScheme / PreviewManager.applyColorScheme for each tab open, i.e. the appearance is pushed onto the tab right after creation rather than being left to the creation defaults.

Related issues

  • #17732 — same light-mode symptom in browser tabs (macOS, confirmed on 0.1.2-nightly.20261021.3499). Not a duplicate: that report covers appearance only and has no cause; this one adds the zoom default, which has no report of its own, and identifies the shared server-runtime path.
  • #19119 — "System" appearance stays light on KDE Plasma Wayland. Different surface: that is the app chrome / Electron nativeTheme, not the browser tab.

Fix applied or workaround

No local patch applied. Only per-tab workarounds: ⋮ → Appearance → Dark → System makes the page follow the OS scheme, and zoom has to be set per tab. Neither carries over to new tabs.

Filed by

CodeBuddy Code (deepseek-v4.1-flash) via t3 triage.

KiKaraage avatar Oct 25 '26 15:10 KiKaraage

I'm working on this issue.

BilalIrfanContact avatar Oct 27 '26 08:10 BilalIrfanContact