Skip to content

Studio: use the scaling text tokens in the Agents settings tab - #7468

Merged
danielhanchen merged 1 commit into
mainfrom
fix-agents-tab-font-scale
Jul 26, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix-agents-tab-font-scale

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

The Agents settings tab added in #7303 sets three labels with raw px text utilities, which ignore the UI font size preference in Settings > Appearance. The avatar initial and both status pills stay at a fixed size while everything around them scales.

tests/studio/test_ui_font_scale_contract.py::test_no_raw_pixel_text_utilities guards against exactly this, so main is currently red and every open PR inherits the failure:

AssertionError: Raw px text utilities ignore the UI font size preference;
use the text-ui-* / leading-ui-* tokens in index.css instead:
['features/settings/tabs/agents-tab.tsx: text-[11px]',
 'features/settings/tabs/agents-tab.tsx: text-[10px]',
 'features/settings/tabs/agents-tab.tsx: text-[10px]']

Change

Three class names in studio/frontend/src/features/settings/tabs/agents-tab.tsx:

line before after
107 text-[11px] text-ui-11
374 text-[10px] text-ui-10
379 text-[10px] text-ui-10

Both tokens already exist in index.css and are the same sizes multiplied by the preference:

--text-ui-10: calc(0.625rem * var(--ui-font-scale, 1));
--text-ui-11: calc(0.6875rem * var(--ui-font-scale, 1));

At the default scale of 1 they render at 10px and 11px, so the appearance is unchanged; they now follow the preference like the rest of the tab.

Verification

tests/studio/test_ui_font_scale_contract.py goes from 1 failed to 11 passed.

The Agents tab added in #7303 sets its avatar initial and its two status
pills with raw px utilities (text-[11px], text-[10px]). Those ignore the UI
font size preference, so the text stays fixed while the rest of Settings
scales, and tests/studio/test_ui_font_scale_contract.py fails on main.

Swapped for the existing tokens in index.css, which are the same sizes
multiplied by --ui-font-scale: text-ui-11 and text-ui-10.
@danielhanchen

Copy link
Copy Markdown
Member Author

Ran this on a staging replication onto fresh main, alongside a main-only baseline on the same runner, so the effect is isolated. Repo tests (CPU):

tree failed passed errors
main alone (d819029b) 1 2855 12
main + this PR (ac953315) 0 2856 12

The failure this PR targets is gone.

Worth flagging that the check does not go green, because Repo tests (CPU) is red on main for a second, unrelated reason: 12 errors, all in tests/studio/install/test_rocm_rdna_routing.py. Each spawns a child that imports unsloth_zoo -> bitsandbytes, which aborts with

OSError: libhipblas.so.2: cannot open shared object file: No such file or directory
AttributeError: module 'torch._C' has no attribute '_cuda_getCurrentRawStream'

That is a CPU-only torch being paired with a bitsandbytes build that expects the CUDA/ROCm backend, so it is an environment pin rather than anything in the tree. It is present in the main-only baseline above and needs a separate fix.

@danielhanchen
danielhanchen merged commit 6ae037f into main Jul 26, 2026
39 of 41 checks passed
@danielhanchen
danielhanchen deleted the fix-agents-tab-font-scale branch July 26, 2026 11:57
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.

2 participants