Skip to content

fix(web): keep a paired browser's UI zoom setting from zooming the desktop - #52390

Merged
nwparker merged 1 commit into
stablyai:mainfrom
yeong-chae:yeong-chae/web-ui-zoom-stay-local
Nov 29, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
yeong-chae:yeong-chae/web-ui-zoom-stay-local

Conversation

@yeong-chae

@yeong-chae yeong-chae commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When you opened Orca in a web browser paired with your desktop, Settings showed a "UI zoom" row. Pressing + changed the number in the row, but the browser page stayed the same size. Instead, the desktop app quietly got zoomed, where the person at the browser could not see it. Now the browser keeps that setting to itself, the desktop ignores zoom changes sent from a browser, and the row is hidden in the browser. To zoom a browser page, use the browser's own zoom (Cmd/Ctrl +/-).

What Changed

  • Before: in a paired browser, Settings > Appearance > UI zoom changed the number in the row but did not scale the page. The web client's ui.set sent uiZoomLevel to the host, and the host saved it as the desktop's app-wide zoom. The Agent Dashboard popout and Space windows followed the change right away (onUIChanged), and the desktop's main window came back zoomed after a reload or restart.
  • After: a paired browser's UI zoom never reaches the desktop, and the browser's Settings page has no UI zoom row. Desktop UI zoom works as before.
  • Mechanism:
    • uiZoomLevel is added to PAIRING_LOCAL_UI_FIELDS (src/shared/remote-runtime/pairing/pairing-local-ui-fields.ts), the shared list of per-device UI fields such as sidebarOpen. That one list drives both ends: the web client strips listed fields before ui.set and keeps them in browser storage, and the host drops them from ui.set and leaves them out of ui.get for paired callers (omitPairingLocalUiFields / uiForCaller).
    • mergeHostWebUIState pins the browser's local uiZoomLevel (its satisfies Record<PairingLocalUiField, unknown> check requires every listed key), so an older host that still echoes its zoom cannot overwrite the browser's value. mergeOsc52ClipboardNoticePending now takes PairedUiState for the incoming host state, which is what it actually receives.
    • getZoomEntries() returns no entries when isWebClientLocation() is true, the same check other desktop-only settings use. That hides the row in AppearanceInterfaceSection and removes it from Appearance and global settings search, so search and the visible rows stay consistent.

Why

The root cause is that uiZoomLevel was treated as shared host state even though it describes one window. The web preload's setZoomLevel only keeps the number in memory and nothing applies it to the page, so in a browser the row's only effect was rescaling the desktop. Fixing the field's classification at the shared list fixes every direction at once (new and old clients, new and old hosts) instead of just hiding the button.

Alternatives considered:

  • Make the row zoom the browser page with CSS. Browsers already have page zoom, and a second zoom would stack on top of it.
  • Only hide the row. ui.set would still carry the field, so older web clients could still change the desktop's zoom, and an older host's ui.get would still copy its zoom into the browser.

Linked Issue

Fixes #52388

Visual Proof

Paired browser, Settings > Appearance, in a real isolated dev instance (headless Chromium, 1280x860), captured by the original author:

Before (main) After (this PR)
Paired browser Appearance settings with a UI zoom row at 120% after pressing + twice; the page itself is not scaled
UI zoom row at 120% after + twice, page not scaled
Paired browser Appearance settings with no UI zoom row
No UI zoom row

Desktop main window after a reload, following the browser steps above:

Before (main) After (this PR)
Desktop main window drawn at 120% after a reload
120% (uiZoomLevel 1)
Desktop main window at 100% after a reload
100% (uiZoomLevel 0)

Component fixture of AppearanceInterfaceSection (reviewer re-capture), web client vs desktop:

Before (main) After (this PR)
Paired browser Paired browser Appearance section on main with the UI zoom row Paired browser Appearance section with this PR, no UI zoom row
Desktop Desktop Appearance section on main with the UI zoom row Desktop Appearance section with this PR, UI zoom row unchanged

