Repository navigation
Studio settings: size the composer Beta badge and the settings search offsets from the UI scale - #16524
Merged
Conversation
… offsets from the UI scale
Member
Author
|
@codex review |
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. 🚀 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". |
danielhanchen
added a commit
that referenced
this pull request
Nov 3, 2026
…16535) ## Summary `Tauri Linux debug build` fails intermittently on unrelated PRs in `linux_gpu_supervisor::tests::pid_and_group_signals_reach_the_child_once`, added in #15482. It hit #16524 today and `fix/opt-in-startup-warmup` yesterday, 2 of about 41 completed runs since Nov 1, with the same panic both times: ``` thread 'linux_gpu_supervisor::tests::pid_and_group_signals_reach_the_child_once' panicked at src/linux_gpu_supervisor.rs:1194:37: index out of bounds: the len is 0 but the index is 0 ``` **Cause.** The child writes its PIDs to `ready` with `std::fs::write`, which creates the file and then writes to it. The parent polls with `read_to_string`, and as soon as the read succeeds it parses the IDs. If the poll lands between the create and the write, the parent reads an empty string and indexes an empty list. The second panic in the log (`NotFound` at line 1125) follows from the first: the parent's tempdir is gone by the time the child writes `cleaned`. The parent polls `cleaned` the same way, so that check has the same race. The supervisor code under test is fine. Only the test's handshake was racy. ## Change `studio/src-tauri/src/linux_gpu_supervisor.rs`, test module only: a small `publish` helper writes to `<name>.tmp` and renames it into place, so the parent sees either no file or the whole contents. Both `ready` and `cleaned` go through it. The signals, timeouts and assertions are unchanged. ## Testing - `cargo test --locked linux_gpu_supervisor`: 20 passed. - Sabotage: I put a 100 ms sleep between the create and the write in the original `std::fs::write` of `ready`. The test then fails with exactly the CI panic above (`the len is 0 but the index is 0`). - With this change and the same 100 ms sleep between writing `ready.tmp` and the rename, the test passes 3 of 3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two UI font scale guards are red on main, so every Studio PR fails three jobs at once:
Repo tests (CPU, studio),Frontend build + bundle sanityandFrontend unit tests (Windows). In the last 30 PRs that is 18, 9 and 9 PRs respectively. Both reproduce on current main (99d1bc6686).1.
tests/studio/test_ui_font_scale_contract.py::test_no_raw_pixel_text_utilities#16298 (
63a3896459) added the composer's Beta badge withtext-[10px]. Every other Beta badge of this shape usesh-4 px-1.5 text-ui-10, andutils.tsregisterstext-ui-*with tailwind-merge as a font size.--text-ui-10iscalc(0.625rem * var(--ui-font-scale, 1)), which is exactly 10px at the default size. The guard is right.2.
studio/frontend/tests/ui-font-size-scales-spacing.test.ts: "no hand-set length above a hairline skips the scale"#16455 (
adfd9e0cc9) added the settings search field. Its height is alreadyh-[calc(36px*var(--ui-space-scale,1))], and its search and clear icons aresize-4, which scales too. Only the three offsets that place the icons and the text inside the field were fixed pixels, so at a larger interface scale the icons and the text start would drift relative to a field that grew. The guard is right here too.Change
composer-settings.tsx:text-[10px]becomestext-ui-10.settings-dialog.tsx: the three offsets becomecalc(...px*var(--ui-space-scale,1)), the same form as the field's height on the same line.At the default font size and interface scale, every changed value computes to the same length as before, so nothing moves for anyone on the defaults. At other scales, the badge text and the search field's contents now follow the scale like their neighbours. No behaviour, layout structure or copy changes.
Testing
studio/frontend/tests/ui-font-size-scales-spacing.test.ts: main gives 1 failed of 27 (the case above); this branch passes 27 of 27.tests/studio/test_ui_font_scale_contract.py: main gives 1 failed of 12; this branch passes 12 of 12.calc(13.5px * 1)is13.5px, and0.625remat a 16px root is10px).