mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-27 17:58:07 +00:00
Once the coalescing floor had already elapsed, the next delta was scheduled with requestAnimationFrame. Chromium pauses rAF for a renderer it considers hidden, and that is not something this code can verify: backgroundThrottling: false and the process-level switches in electron/main.ts cover the blurred and occluded cases, but not a minimized window, a fully off-screen one, or a renderer the compositor has otherwise parked. In those states the callback is accepted and never runs, so a finished answer sits in the queue until some later focus or input event happens to wake a frame — the reply looks stalled, then lands all at once on refocus. Always use a timer. The coalescing cadence is unchanged (the floor above is what enforces it), timers are clamped rather than suspended in background renderers, and disable-background-timer-throttling already opts out of that clamp. The teardown path loses its cancelAnimationFrame branch with it. The regression test parks rAF the way an occluded renderer does and asserts the delta still arrives. It has to send a delta, let it flush, then idle past the floor before the delta under test, because the frame-gated branch was only reachable on that second scheduling — a single-delta version of this test passes on main and proves nothing. Co-authored-by: NetRunner2037 <rerdi92@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||