Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
ADR 0180: Custom global UI type scale
- Status: Accepted (amended)
- Date: 2026-09-08
- Related: D343, ADR 0083,
04-ux/06-settings-ia.md
Context
The --text-* ramp is a frozen set of product sizes, and Zoom In / Zoom Out scale
the whole window including layout and controls, so a user who wants denser or
larger type had no remembered preference that keeps body, chrome, and headings in
proportion. An earlier draft remapped only the transcript and composer from a px
value, which left other surfaces at product size.
Decision
- Settings → General → Appearance gains a Font size row under Font, with four cup presets (Tall 85% / Grande 100% / Venti 115% / Trenta 125%) above a percentage slider; valid values are 80%–150% in 2.5% steps, and absent means 100%.
- Persistence is the optional
AppSettings.fontScale, rejected at the renderer edge on invalid writes and clamped throughnormalizeFontScaleon read, with no protocol or schema version bump. - Application is global: the renderer sets
--font-scaleondocument.documentElement, every--text-*token and--leading-rowbecomescalc(<product px> * var(--font-scale)), and shared Lucide wrappers scale glyphs the same way. - Zoom stays independent and composes with the type scale.
Consequences
- One control scales every
--text-*consumer while keeping relative steps. - Users choose a scale, never a px number that only matches
--text-base. - Compact chrome grows too, so rows with a fixed px height may feel tighter; the 150% cap bounds that.
Alternatives
- Remap only
.thread-wrapand.composer-dock— rejected: two type sizes in one window, and a px number is still required. - Use Zoom In/Out as the type preference — rejected: it scales layout with text.