Repository navigation
fix(code-appearance): unify fonts and selection highlights - #1822
Merged
FresnelR27 merged 1 commit intoSep 15, 2026
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Code and terminal surfaces use different font defaults and selection colors. The interactive terminal prefers Hack, read-only xterm output falls back to its built-in font, and several diff selections use gray instead of the chat selection color. Dark-theme body declarations can also override the user's code-font choice.
Solution
Unify code-surface appearance through the existing font setting and chat selection token:
Potential risks
System font availability varies by OS and can change glyph widths, wrapping, and terminal column counts. Fonts are resolved locally without adding bundled assets or downloads; Hack remains selectable. Search highlights and inactive terminal selections change visually, while syntax colors and semantic added/deleted diff colors retain their roles.
Native screenshots, multi-window behavior, and CPU/RSS measurements were not collected because desktop control requires explicit opt-in. The focused tests use jsdom and mocked xterm rendering, so they do not prove native glyph appearance. No dependency, settings schema, persistence format, or wire changes are included. Revert this commit to restore the previous appearance defaults.
Verification
On an isolated branch based on the latest
develop:pnpm typecheck:fast— passednpx lint-staged(commit hook: Oxlint, ESLint, Prettier) — passednpx tsgo --noEmit --pretty false(commit hook) — passed.font-monousesvar(--code-font-family); Sass compilation passed for the changed Markdown, code-viewer, and diff stylesgit diff --check— passedpnpm test \ src/store/ui/__tests__/editorSettingsAtom.test.ts \ src/config/appearance/skins/deriveSkinTokens.test.ts \ src/config/appearance/skins/rootAliasParity.test.ts \ src/engines/TerminalCore/components/TerminalInteractive/utils/theme.test.ts \ src/util/ui/theme/__tests__/selectionTokenParity.test.ts \ src/engines/ChatPanel/ChatHistory/selectionStyles.test.ts \ src/features/CodeMirror/config/themeConfig.test.ts \ src/features/CodeMirror/Diff/reviewSearchNavigation.test.ts \ src/engines/TerminalCore/components/XtermOutput/XtermOutput.test.ts \ src/engines/TerminalCore/__tests__/TerminalCore.test.ts \ src/components/MarkDown/markdownLinkCodeStyles.test.tsArchitecture and lifecycle findings are recorded in
docs/org2-performance-guard-2026-09-15/CodeTypography.md. The UI audit's pure-styling exclusion applies; no action controls or component structure changed.