Repository navigation
Studio: pause Glass blur through bursts of keys and presses under software compositing - #17237
Conversation
…tware compositing
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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". |
|
The PR changes both the Glass blur pausing ( |
…rpreter teardown (#17244) ## Summary `Repo tests (CPU, gloo-tp)` keeps going red on `tests/test_tp_native_gloo.py::test_trainer_length_samplers_resume_like_an_uninterrupted_run[2-group_by_length]`, always the same way: ``` E AssertionError: rank exit codes [-6, 0, 0, 0] terminate called without an active exception ``` It hit `main` itself (Nov 9 00:25 UTC), #17206 and a staging run of #17237 within about 15 hours, on PRs that do not touch tensor parallelism. In each run, one rank of four died with SIGABRT from `std::terminate` on a joinable C++ thread while the interpreter was tearing down, after the case had run and the process group had been destroyed. The other three ranks exited 0. It never reproduced locally, in 25 runs of that test. `_worker` now records that the case finished and its result was saved, destroys the process group as before, then flushes stdio and calls `os._exit(0)`. Interpreter teardown can no longer change the exit code of a rank whose work is done. A case that raises, a failed `torch.save` or a failing `destroy_process_group` still exits non-zero, so the parent still fails, and the results are still read back and checked exactly as before. ## Changes - `tests/test_tp_native_gloo.py`: - `_worker` skips interpreter teardown once the case has finished and its result is on disk. - New `teardown_abort` case, which registers `os.abort` with `atexit` to stand in for an abort during teardown. - New test `test_a_rank_that_finished_is_not_failed_by_an_abort_in_teardown`, which runs that case on two ranks and expects both results back. The other `*_gloo.py` suites only import helpers from this file and have their own workers, so they are unchanged. ## Testing - The new test passes. With the `os._exit` path disabled it fails with `rank exit codes` on the `atexit` abort, so it guards the fix. - The full `tests/test_tp_native_gloo.py` passes locally (57 passed). - ruff and the scanner-shape and exec-literal lints are clean.
Follows #17007 (Glass blur paused during scrolls under software compositing). This extends the same pause to bursts of keys, presses and edits.
Problem
Under software compositing (VMs, machines without a usable GPU, CI runners) every frame redraws the whole window and recomputes every
backdrop-filteron screen. #17007 paused the blur for scrolls, animations and mounts, but a keystroke or a click still paid for the blur on the sidebar, the Windows glass frame and the composer, even though only text changed. On the long-chat gate (Chromium, software compositing) Glass typing cost 4.1x to 4.9x the default look on main's Frontend CI.Change
glass-motion.ts:keydown,pointerdownandinput(paste, IME, autocomplete) hold the standing glass and the surface the event lands in (a dialog or menu) for the same settle window as the motion pause (200 ms after the last event). Listeners are passive and are removed bystop(); starting twice is harmless.Look
Software compositing only: while keys or presses arrive, the sidebar, the Windows glass frame, the composer, the files panel and the touched dialog or menu swap their blur for a 96% opaque fill of their own colour, and the blur returns one frame after 200 ms without input. Text, focus, caret, IME, menus and dialogs behave as before.
Results
Local long-chat gate, 40 turns, ratio to the default look, median (range) of 3 interleaved runs per arm, base runs 1 and 2 doubling as an A/A (median per-cell A/A spread 1.20x; the host was heavily loaded).
Scrolls are unchanged, as expected (#17007 already covers them). Absolute Liquid 3D CPU under the same load: typing 480 -> 291 ms, message click 433 -> 307 ms.
Tests
tests/glass-motion.test.ts: a burst of keys and presses holds the glass and releases it after the settle window;stop()removes the new listeners (13 pass).tests/studio/test_area_matrix.py: 33 pass. Frontend node suite 15,325 pass,tsc --noEmitclean.Screenshots
Chromium with software compositing, Liquid 3D, light theme, 30-turn chat. Left: at rest (unchanged from main; base vs head at rest differ only by a 1 px scroll offset). Right: the state held while keys or presses arrive (the same state #17007 shows during a scroll).
Chat:
Settings:
Tools menu: