Repository navigation
Conversation
The macOS main window stacked the native `sidebar` vibrancy material behind a transparent Electron surface. WindowServer recomposites that material on every frame the window stays dirty, so an idle focused window held GPU near 40% on Apple Silicon while a minimized one returned to the desktop baseline (issue #1064). Bounding idle indicator animations reduced the load but could not remove it, because the material itself kept the window in the compositor's per-frame path regardless of what the renderer painted. macOS now paints the same opaque native background the other platforms already use. The frameless `hiddenInset` titlebar, the inset traffic-light position, and the renderer's sidebar tint and sheen are unchanged, so the surface still reads as glass over the host palette. `applyNativeThemeSource` no longer re-applies a material, and the `window.setBackgroundColor` IPC no longer returns early on darwin, which means a granted `windowAppearance.backgroundColor` plugin theme is applied on macOS like everywhere else (ADR 0248). ADR 0330 records the decision and the measurement; the specs that described the vibrancy plate are updated in the same change.
Capping the reveal rate alone barely moved GPU usage, which located the cost: the expense was each render, not how often it ran. Every reveal commit re-rendered whatever sat in the streaming bubble, so a growing reply re-parsed its tree and repainted its syntax-colored spans dozens of times a second, and the work grew with the reply. A 32 KB tail limit was the only guard against it and no real reply reaches that size. A reply now shows its raw text while it arrives and swaps in the rendered form once it settles. The reveal commits half as often as before, and the minimap's O(markers) remeasure is capped instead of running on every frame the transcript grows. The streaming text keeps the Markdown source's newlines, and the cursor still lands on it because it stays the last child inside `.prose-chat`.
The A/B figures were presented as the baseline, which they were not: they were taken on a build that already carried the #1064 bounded-animation work. State the original report — an M5 idling at ~89% with the window focused — alongside the later measurement, and label each for what it shows.
|
This PR changes conversation/minimap rendering, text animation, and prose styling, so it has visible UI changes and is outside this pass's no-UI-change merge condition. I’m not merging it in this batch. The PR description is also empty, so the reported idle-GPU problem and the validation basis are not documented yet. Please add a concise reproduction/environment and evidence for the idle workload when you continue this PR. Thanks for investigating the macOS issue. |
Sustained GPU usage while idle (the root cause)Original report: ~89% GPU on an M5 Mac with the window focused and idle, The macOS main window stacked the native A controlled A/B later confirmed it (
What matters is that usage tracks whether the window is visible, not what it Note on the numbers: 40.9% is not the original baseline, because it was measured Fix: macOS paints the same opaque native background the other platforms This also fixes a latent defect: the GPU usage while scrolling and while a reply streamsCapping the reveal rate barely helped, and that result located the cost: the Fix: a reply shows its raw text while it arrives and swaps in the rendered Supporting changes (helpful, but not sufficient on their own):
BasisADR 0332, D665; the specs describing the vibrancy plate were updated in the same Verification
Impact
|
|
Hello, the main issue I'm seeing is that on my MacBook Air (M5 10+8), PI-Desktop sits at around 89%GPU usage whenever its window is in the foreground — even when I'm not doing anything in it. I hope this can be fixed in a future release. Thank you. |
|
Thanks for adding the controlled A/B measurements; they support the reported visible-window composition issue. This PR changes the macOS native surface/vibrancy and renderer text/scroll presentation, so it remains outside this batch's no-visible-UI/window-behavior scope. This is a scope deferral, not a finding that the report is false or that the direction is wrong. Please keep the reproduction, environment, and before/after measurements in the PR description, then refresh the branch against current main when this scope is reviewed. Thanks for the investigation. |
vastsa
left a comment
There was a problem hiding this comment.
Thanks for the controlled A/B measurements; they confirm the focused-idle GPU problem is real and points to the native vibrancy surface. My earlier note treated visible UI/window changes as out of scope; that constraint no longer applies, so this review is based on the code and root-cause fit.
The opaque-surface fix is already represented on current main by macosWindowSurfaceOptions and the macosWindowTranslucency setting. The current product default is deliberately translucent when the preference is absent; setting it to false selects the opaque surface on the next launch. The PR's first commit hard-codes opaque as the default, which changes that established default and duplicates the existing opt-out path. Please rebase and narrow this PR to a change that fits the current setting contract, or document a deliberate product decision to change the default before proposing that behavior.
The streaming plain-text/minimap changes in c501f2e02 address a separate active-generation rendering cost and change how replies render while streaming. They are not needed to fix the reported idle composition path; please split them into a separately scoped PR with its own problem statement and evidence. I’m not merging this combined diff as the idle-GPU fix. Thanks for the investigation and measurements.
|
The focused-idle GPU report and controlled measurements are credible. The current |
No description provided.