Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new terminal rendering preference that lets users choose how xterm glyph smoothing is applied (inherit app default / force grayscale / opt into subpixel on macOS), implemented via a root data-* attribute and CSS selectors.
Changes:
- Introduces
terminalFontSmoothing: 'default' | 'antialiased' | 'subpixel'in shared settings types + default settings, with a small default-setting test. - Adds a Terminal → Rendering segmented control and corresponding settings-search catalog entry.
- Implements the behavior purely in CSS (
terminal.css) driven by a:rootdata attribute published fromApp.tsx, and updates localization strings.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/shared/types.ts | Adds the terminalFontSmoothing setting type and inline documentation. |
| src/shared/constants.ts | Sets the default terminalFontSmoothing: 'default' in getDefaultSettings(). |
| src/shared/constants.test.ts | Asserts the new setting’s default value. |
| src/renderer/src/components/settings/TerminalRenderingSection.tsx | Adds the UI control for choosing font smoothing under Terminal → Rendering. |
| src/renderer/src/components/settings/terminal-typography-search.ts | Adds a settings-search entry for “Font Smoothing”. |
| src/renderer/src/assets/terminal.css | Applies smoothing rules to .xterm based on :root[data-terminal-font-smoothing=…]. |
| src/renderer/src/App.tsx | Publishes data-terminal-font-smoothing on documentElement from settings. |
| src/renderer/src/i18n/locales/en.json | Adds English strings for the new setting + search entry. |
| src/renderer/src/i18n/locales/zh.json | Adds Chinese strings for the new setting + search entry. |
| src/renderer/src/i18n/locales/ko.json | Adds Korean strings for the new setting + search entry. |
| src/renderer/src/i18n/locales/ja.json | Adds Japanese strings for the new setting + search entry. |
| src/renderer/src/i18n/locales/es.json | Adds Spanish strings for the new setting + search entry. |
| src/main/codex-accounts/service.test.ts | Updates test settings fixture to include terminalFontSmoothing. |
| src/main/codex-accounts/runtime-home-service.test.ts | Updates test settings fixture to include terminalFontSmoothing. |
Suppressed comments (4)
src/renderer/src/i18n/locales/zh.json:9026
- This localized search description mixes English option names ("Subpixel" / "Default") into Chinese UI copy, even though the option labels are translated. Please localize those terms for consistency and readability.
"b2c3d4e5f6": "终端字形的抗锯齿方式。Subpixel 在亮色主题下与 VS Code 一致;Default 继承应用全局的灰度平滑。",
src/renderer/src/i18n/locales/ko.json:9014
- This localized search description mixes English option names ("Subpixel" / "Default") into Korean UI copy, even though the option labels are translated. Please localize those terms for consistency and readability.
"b2c3d4e5f6": "터미널 글리프의 앤티앨리어싱. Subpixel은 밝은 테마에서 VS Code와 일치합니다. Default는 앱 전체의 그레이스케일 스무딩을 상속합니다.",
src/renderer/src/i18n/locales/ja.json:9051
- This localized search description mixes English option names ("Subpixel" / "Default") into Japanese UI copy, even though the option labels are translated. Please localize those terms for consistency and readability.
"b2c3d4e5f6": "ターミナルグリフのアンチエイリアス。Subpixel はライトテーマで VS Code と一致します。Default はアプリ全体のグレースケールスムージングを継承します。",
src/renderer/src/i18n/locales/es.json:9029
- This localized search description mixes English option names ("Subpixel" / "Default") into Spanish UI copy, even though the option labels are translated. Please localize those terms for consistency and readability.
"b2c3d4e5f6": "Suavizado de los glifos del terminal. Subpixel coincide con VS Code en temas claros; Default hereda el suavizado en escala de grises de toda la app.",
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| "a1b2c3d4e5": "字体平滑", | ||
| "c3d4e5f6a7": "字体平滑", | ||
| "b2c3d4e5f6": "终端字形的抗锯齿方式。Subpixel 在亮色主题下与 VS Code 一致;Default 继承应用全局的灰度平滑。", |
| }, | ||
| "a1b2c3d4e5": "글꼴 스무딩", | ||
| "c3d4e5f6a7": "글꼴 스무딩", | ||
| "b2c3d4e5f6": "터미널 글리프의 앤티앨리어싱. Subpixel은 밝은 테마에서 VS Code와 일치합니다. Default는 앱 전체의 그레이스케일 스무딩을 상속합니다.", |
| }, | ||
| "a1b2c3d4e5": "フォントスムージング", | ||
| "c3d4e5f6a7": "フォントスムージング", | ||
| "b2c3d4e5f6": "ターミナルグリフのアンチエイリアス。Subpixel はライトテーマで VS Code と一致します。Default はアプリ全体のグレースケールスムージングを継承します。", |
| }, | ||
| "a1b2c3d4e5": "Suavizado de fuente", | ||
| "c3d4e5f6a7": "Suavizado de fuente", | ||
| "b2c3d4e5f6": "Suavizado de los glifos del terminal. Subpixel coincide con VS Code en temas claros; Default hereda el suavizado en escala de grises de toda la app.", |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
🚧 Files skipped from review as they are similar to previous changes (14)
📝 WalkthroughWalkthroughAdds a 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c98655d6-4c94-43fd-aee7-047657ac8827
📥 Commits
Reviewing files that changed from the base of the PR and between 02a1251 and 7ae2e4868cbf0574c5021f7c345b9eaccce5ce47.
📒 Files selected for processing (14)
src/main/codex-accounts/runtime-home-service.test.tssrc/main/codex-accounts/service.test.tssrc/renderer/src/App.tsxsrc/renderer/src/assets/terminal.csssrc/renderer/src/components/settings/TerminalRenderingSection.tsxsrc/renderer/src/components/settings/terminal-typography-search.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/constants.test.tssrc/shared/constants.tssrc/shared/types.ts
9156cb0 to
570e732
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
…ubpixel) Orca's `body` sets `-webkit-font-smoothing: antialiased` (grayscale) app-wide, and it inherits into the terminal, whose WebGL atlas bakes it into thinner, lighter glyphs. VS Code renders its terminal with macOS subpixel smoothing (workbench.fontAliasing defaults to a state that keeps the browser-native `-webkit-font-smoothing: auto`), so on light terminal themes Orca reads a touch lighter/blurrier than VS Code. Add a `terminalFontSmoothing` setting so users can opt into subpixel rendering: - 'default' (default): inherit the app-wide antialiased smoothing — identical to today's behavior, existing users see no change. - 'antialiased': pin grayscale explicitly. - 'subpixel': `-webkit-font-smoothing: auto`, closer to VS Code on light themes. Implemented as a CSS-only toggle, mirroring the existing `terminalGpuAcceleration` setting: App.tsx publishes the value as a `data-terminal-font-smoothing` attribute on `:root`, and terminal.css keys `.xterm` glyph smoothing off attribute selectors. No pane-manager or renderer plumbing is touched. Setting lives under Terminal → Rendering with a matching search entry.
Address CodeRabbit review on stablyai#13056: the Font Smoothing entries used hand-written sequential hex keys (a1b2c3d4e5…) instead of the repo's sha1(filePath:text) derived keys, and duplicated identical source text under separate keys. - Regenerate all Font Smoothing keys with the standard derivation so they match tool-generated output (TerminalRenderingSection.tsx + terminal-typography-search.ts). - Merge the duplicated "Font Smoothing" title/label/aria-label onto one key, matching the existing GPU Acceleration convention. - Reuse the existing 'font' search keyword key instead of minting a new one. - Localize "Subpixel"/"Default" in the zh/ja/ko/es descriptions (Copilot review) so translated copy no longer mixes English option names. Verified: verify:localization-catalog, verify:localization-extraction, localization-coverage, typecheck, constants.test all pass.
Address CodeRabbit review on stablyai#13056: - Describe subpixel as browser-native rather than macOS-only, since the setting toggles -webkit-font-smoothing:auto (browser/OS decides), not a macOS-gated mode. - Soften "matches VS Code" to "closer to VS Code" across the option, section, and search descriptions in all five locales, matching the code comment's own phrasing. - Keep source fallbacks and locale catalogs in sync (no new extraction drift). Verified: localization-catalog / extraction / coverage / typecheck pass.
570e732 to
70abfa2
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Closing as superseded by #36577: every editor surface now shares one typography setup, with opt-in font size, weight, line height, ligatures and macOS smoothing. Thank you for this PR, it shaped the design. |
Summary
Adds a
terminalFontSmoothingsetting (default/antialiased/subpixel) under Terminal → Rendering, so users can opt the terminal into macOS subpixel smoothing. The default preserves today's behavior — existing users see no change.Motivation
bodyinmain.csssets-webkit-font-smoothing: antialiased(grayscale) app-wide, and it inherits into the terminal, whose WebGL atlas bakes it into thinner, lighter glyphs. VS Code renders its terminal with macOS subpixel smoothing —workbench.fontAliasingdefaults to a state that adds no aliasing class, so it keeps the browser-native-webkit-font-smoothing: auto(subpixel), Retina included. On light terminal themes Orca therefore reads a touch lighter/blurrier than VS Code.Rather than force subpixel on everyone (it's a subjective, display-dependent trade-off — great for dark-on-light, less so for light-on-dark), this exposes it as an opt-in.
Options
default(default): inherit the app-wide antialiased smoothing — identical to current behavior.antialiased: pin grayscale explicitly.subpixel:-webkit-font-smoothing: auto, closer to VS Code on light themes.Implementation
CSS-only, mirroring the existing
terminalGpuAccelerationsetting:App.tsxpublishes the value as adata-terminal-font-smoothingattribute on:root(next to the existing--app-font-familyeffect).terminal.csskeys.xtermglyph smoothing off:root[data-terminal-font-smoothing='…']attribute selectors.defaultemits no rule, so inheritance is untouched.Copy is localized in all shipped languages (en / zh / ja / ko / es).
Testing
getComputedStyle('.xterm')['-webkit-font-smoothing']betweenauto(subpixel),antialiased, and inherited (default), and updates the:rootattribute accordingly.pnpm typecheck: cleanvitest(constants / settings / codex-accounts / terminal): 1244 passedverify:localization-extraction,-catalog,-coverage.