Repository navigation
Studio: lighten chat text weight on Linux to match macOS rendering - #7308
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces desktop Linux detection to adjust font rendering. Specifically, it adds a render-linux class to the document element when desktop Linux is detected, and uses this class in CSS to adjust the font weight of chat messages to match macOS rendering. It also toggles a data-ui-font attribute on the document when a custom UI font is set. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Bring the PR branch up to date with upstream main (unslothai#7327, unslothai#7308, unslothai#5988).
Studio's default Inter chat text renders heavier on Linux than the same build on macOS. The global
-webkit-font-smoothing: antialiasedonly affects macOS rendering, so using weight 410 on both platforms does not produce the same visual weight.Fix
Render assistant and user message text at weight 350 on desktop Linux. Detection uses the browser user agent because the backend may run on a different OS. Android is unchanged.
Font smoothing off, custom chat fonts, and custom interface fonts keep weight 410. The adjustment is specific to the default Inter font.
Weight 350 was selected by testing values from 300 through 410. It noticeably reduces the difference without making text look washed out.
Comparison
Same content and app CSS, rendered through the real code path.
macOS reference (weight 410):

Linux before (weight 410):

Linux after (weight 350):

Verification