You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(settings): preview each font in its own typeface in font pickers - #33254
The font pickers in Settings show each font name in that font.
What Changed
Before: The IDE Font, Editor Font, and Terminal Font lists show every name in the app UI font. To compare fonts, you must select one, look at the result, open the list again, and scroll back.
After: Each option in these lists shows its name in its own font. These items do not change:
the check mark on the selected font
keyboard navigation
filtering
the limit of 320 rendered rows
the existing terminal hover preview
the text input
How it works:FontAutocomplete is shared by all three pickers. It now sets an inline font-family on each option name. It uses the existing buildAppFontFamily() function. That function quotes font names safely and adds the app UI fallback fonts. If a font does not load, the option shows in the normal UI font. No new function or prop is added.
Why
You judge fonts one at a time when you have many installed (#21685). This change lets you compare them in one scan of the list.
Design decision: Issue #21685 also suggests a sample string next to each name, for example ABCabc 0123 Il1 O0 {}[]<>|. This PR does not add it. A long string on each row makes the list busier and wider. Showing the name in its own font gives the same preview with less visual noise. A sample string can be added in a follow-up PR if the maintainers want it.
Other option not used: An opt-in prop on FontAutocomplete. All three pickers would turn it on, so it would never be off. The component API stays unchanged.
Platforms tested manually: Windows only. I did not test macOS, Linux, or SSH.
Steps to verify:
Open Settings > Interface > Appearance.
Click the IDE Font input or its chevron.
Check that each font name shows in its own font.
Do the same for the Editor and Terminal font pickers.
Automated tests: I added a test to SettingsFormControls.font-autocomplete.test.tsx. The test checks two things: the first font family of each option is its own name, and the input has no inline font family. The test failed before the change.
I also ran the settings test folder, pnpm tc:web, and oxlint on the changed files. I did not run the full pnpm test or pnpm build. CI covers these.
AI Disclosure
I wrote this change with OpenCode and Anthropic Claude (claude-sonnet-5-5). I reviewed the change and ran it locally.
Agent skill upstream boundary
Not applicable. This change does not copy or translate any upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Security: Font names come from the OS font list. JSON.stringify quotes them inside buildAppFontFamily(). They go only into a CSS font-family value.
Cross-platform: The change is plain CSS font-family. It has no OS-specific code. I tested only on Windows.
Remote SSH, mobile, folder workspaces: Not affected. The change is in the desktop Settings UI only.
Backward compatibility: No change to settings, IPC, or saved data.
Performance: The list already renders at most 320 rows. Fonts load as rows render.
Checklist
This PR is small and focused
I explained what changed and why
I attached before and after screenshots for the UI change
I reviewed the change for correctness, security, and performance
I considered cross-platform, SSH/remote, and path/shortcut impact
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass, or CI covers them
Maintainer additions (rebased by the Orca team)
Rebased onto current main. The original commit and its authorship are kept. Thanks @Rayyan34! Two small commits on top:
perf: option rows get content-visibility:auto with contain-intrinsic-size:auto 20px (the content box inside py-2). Each row loads its own font, so without this the first open shapes all 320 rendered rows in 320 different fonts. Now only the rows visible in the scroll area load; the rest load as you scroll. Skipped rows still measure the real 36px row height (checked across all 260 rows), so the scroll height does not jump.
fix: OS-shipped symbol fonts (Webdings, Wingdings 1–3, Marlett, Symbol, MT Extra, Bookshelf Symbol 7, URW D050000L, Standard Symbols PS) keep their name in the UI font. In their own font the name renders as pictographs or Greek letters and can't be read. The "default" row (empty value) also keeps the UI font.
#11155 (preview terminal font changes without leaving Settings) is not closed here. Settings already has a live xterm preview: it is the terminal preview under Terminal Themes, and it shows the highlighted terminal font while you browse the picker. #11155 asks for a preview next to the Font Family and Font Size controls. That is a separate layout change, left for a follow-up.
Visual proof
Before (main)
After
IDE font, dark
Terminal font, light
Symbol fonts before and after the readability fix:
Merge-risk assessment: Low
One renderer component (FontAutocomplete).
No settings, IPC, schema or font-enumeration changes. src/main/system-fonts.ts is untouched.
Mixed client and server versions are unaffected.
content-visibility needs Chromium 85+ and contain-intrinsic-size: auto needs Chromium 95+. Every Electron version Orca ships has both.
Negative user-facing tradeoffs
Rows now look less uniform: different fonts have different widths and x-heights, and some names truncate sooner. Row height is unchanged (36px).
Symbol fonts outside the known list (third-party icon fonts that map Latin letters to symbols) still render their name as symbols. You can still type to filter for them.
When you scroll quickly to an unseen part of the list, each row's font loads as it appears. In practice this is not visible.
Validation
pnpm tc:web passes. oxlint and oxfmt pass on the changed file. pnpm test src/renderer/src/components/settings/SettingsFormControls.font-autocomplete.test.tsx passes (18 tests).
Real app on macOS (257 system fonts): dev build launched in the background (ORCA_BACKGROUND_LAUNCH=1) with a throwaway userData and HOME, driven over CDP. Checked:
IDE and terminal pickers in light and dark.
Filtering.
Keyboard navigation: 120 × ArrowDown keeps the highlighted row in view, rendered in its own font.
Symbol fonts.
All 260 rows measure 36px.
Review: one Opus sub-agent flagged symbol fonts (fixed). Codex (gpt-6.1-sol, xhigh) flagged that contain-intrinsic-size sizes the content box, so skipped rows reserved 52px instead of 36px (fixed and re-measured: all 260 rows are 36px).
Perf
I ran perf-scan on the diff. Measurements use the dev build on macOS with 257 fonts, via CDP Performance.getMetrics, opening the IDE font picker:
First open: layout
First open: task
Warm open (median of 5): wall / style / task
main
1.2 ms
264 ms
85 ms / 8 ms / 46 ms
PR as submitted
278 ms
665 ms
130 ms / 12 ms / 60 ms
this branch
45 ms
346 ms
85 ms / 7 ms / 49 ms
On main, the first open's total wall time (about 10 s) is dominated by the existing system font enumeration IPC, which this PR does not touch.
After the content-visibility change, the remaining cost of the first open is roughly the 8 visible rows' fonts.
The list is already capped at 320 rows. Virtualizing it isn't needed now that offscreen rows skip layout.
Windows (DirectWrite) and Linux (fontconfig) font lookups are per family and happen at layout, so the same bound applies. I did not measure them on those hosts.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Walkthrough
Font autocomplete suggestions now render each font name in its corresponding typeface. The input retains its default UI font. A test checks the suggestion typefaces and confirms the input has no inline font family.
Severity of issue fixed: Low
Merge Risk: Minimal · previous review a02ba
No actionable merge-blocking risk is established for this UI-only change.
Pre-merge checks: 3 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Linked Issues check
Issue [#21685] requires each font entry to render in its own typeface and includes a short sample string with ambiguity-prone glyphs and bracket characters. FontAutocomplete.tsx implements the typef…
Add the requested sample string beside each font name in FontAutocomplete, including the glyphs described by [#21685], and add automated test coverage for the sample content and its rendering.
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title "feat(settings): preview each font in its own typeface in font pickers" matches the main change. The diff makes FontAutocomplete render each option's name in its own font through buildAppFon…
Out of Scope Changes check
The diff is limited to the shared FontAutocomplete rendering change and its focused automated test. The change supports the font-list preview objective in [#21685]. No unrelated settings, IPC, persi…
Description check
The description is complete and relevant. It explains the user-facing change, implementation, rationale, linked issue, visual proof, testing, platform coverage, risks, AI use, maintainer validation, a…
Full details: Title check
Explanation
The title "feat(settings): preview each font in its own typeface in font pickers" matches the main change. The diff makes FontAutocomplete render each option's name in its own font through buildAppFontFamily(), and adds a test for it. The title is specific and uses a conventional commit prefix. It is slightly long at 69 characters, but it stays on the primary change.
Full details: Out of Scope Changes check
Explanation
The diff is limited to the shared FontAutocomplete rendering change and its focused automated test. The change supports the font-list preview objective in [#21685]. No unrelated settings, IPC, persistence, or UI behavior changes are present.
Full details: Description check
Explanation
The description is complete and relevant. It explains the user-facing change, implementation, rationale, linked issue, visual proof, testing, platform coverage, risks, AI use, maintainer validation, and checklist status. The required ELI5 and Risk headings are not used exactly, but the required information is present elsewhere, so this is acceptable.
Full details: Linked Issues check
Explanation
Issue [#21685] requires each font entry to render in its own typeface and includes a short sample string with ambiguity-prone glyphs and bracket characters. FontAutocomplete.tsx implements the typeface preview with buildAppFontFamily(font), and the new test verifies the option families and unchanged input style. The PR does not render the requested sample string, and the test does not cover it.
Resolution
Add the requested sample string beside each font name in FontAutocomplete, including the glyphs described by [#21685], and add automated test coverage for the sample content and its rendering.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The font pickers in Settings show each font name in that font.
What Changed
Before: The IDE Font, Editor Font, and Terminal Font lists show every name in the app UI font. To compare fonts, you must select one, look at the result, open the list again, and scroll back.
After: Each option in these lists shows its name in its own font. These items do not change:
How it works:
FontAutocompleteis shared by all three pickers. It now sets an inlinefont-familyon each option name. It uses the existingbuildAppFontFamily()function. That function quotes font names safely and adds the app UI fallback fonts. If a font does not load, the option shows in the normal UI font. No new function or prop is added.Why
You judge fonts one at a time when you have many installed (#21685). This change lets you compare them in one scan of the list.
Design decision: Issue #21685 also suggests a sample string next to each name, for example
ABCabc 0123 Il1 O0 {}[]<>|. This PR does not add it. A long string on each row makes the list busier and wider. Showing the name in its own font gives the same preview with less visual noise. A sample string can be added in a follow-up PR if the maintainers want it.Other option not used: An opt-in prop on
FontAutocomplete. All three pickers would turn it on, so it would never be off. The component API stays unchanged.Linked Issue
Closes #21685
Visual Proof
Before:

After:

Testing
Platforms tested manually: Windows only. I did not test macOS, Linux, or SSH.
Steps to verify:
Automated tests: I added a test to
SettingsFormControls.font-autocomplete.test.tsx. The test checks two things: the first font family of each option is its own name, and the input has no inline font family. The test failed before the change.I also ran the settings test folder,
pnpm tc:web, andoxlinton the changed files. I did not run the fullpnpm testorpnpm build. CI covers these.AI Disclosure
I wrote this change with OpenCode and Anthropic Claude (
claude-sonnet-5-5). I reviewed the change and ran it locally.Agent skill upstream boundary
Notes
JSON.stringifyquotes them insidebuildAppFontFamily(). They go only into a CSSfont-familyvalue.font-family. It has no OS-specific code. I tested only on Windows.Checklist
pnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass, or CI covers themMaintainer additions (rebased by the Orca team)
Rebased onto current main. The original commit and its authorship are kept. Thanks @Rayyan34! Two small commits on top:
content-visibility:autowithcontain-intrinsic-size:auto 20px(the content box insidepy-2). Each row loads its own font, so without this the first open shapes all 320 rendered rows in 320 different fonts. Now only the rows visible in the scroll area load; the rest load as you scroll. Skipped rows still measure the real 36px row height (checked across all 260 rows), so the scroll height does not jump.Closes #21685
#11155 (preview terminal font changes without leaving Settings) is not closed here. Settings already has a live xterm preview: it is the terminal preview under Terminal Themes, and it shows the highlighted terminal font while you browse the picker. #11155 asks for a preview next to the Font Family and Font Size controls. That is a separate layout change, left for a follow-up.
Visual proof
Symbol fonts before and after the readability fix:
Merge-risk assessment: Low
FontAutocomplete).src/main/system-fonts.tsis untouched.content-visibilityneeds Chromium 85+ andcontain-intrinsic-size: autoneeds Chromium 95+. Every Electron version Orca ships has both.Negative user-facing tradeoffs
Validation
pnpm tc:webpasses.oxlintandoxfmtpass on the changed file.pnpm test src/renderer/src/components/settings/SettingsFormControls.font-autocomplete.test.tsxpasses (18 tests).ORCA_BACKGROUND_LAUNCH=1) with a throwaway userData and HOME, driven over CDP. Checked:gpt-6.1-sol, xhigh) flagged thatcontain-intrinsic-sizesizes the content box, so skipped rows reserved 52px instead of 36px (fixed and re-measured: all 260 rows are 36px).Perf
I ran perf-scan on the diff. Measurements use the dev build on macOS with 257 fonts, via CDP
Performance.getMetrics, opening the IDE font picker:content-visibilitychange, the remaining cost of the first open is roughly the 8 visible rows' fonts.