You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
render Desktop GlyphSpinner as a stable one-cell status glyph instead of advancing it through React state
preserve the existing component API, spinner-specific visual identity, status role, and accessible label
add a regression test proving the component schedules no timer work
Root cause
GlyphSpinner advanced its frame with setInterval plus setState. The default 80 ms interval caused roughly 12.6 React commits per second in a busy-but-silent session, including while the Desktop renderer was backgrounded because Chromium timer throttling is disabled. A decorative indicator therefore kept invalidating React even when no application data changed.
The TUI remains animated; this change is scoped to the Desktop component and the React churn reported here.
Full Desktop UI suite: 304/308 files and 2,659/2,665 tests passed. The five failures are existing locale-sensitive assertions under the Windows es-AR locale and reproduce unchanged on the baseline checkout.
Duplicate check
Ran the repository duplicate preflight before implementation and again immediately before publication. The full paginated inventory covered 17,681 open PRs; there are no issue-number, title/symptom, timeline, or linked-PR matches. The sole open PR mentioning GlyphSpinner is #47537, which fixes model-profile refresh races and touches different files.
Thanks for the focused performance fix. Current main still has the confirmed React-churn path: GlyphSpinner schedules setInterval/setFrame at apps/desktop/src/components/ui/glyph-spinner.tsx:57. This patch removes that path while preserving the existing props, status role, and accessible label; its added fake-timer test directly asserts that the component schedules no timer work.
The current-main component blob is the PR diff preimage (52e82412c881), so this is mechanically straightforward to salvage. The linked #74357 is a different, animation-preserving design; selecting between the two is a product decision rather than a correctness defect in this patch.
Thanks @franco314 — you correctly identified the GlyphSpinner setState-per-frame churn, and the fix here is clean. We're going with #74357, which eliminates the same React commits via direct textContent mutation while keeping the spinner animated, and adds pause-on-hidden/blur behavior with broader test coverage. Closing this one to consolidate, but the diagnosis here was spot on — much appreciated!
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
comp/desktopElectron desktop app (apps/desktop/*)P3Low — cosmetic, nice to havesweeper:blast-moderateSweeper blast radius: moderate — a subsystem or single platformsweeper:risk-compatibilitySweeper risk: may break existing users, config, migrations, defaults, or upgradestype/perfPerformance improvement or optimization
4 participants
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
GlyphSpinneras a stable one-cell status glyph instead of advancing it through React stateRoot cause
GlyphSpinneradvanced its frame withsetIntervalplussetState. The default 80 ms interval caused roughly 12.6 React commits per second in a busy-but-silent session, including while the Desktop renderer was backgrounded because Chromium timer throttling is disabled. A decorative indicator therefore kept invalidating React even when no application data changed.The TUI remains animated; this change is scoped to the Desktop component and the React churn reported here.
Closes #72844
Verification
npm --workspace apps/desktop run test:ui -- src/components/ui/glyph-spinner.test.tsx— pass; mutation-verified againstmain(timer count was 1)npm --workspace apps/desktop run typecheck— passnpm --workspace apps/desktop run lint— 0 errors (56 pre-existing warnings)npm --workspace apps/desktop run build— passgit diff --check— passes-ARlocale and reproduce unchanged on the baseline checkout.Duplicate check
Ran the repository duplicate preflight before implementation and again immediately before publication. The full paginated inventory covered 17,681 open PRs; there are no issue-number, title/symptom, timeline, or linked-PR matches. The sole open PR mentioning
GlyphSpinneris #47537, which fixes model-profile refresh races and touches different files.