Skip to content

feat(desktop): add font-size preference to Appearance settings (#3938) - #4061

Open
iroiro147 wants to merge 1 commit into
block:mainfrom
iroiro147:claude/issue3938-20260801
Open

feat(desktop): add font-size preference to Appearance settings (#3938)#4061
iroiro147 wants to merge 1 commit into
block:mainfrom
iroiro147:claude/issue3938-20260801

Conversation

@iroiro147

Copy link
Copy Markdown

Problem

Buzz Desktop (Linux, Tauri) has no way to adjust the base font/text size in the chat view. High-DPI or unusually-scaled displays render the default size poorly, with no user-side workaround (#3938).

Fix

Adds an adjustable font-size preference to Settings → Appearance, persisted locally and applied globally as a document-root font-size multiplier:

  • shared/lib/fontScalePreference.tsuseSyncExternalStore-backed preference store persisted to localStorage under buzz.ui.fontScale. Clamps to 85%–130% with named presets; modeled directly on threadViewModePreference.
  • shared/ui/FontScaleApplier.tsx — mounted once in main.tsx inside ThemeProvider; applies the scale as font-size: ${scale * 16}px on <html>, cascading into every rem-based token.
  • features/settings/ui/FontSizeSetting.tsx — settings card with stepper buttons (+/-) plus a range slider, visually mirroring ThreadLayoutSetting (same SettingsOptionGroup/SettingsOptionRow vocabulary).
  • Tests — pin clamp boundaries, NaN → 100% fallback, and the localStorage round-trip.

Test plan

  • pnpm typecheck clean
  • pnpm exec biome check clean across all touched files
  • New fontScalePreference.test.mjs (4 tests) pins clamp, NaN, persistence behavior
  • Full pnpm test — 3910 passing, no regressions

Closes #3938.

…#3938)

Adds a user-controllable font scale (85%-130% of default) to the
Appearance settings panel, letting users improve readability on
high-DPI or unusually-scaled displays.

- fontScalePreference: useSyncExternalStore-backed preference store
  persisted in localStorage under buzz.ui.fontScale; exports typed
  clamps and presets
- FontScaleApplier: mounted in main.tsx, applies the scale as a
  document root font-size multiplier (cascades into all rem units)
- FontSizeSetting: settings card with +/- buttons plus range slider
  mirroring the ThreadLayoutSetting visual vocabulary
- Tests: pin clamp, NaN handling, localStorage round-trip

Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
@iroiro147
iroiro147 requested a review from a team as a code owner August 1, 2026 05:26
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.

[Feature Request] Adjustable font/text size in Buzz Desktop (Linux)

1 participant