hermes-agent/apps/desktop/src/app
Brooklyn Nicholson ad09bf3872 fix(desktop): flush stream deltas from a timer, not an animation frame
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>
2026-07-26 03:15:44 -05:00
..
agents refactor(desktop): adopt shared utils + app-wide cleanups 2026-07-03 13:48:44 -05:00
artifacts cleanup(desktop): npm run fix for fmtting 2026-07-08 16:24:16 -07:00
chat perf(desktop): stop re-normalizing the transcript on every stream delta 2026-07-26 02:56:04 -05:00
command-center feat(desktop): button tooltip keybind hints + keybinds settings tab + unified worktree dialog (#65204) 2026-07-16 18:26:21 -04:00
command-palette Reapply "Merge pull request #30179 from NousResearch/feat/iron-proxy" 2026-07-24 09:49:00 -07:00
contrib fmt(js): npm run fix on merge (#71706) 2026-07-26 02:46:01 +00:00
cron lint(desktop): ban atom-mirrored refs via no-restricted-syntax eslint rule 2026-07-25 18:12:48 -07:00
gateway/hooks fix(desktop): give ⌘T session tabs a live gateway so slash completions load 2026-07-25 20:30:55 -05:00
hooks lint(desktop): ban atom-mirrored refs via no-restricted-syntax eslint rule 2026-07-25 18:12:48 -07:00
learning refactor(desktop): localize settled TODO(i18n) literals (#57924) 2026-07-03 20:43:50 +00:00
messaging fix(desktop): wrap missing sidebar icon-button tooltips (#67500) 2026-07-21 15:05:56 -04:00
overlays fix(desktop): unify overlay-pane padding and add primary PanelAction 2026-07-24 19:16:45 -05:00
pet-generate style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
pet-overlay lint(desktop): ban atom-mirrored refs via no-restricted-syntax eslint rule 2026-07-25 18:12:48 -07:00
profiles lint(desktop): ban atom-mirrored refs via no-restricted-syntax eslint rule 2026-07-25 18:12:48 -07:00
right-sidebar lint(desktop): ban atom-mirrored refs via no-restricted-syntax eslint rule 2026-07-25 18:12:48 -07:00
session fix(desktop): flush stream deltas from a timer, not an animation frame 2026-07-26 03:15:44 -05:00
settings fix(desktop): clarify inherited profile gateway 2026-07-25 21:06:40 -05:00
shell perf(desktop): defer model-row submenu bodies until hover 2026-07-26 01:10:22 -05:00
skills lint(desktop): ban atom-mirrored refs via no-restricted-syntax eslint rule 2026-07-25 18:12:48 -07:00
starmap lint(desktop): ban atom-mirrored refs via no-restricted-syntax eslint rule 2026-07-25 18:12:48 -07:00
webhooks refactor(desktop): webhooks create form uses shared Field; drop status pill 2026-07-24 19:16:45 -05:00
floating-hud.ts refactor(desktop): adopt shared utils + app-wide cleanups 2026-07-03 13:48:44 -05:00
index.tsx feat(desktop): routes, nav, and command palette as contributions 2026-07-13 17:57:54 -04:00
layout-constants.ts feat(desktop): cap overlay inner-page width at 75rem 2026-07-02 20:40:57 -05:00
master-detail.tsx feat(desktop): button tooltip keybind hints + keybinds settings tab + unified worktree dialog (#65204) 2026-07-16 18:26:21 -04:00
model-picker-overlay.tsx fix(desktop): scope model options by profile (#62795) 2026-07-22 09:40:50 -04:00
model-visibility-overlay.tsx fix(desktop): scope model options by profile (#62795) 2026-07-22 09:40:50 -04:00
page-search-shell.tsx fix(desktop,gateway,mcp): post-merge — CI contract, review corrections, hub search 2026-07-03 15:22:43 -05:00
routes.test.ts fix(desktop): close cross-session leak windows in composer + session refs (#59305) 2026-07-24 16:04:12 -07:00
routes.ts fix(desktop): close cross-session leak windows in composer + session refs (#59305) 2026-07-24 16:04:12 -07:00
session-picker-overlay.tsx desktop: registry-driven slash commands + first-class /resume & /handoff (#42351) 2026-06-11 01:49:24 +00:00
session-switcher.tsx refactor(desktop): derive working/attention session sets from $sessionStates 2026-07-17 14:33:38 -04:00
types.ts fix(desktop): salvage /compress cluster — session.compress RPC + dedicated RPC routing (#68229) 2026-07-22 16:40:06 -04:00
updates-overlay.tsx fmt(js): npm run fix on merge (#69805) 2026-07-23 03:32:32 +00:00