Repository navigation
Let the cache row's path label follow the interface font size - #11520
Conversation
The cache storage rows landed with a raw text-[11px] on the path label, which is the one piece of type on that screen that ignores Settings > Appearance. tests/studio/test_ui_font_scale_contract.py names it, and that check has been failing Repo tests (CPU, studio) on main since the rows merged. Swapped for the text-ui-11 token, which is what the rest of the UI uses for 11px-class text: calc(0.6875rem * var(--ui-font-scale, 1)). At the default 15px setting that renders 10.3px rather than 11px, so the label is a touch smaller than it was, and at every other setting it now moves with the rest of the screen instead of staying put.
|
@codex review |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
UI evidenceI could not get a before/after screenshot pair off this host. The two Studio installs were killed by the machine's memory watchdog on four consecutive attempts, three of them mid-build, and the last one wiped both frontend bundles on its way out. Both sides did build once and both worktrees hold the right source, so this is the host being squeezed by other work rather than anything about the change. Posting a pair that came out of a half-built install would be worse than posting none, so here is the measurement instead. The label's rendered size, computed from the declarations that ship:
The before column is the defect: one fixed number across the whole range, on a label sitting among rows that all move. The after column is the same arithmetic every other The default row is the visible change to weigh, 11px becoming 10.31px. That is the label matching the type around it rather than sitting slightly larger than it, which is what the token is for. |
…hai#11520) The cache storage rows landed with a raw text-[11px] on the path label, which is the one piece of type on that screen that ignores Settings > Appearance. tests/studio/test_ui_font_scale_contract.py names it, and that check has been failing Repo tests (CPU, studio) on main since the rows merged. Swapped for the text-ui-11 token, which is what the rest of the UI uses for 11px-class text: calc(0.6875rem * var(--ui-font-scale, 1)). At the default 15px setting that renders 10.3px rather than 11px, so the label is a touch smaller than it was, and at every other setting it now moves with the rest of the screen instead of staying put.
What is wrong
Repo tests (CPU, studio)is failing onmain:It is the only failure in that lane:
1 failed, 7533 passed, 165 skipped.Where it came from
f18373631("Studio: show what the caches cost and let them be cleared", #10528) addedcache-storage-rows.tsx, and the path label under each cache name carries a rawtext-[11px]. That is the one piece of type on the screen that ignores Settings > Appearance: at the 20px setting every label around it grows and this one stays at 11px.The test is right and the code is wrong here. The contract exists precisely because a raw px text utility opts out of the preference, and nothing about a file path makes it an exception. The two documented exceptions in that file are the chart
fontSizeprops and the offscreen clipboard textarea, and neither covers this.The change
text-[11px]becomestext-ui-11, the token the rest of the UI uses for 11px-class text:Worth stating plainly, because it is a visible change rather than a pure refactor:
--ui-font-scaleis0.9375at the default 15px setting, so the label renders 10.3px instead of 11px by default. That is the same arithmetic every othertext-ui-11on the screen already goes through, so the label now matches the type around it rather than sitting slightly larger than it, and at every non-default setting it moves with the rest of the screen instead of staying fixed.Verification
tests/studio/test_ui_font_scale_contract.py: 12 passed (was 1 failed, 11 passed)tests/studio/test_desktop_reliability_frontend_contract.py: 53 passedtext-[11px]back fails the contract again, so the guard is what is holding this and not an incidental pass