Testing

  • Real app (macOS, original author): isolated dev instance (temporary HOME/userData, ORCA_BACKGROUND_LAUNCH=1), browser pairing link opened in headless Chromium, both sides driven over CDP.

    • On main: pressing + twice in the browser moved the row from 100% to 120% while the page did not scale (devicePixelRatio 1). The desktop's saved uiZoomLevel went 0 -> 1, and after a reload the desktop window drew at 120%.
    • With this PR: no row in the browser. Calling window.api.ui.set({ uiZoomLevel: 1 }) (what the + button did) changed only the browser's value; the desktop's saved and live zoom stayed 0, and it stayed at 100% after a reload.
  • Reproduced in review on macOS: the new test fails on main (the ui.set payload includes "uiZoomLevel": 2) and passes here. A scratch run of the host-side strip on {uiZoomLevel: 1, editorFontZoomLevel: 1} returned the payload unchanged on main and {editorFontZoomLevel: 1} on this branch. Fixture screenshots above compare web client vs desktop.

  • New src/renderer/src/web/preload-api/preferences/web-ui-api.test.ts: sets uiZoomLevel and editorFontZoomLevel together, checks ui.set sends only editorFontZoomLevel, and checks an older host echoing uiZoomLevel: 0 on ui.get does not overwrite the browser's 2.

  • Targeted vitest (web preferences, pairing, settings appearance/search, main runtime RPC), oxlint, oxfmt, anti-slop, native code-quality plugins, ast-grep and the changed-code quality gate are all clean on the 5 changed files.

  • Not tested: Windows/Linux (no platform-specific code), the mobile app (never reads or writes uiZoomLevel), the dashboard popout and Space window live while the browser changed zoom.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns

Performance

None, because no hot path is touched. omitPairingLocalUiFields is a Set lookup that runs once per web ui.set/ui.get RPC; one more entry measured the same (120-126 vs 125-145 ns typical, 86-95 vs 85-94 us on a 590-key payload, noise). getZoomEntries adds one isWebClientLocation() check (~1.4 ns) when Appearance or settings search builds its entries, called the same number of times as before. No store, selector or cache changes, so nothing fans out with the number of tabs (0 extra calls per update at N=200, old and new).

Risk

The riskiest part is dropping the field at the RPC boundary across versions:

  • Older web client, new host: the host strips uiZoomLevel from ui.set (the schema still accepts it, so the rest of the payload is applied) and omits it from ui.get. The old browser's row only changes its own stored number.
  • New web client, older host: the client never sends the field, and the merge keeps the browser's value against the host's echo. The new test covers this.
  • Desktop: sets zoom over IPC, not this RPC, so nothing changes. Mobile: never uses uiZoomLevel. Remote server pairing: a desktop connected to a remote host only reads workspaceStatuses from ui.get.

Known limits: a desktop that a browser already zoomed stays zoomed until reset on the desktop, and a stale uiZoomLevel in browser storage has no visible effect. A plain revert backs this out; no saved data changes shape.

Level: Low

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

  • Cross-platform: no platform-specific code.
  • The Appearance pane summary ("Theme, zoom, ...") is shared with the desktop and left unchanged.

Original fix by @yeong-chae in #52390.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@greptile-apps

greptile-apps Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge; browser zoom stays local and desktop zoom keeps its existing path.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; browser zoom stays local and desktop zoom keeps its existing path.

Summary

Keeps a paired browser’s UI zoom separate from the desktop’s zoom.

  • Paired browser zoom no longer changes the desktop.
  • Paired browsers no longer show or search for the UI zoom row.

No actionable issues found. Tests and visual checks were not run during this review.

Reviews (2) · Last reviewed commit: "fix(web): keep a paired browser's UI zoo..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Web clients no longer show the UI zoom setting. Pairing now treats uiZoomLevel as a local field, and host-state merging preserves the browser’s local value. A test checks that web API updates send editor font zoom without UI zoom and that a host response does not replace the local zoom value.

Severity of issue fixed: Medium

Merge Risk: Minimal · up to f8adc

