feat(desktop): add interface scale slider in Appearance settings
Summary
Adds a visible Interface scale control under Settings → Appearance so users can enlarge or shrink the desktop UI without relying on keyboard shortcuts.
Text zoom already existed via Cmd/Ctrl + / − / 0 (root <html> font-size + buzz:text-scale in localStorage). This PR surfaces that same preference as a slider and keeps keyboard shortcuts in sync.
None found for an existing issue/PR tracking an Appearance UI scale slider (searched open issues/PRs for zoom / text-scale / interface scale). Happy to open a tracking issue if maintainers prefer that first.
Motivation
Keyboard-only zoom is easy to miss, and many users (especially accessibility / high-DPI) look for a settings slider. This makes scale discoverable next to theme controls.
Implementation
- Extract a shared device-level text-scale store (
desktop/src/shared/lib/textScale.ts) with:- presets 75%–150% (aligned with existing min/max and keyboard steps)
- persistence under
buzz:text-scale - root rem application (native webview zoom stays pinned at 1)
- React hook
useTextScaleso Settings and shortcuts share one source of truth - Refactor
useWebviewZoomShortcutsto call the shared store - Appearance UI: slider, live percent label, Reset
- Unit tests for storage, snap/clamp, and step/reset behavior
How to test
- Run the desktop app (
just desktop-devorjust dev). - Open Settings → Appearance.
- Drag Interface scale between 75% and 150% — UI rem text/layout should scale; percent label updates.
- Click Reset — returns to 100%.
- Use Cmd/Ctrl + / − / 0 — slider value updates to match (and vice versa).
- Restart the app — scale preference persists.
Screenshots
Please add before/after screenshots from a local build (required for UI PRs). Path: Settings → Appearance, top of the section.
Checklist
- [x] Focused change (desktop text-scale only)
- [x] Unit tests for new preference module
- [x] DCO sign-off on commit
- [ ] Local
just ci/ desktop checks (not fully run in this environment; unit tests fortextScalepass) - [ ] Screenshots attached after local verify