Skip to content

Add an accessibility text size for the app chrome - #774

Open
sageframe-no-kaji wants to merge 1 commit into
supabitapp:mainfrom
sageframe-no-kaji:feat/662-accessibility-chrome-text-size
Open

Add an accessibility text size for the app chrome#774
sageframe-no-kaji wants to merge 1 commit into
supabitapp:mainfrom
sageframe-no-kaji:feat/662-accessibility-chrome-text-size

Conversation

@sageframe-no-kaji

@sageframe-no-kaji sageframe-no-kaji commented Aug 5, 2026

Copy link
Copy Markdown

Closes #662

Summary

Adds a chrome text size setting so the sidebar, tab bar, toolbars, and Settings can be enlarged without changing the OS-wide display scale, which resizes the terminal along with everything else.

macOS SwiftUI does not resize text in response to dynamicTypeSize, so the size is applied by resolving each semantic font explicitly: a uiTextScale environment value is published at every window root, and chrome text opts in through appFont(_:weight:monospaced:) in place of .font(.body). The Ghostty terminal surface is NSView-backed with its own font system and is unaffected.

Three points that may be worth a closer look during review:

  • The toolbar title publishes the size a second time inside its TerminalSchemeHost closure. That host re-hosts its content in a fresh NSHostingView, which starts a new environment rather than inheriting the window's. Views behind the other imperatively-constructed hosting roots (command palette panel, terminal split tree) are deliberately left alone rather than plumbed, to keep this change out of the terminal internals.
  • Section headers need appFontInheriting. List styles its own headers and SwiftUI does not expose the font it resolved, so there is nothing to scale in place. The modifier leaves them alone at Default and only supplies a point size above that, so the repository name and the Active and Pinned titles grow with the rows beneath them.
  • chromeTextSize is mirrored into SettingsFeature.State like the other global fields, so the picker binds through the store and persists on the existing .binding path. Scaled point sizes are rounded to whole points, and the system text-style metrics are read once rather than on every body evaluation.

A missing or unrecognized chromeTextSize falls back to the default rather than throwing, which would reset the rest of the settings file — matching the existing appVisibility decode. The new pane is reachable at supacode://settings/accessibility and supacode settings accessibility, like every other pane.

Type of change

  • Bug fix (the linked issue is a bug report)
  • Feature (the linked issue is a feature request marked ready)
  • Documentation
  • Other (please describe)

How was this tested?

make check and make test both pass locally. New tests cover the case order and raw-value stability, the decode migration from a settings file predating the key, the fallback for an unrecognized value, and that an unrelated settings change no longer resets the size.

Also verified by running a Debug build against an isolated data directory at Extra Large: the toolbar title, the sidebar rows, and the Active/Pinned section headers all scale, and the terminal surface is unaffected.

  • make check passes (format + lint)
  • make test passes
  • I built and ran the app to confirm the change works

Checklist

  • This pull request is linked to an issue with Closes # above.
  • For a feature, the linked issue is labeled ready.
  • I am the author of this work and accountable for it; no commit is authored or co-authored by an AI agent.
  • I have read the Contributing guide and the Code of Conduct.

There is no in-app way to enlarge the sidebar, tab bar, toolbars, or
Settings without changing the OS-wide display scale, which resizes the
terminal along with everything else.

macOS SwiftUI does not resize text in response to dynamicTypeSize, so the
size is applied by resolving each semantic font explicitly: a uiTextScale
environment value is published at every window root, and chrome text opts
in through appFont(_:weight:monospaced:) in place of .font(.body). The
Ghostty terminal surface is NSView-backed with its own font system and is
unaffected. The toolbar title publishes the size a second time inside its
TerminalSchemeHost closure, because that host re-hosts its content in a
fresh NSHostingView rather than inheriting the window's environment.

Section headers take appFontInheriting instead. List styles its own
headers and SwiftUI does not expose the font it resolved, so there is
nothing to scale in place; the modifier leaves them alone at Default and
only supplies a point size above that, so the repository name and the
Active and Pinned titles grow with the rows beneath them.

A missing or unrecognized chromeTextSize falls back to the default rather
than throwing, which would reset the rest of the settings file. macOS has
no Dynamic Type step table to inherit, so the two steps are chosen to land
near where iOS's .xLarge and .xxLarge sit, and scaled point sizes round to
whole points.

The Accessibility pane holding the picker is reachable at
supacode://settings/accessibility and `supacode settings accessibility`,
like every other pane.

Tests cover the case order and raw-value stability, the decode migration
from a file predating the setting, the fallback for an unrecognized value,
and that an unrelated settings change no longer resets the size.
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.

Accessibility: large-text options for the app chrome

1 participant