This change keeps a paired browser's UI zoom local so it no longer changes the desktop's zoom, and it hides the browser's UI zoom setting. No concrete merge-blocking risk was identified, and the author reports that the added test and the checks pass.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a paired browser's UI zoom setting no longer changes the desktop app's zoom. It uses the fix(web) prefix and matches the changeset, which adds uiZoomLevel to the pairi…
Description check Passed The description follows the repository template closely. It has ELI5, What Changed (before/after and mechanism), Why (with alternatives), a linked issue (Fixes #52388), Visual Proof with before/after …
Linked Issues check Passed Issue #52388 requires that changing UI zoom in a paired browser no longer changes the desktop zoom, while the desktop's own zoom keeps working. At head, src/shared/remote-runtime/pairing/pairing-local…
Out of Scope Changes check Passed All changed files in the summary relate to the linked objective. pairing-local-ui-fields.ts adds the field to the shared pairing-local list. web-ui-state.ts changes the mergeOsc52ClipboardNoticePendin…
Full details: Title check

Explanation

The title names the main change: a paired browser's UI zoom setting no longer changes the desktop app's zoom. It uses the fix(web) prefix and matches the changeset, which adds uiZoomLevel to the pairing-local fields and hides the zoom row in the web client.

Full details: Description check

Explanation

The description follows the repository template closely. It has ELI5, What Changed (before/after and mechanism), Why (with alternatives), a linked issue (Fixes #52388), Visual Proof with before/after images, detailed Testing with platform scope (macOS only, with untested areas listed), a Performance line, a Risk section with level and revert plan, AI Disclosure, and the checklist. The Testing section names macOS as the only tested platform, and the Visual Proof section has before/after tables. The description is complete and specific.

Full details: Linked Issues check

Explanation

Issue #52388 requires that changing UI zoom in a paired browser no longer changes the desktop zoom, while the desktop's own zoom keeps working. At head, src/shared/remote-runtime/pairing/pairing-local-ui-fields.ts includes 'uiZoomLevel' in PAIRING_LOCAL_UI_FIELDS, with a comment that a browser's choice would rescale desktop windows. The list is typed with satisfies readonly (keyof PersistedUIState)[], and PairedUiState omits its fields, so the list drives the pairing-local handling. The raw summary describes the related wiring: web ui.set strips the fields, host ui.set drops them, host ui.get omits them for paired callers, mergeHostWebUIState pins the browser value, and getZoomEntries() returns no entries when isWebClientLocation() is true. The previous assessment also read the head state of appearance-search.ts. The incremental diff from the previous reviewed head could not be read, so the code changes since that review are not directly confirmed. The conclusion rests on the head list file, the summary, and the prior assessment. The author's macOS run reports the desktop zoom stayed at 0 after browser-side ui.set. The added web-ui-api.test.ts is reported to fail without the change and pass with it; that test was not read directly. The #52388 requirement is a coding requirement and is covered by the head code evidence.

Full details: Out of Scope Changes check

Explanation

All changed files in the summary relate to the linked objective. pairing-local-ui-fields.ts adds the field to the shared pairing-local list. web-ui-state.ts changes the mergeOsc52ClipboardNoticePending incoming type to PairedUiState, which is needed because PairedUiState no longer carries the required uiZoomLevel. appearance-search.ts and AppearanceInterfaceSection.tsx hide the browser zoom row and its search entries. web-ui-api.test.ts covers the new ui.set and older-host merge behavior. The PR does not change the Appearance page summary text. The author states this is deliberate, so it is not out-of-scope work. The incremental diff could not be read, so no new out-of-scope change since the previous review was confirmed or ruled out.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 669ed91f-29d2-46bb-82c3-40795760be7d
Commits

Reviewing files that changed from the base of the PR and between fc86343 and f8adc77.

Files selected for processing: 1

  • src/renderer/src/components/settings/appearance/appearance-search.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

…sktop

The web client sent uiZoomLevel to the host with every ui.set, so pressing
the UI zoom buttons in a paired browser rescaled the desktop's dashboard and
workspace windows right away and its main window on the next reload, while
the browser page itself never changed size.

Treat uiZoomLevel as a pairing-local UI field like sidebarOpen: the web
client keeps it in the browser, the host neither accepts it from nor returns
it to a paired caller, and the web settings page hides the UI zoom row because
a browser zooms with its own page zoom.

Fixes stablyai#52388

Co-authored-by: Neil <[email protected]>
@nwparker
nwparker force-pushed the yeong-chae/web-ui-zoom-stay-local branch from fc86343 to f8adc77 Compare November 29, 2026 10:24
@nwparker
nwparker merged commit b4640b3 into stablyai:main Nov 29, 2026
100 of 102 checks passed
@yeong-chae
yeong-chae deleted the yeong-chae/web-ui-zoom-stay-local branch November 29, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Changing UI zoom in a paired browser zooms the desktop app instead

2 participants