Skip to content

Studio: calibrate Linux chat typography against macOS#7337

Merged
oobabooga merged 10 commits into
unslothai:mainfrom
oobabooga:studio-linux-light-chat-weight
Jul 23, 2026
Merged

Studio: calibrate Linux chat typography against macOS#7337
oobabooga merged 10 commits into
unslothai:mainfrom
oobabooga:studio-linux-light-chat-weight

Conversation

@oobabooga

@oobabooga oobabooga commented Jul 22, 2026

Copy link
Copy Markdown
Member

PR #7308 lowered inherited regular chat text on Linux from 410 to 350. That improved dark-mode darkness, but made light-mode text too light and made dark-mode lines wrap earlier than the macOS reference.

This follow-up calibrates both themes for the default Inter path on desktop Linux:

  • Light mode uses 390, bringing text coverage close to macOS.
  • Dark mode retains 350 and uses 0.023em tracking to reduce width and wrap drift without changing its measured text coverage.

Native rendering comparison

Difference in background-normalized sRGB foreground coverage relative to native macOS at weight 410:

Theme Before #7308 Current main This PR
Light +4.10% at Linux 410 -9.54% at Linux 350 +0.54% at Linux 390
Dark +14.91% at Linux 410 +0.95% at Linux 350 +0.95% at Linux 350

Positive values are heavier than macOS by this metric; negative values are lighter.

The dark-mode tracking correction improves layout without materially changing text coverage:

Dark-mode layout metric macOS 410 Current Linux 350 This PR Linux 350
Computed tracking 0.31px 0.31px 0.3565px
Representative paragraph wrap 10 lines 9 lines 10 lines
Fixed-line mean absolute width error vs. macOS - 4.22px 1.79px

Visual check

Linux, this PR: 350 + 0.023em macOS reference: 410 + 0.02em
linux-dark-350-tracking-0 023em macos-dark-410-reference
Measurement methodology

Captures used Chrome for Testing 149.0.7827.55, the production Inter WOFF2, device pixel ratio 1, native FreeType rendering on Linux, and native CoreText rendering on macOS 14.5 on Apple silicon. Three repeated captures of each state were bit-identical.

A 5-unit light-mode weight sweep found 390 closest under normalized sRGB. It was also evaluated using CIE L* and linear luminance, so the choice does not depend on a single perceptual transform.

Scope and validation

The selector targets only desktop-Linux assistant and user message roots on the default font path. macOS, Android, custom chat or UI fonts, and the font-smoothing opt-out retain the existing typography. Explicit text weights are retained; the dark tracking adjustment is inherited within the affected message roots.

  • Browser matrix coverage for both message roles, themes, Linux detection, and opt-out paths
  • python -m py_compile tests/studio/playwright_chat_ui.py
  • ruff check tests/studio/playwright_chat_ui.py
  • npm run build

@oobabooga
oobabooga requested a review from danielhanchen as a code owner July 22, 2026 14:58
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@oobabooga oobabooga changed the title Studio: correct Linux chat weight in light mode Studio: calibrate Linux chat typography against macOS Jul 22, 2026
@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 0b331cbd40

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 07a4944e28

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f456f49d22

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread tests/studio/playwright_chat_ui.py Outdated
Comment thread tests/studio/playwright_chat_ui.py Outdated
@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: c849a1f14e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@oobabooga
oobabooga merged commit 6f4c838 into unslothai:main Jul 23, 2026
33 of 36 checks passed
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.

1 participant