Skip to content

feat(ui): add font-size controls (UI scale + code/terminal) to Appearance settings #4021

Description

@liugddx

Problem

Maka's Appearance settings only expose theme and palette today — there is no way to change font size. The renderer's type scale is fixed at base: 14 (makaTheme.ts), and both xterm.js terminals hardcode fontSize: 12 (session-terminal-panel.tsx, runtime-host-ssh-terminal-dialog.tsx).

As a result:

  • Users on large / high-DPI displays, or with accessibility needs, cannot enlarge the transcript and UI without resorting to OS-level display scaling (which is blunt and affects every app).
  • The embedded terminal text is stuck at 12px with no in-app control.
  • There is a native menu zoomIn/zoomOut, but it does not persist and is not reflected anywhere in Settings.

Peer tools expose this: Codex Desktop has UI Font size + Code Font size in its Appearance panel. (Terminal-only TUIs like the Codex/opencode CLI defer to the terminal emulator — but Maka is an Electron app and owns its own DOM, so it can and should offer this in-app.)

Desired outcome

Two font-size controls in the Appearance settings page, persisted under appearance (already client-owned) and applied at startup without a flash:

  1. UI font size — a uniform scale hook (root font-size / --maka-font-scale). Because every --font-size-* token is rem and the root is deliberately kept at 16px, one scale multiplier grows text, icons and rem-based spacing together (like browser zoom). This is the clean, intended hook — and explicitly not a re-introduction of the old html { font-size } density hack that was removed for silently shrinking the icon set.
  2. Code / terminal font size — feeds the two new Terminal({ fontSize }) sites (with a FitAddon refit + PTY resize on change) and code-block text.

Both values clamped to a sane range so an extreme value can't render the UI unusable.

Alternatives or workarounds

  • OS display scaling — works but is global and coarse.
  • Native menu Cmd/Ctrl +/- zoom — already present, but ephemeral (not persisted, not synced to a setting).
  • Manually editing settings.json — no such field exists yet.

Notes — pitfalls to avoid (observed in Codex Desktop)

  • Clamp the range (Codex could be set to 300 and became unusable, non-recoverable from the UI).
  • Keep UI vs code/terminal as separate knobs (Codex ties chat↔UI and terminal↔code together, so you can't tune them independently).
  • Make the keyboard shortcut change the persisted setting, not just an ephemeral window zoom.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions