From 75dfe26ceaf3f06e04054f4b61df2bca0b087818 Mon Sep 17 00:00:00 2001 From: unsupportedpastels Date: Wed, 7 Oct 2026 18:53:43 +0000 Subject: [PATCH] fix(desktop): default UI Scale to 100% and keep chat text at 110% Fresh installs opened at 90% window zoom, and View > Actual Size (Ctrl/Cmd+0) reset to 90% rather than actual size. Ship 100% as the default UI Scale; Chat Text Size keeps its 110% default. --- apps/desktop/DESIGN.md | 2 +- apps/desktop/e2e/fixtures.ts | 9 ++++----- apps/desktop/electron/zoom.test.ts | 4 ++++ apps/desktop/electron/zoom.ts | 3 ++- apps/desktop/src/store/zoom.ts | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/apps/desktop/DESIGN.md b/apps/desktop/DESIGN.md index 0259f65f77..c51e0950cd 100644 --- a/apps/desktop/DESIGN.md +++ b/apps/desktop/DESIGN.md @@ -346,7 +346,7 @@ so glass and message-bubble transparency do not reveal scrolling text. ## Chat typography -Appearance → Typography keeps **UI Scale** as whole-window zoom (90% by +Appearance → Typography keeps **UI Scale** as whole-window zoom (100% by default). **Chat Text Size** is a separate desktop-local multiplier (110% by default) on conversation text and the composer editor, including floating and inline-edit composers. diff --git a/apps/desktop/e2e/fixtures.ts b/apps/desktop/e2e/fixtures.ts index 674d6f5508..bef7e304b5 100644 --- a/apps/desktop/e2e/fixtures.ts +++ b/apps/desktop/e2e/fixtures.ts @@ -133,11 +133,10 @@ export function createSandbox(prefix: string): Sandbox { 'utf8', ) - // Pin Chromium actual-size zoom (level 0) for the suite. Fresh installs - // ship DEFAULT_ZOOM_LEVEL at the Appearance 90% preset, but Playwright - // click hit-testing and the committed visual baselines were calibrated at - // 100%. Without this file every sandbox would inherit the product default - // and fail pointer interception + snapshot diffs. + // Pin Chromium actual-size zoom (level 0) for the suite. Playwright click + // hit-testing and the committed visual baselines were calibrated at 100%, + // so the suite must not drift if the product default (DEFAULT_ZOOM_LEVEL) + // ever moves off 100% again. fs.writeFileSync( path.join(userDataDir, 'zoom-state.json'), JSON.stringify({ zoomLevel: 0 }, null, 2), diff --git a/apps/desktop/electron/zoom.test.ts b/apps/desktop/electron/zoom.test.ts index 65aba0a25d..8eca88bd50 100644 --- a/apps/desktop/electron/zoom.test.ts +++ b/apps/desktop/electron/zoom.test.ts @@ -44,6 +44,10 @@ test('level 0 is exactly 100 percent (Chromium actual-size baseline)', () => { assert.equal(percentToZoomLevel(100), 0) }) +test('fresh installs and Actual Size (Ctrl/Cmd+0) land on 100 percent', () => { + assert.equal(zoomLevelToPercent(DEFAULT_ZOOM_LEVEL), 100) +}) + test('percentToZoomLevel rejects garbage by falling back to the shipped default', () => { assert.equal(percentToZoomLevel(NaN), DEFAULT_ZOOM_LEVEL) assert.equal(percentToZoomLevel(0), DEFAULT_ZOOM_LEVEL) diff --git a/apps/desktop/electron/zoom.ts b/apps/desktop/electron/zoom.ts index ce5fe5cb56..a479dd5fb9 100644 --- a/apps/desktop/electron/zoom.ts +++ b/apps/desktop/electron/zoom.ts @@ -15,7 +15,8 @@ const MAX_ZOOM_LEVEL = 9 /** Half Chromium's default step; matching the shortcuts and View menu. */ export const ZOOM_STEP = 0.1 -export const DEFAULT_ZOOM_LEVEL = Math.log(0.9) / Math.log(ZOOM_FACTOR_BASE) +/** 100%: Chromium actual size, so View → Actual Size (Ctrl/Cmd+0) means it. */ +export const DEFAULT_ZOOM_LEVEL = 0 export function clampZoomLevel(value) { if (!Number.isFinite(value)) { diff --git a/apps/desktop/src/store/zoom.ts b/apps/desktop/src/store/zoom.ts index 9f815cb1d5..1b4d0aacec 100644 --- a/apps/desktop/src/store/zoom.ts +++ b/apps/desktop/src/store/zoom.ts @@ -10,7 +10,7 @@ import { atom } from 'nanostores' -export const $zoomPercent = atom(90) +export const $zoomPercent = atom(100) export function setZoomPercent(percent: number): void { window.hermesDesktop?.zoom?.setPercent(percent)