hermes-agent/apps/desktop/src
ethernet 51bb3e6b4b fix(desktop): eliminate session-load transcript re-renders
The cold resume path in resumeSession() painted the transcript twice:
once from the REST prefetch (eager setMessages), then again when the
session.resume RPC landed (reconcileAuthoritativeMessages + setMessages).
A third re-render came from setBusy(true) during the load followed by
setBusy(false) in the finally — the busy→idle transition re-rendered
the thread viewport.

Three changes fix this:

1. Defer the prefetch paint until BOTH the prefetch and the resume RPC
   have landed, then paint once. Wall time stays max(prefetch, resume)
   but the DOM only updates a single time. The prefetch result is
   awaited concurrently but not applied until after the RPC resolves.

2. Remove setBusy(true) from the cold-path entry. This is a history
   load, not a live turn — the busy flag is for active LLM turns only.
   The loading spinner is unaffected: it's driven by messagesEmpty &&
   !activeSessionId, not by $busy. The busy→idle transition was causing
   a second thread viewport re-render.

3. Drop the resumed.messages.length <= prefetchedMessageCount guard on
   the prefetch-hit fast path. When the prefetch already painted (now
   deferred) and the RPC returns no live projection, the REST endpoint
   is the display authority — the RPC's compressed-context projection
   can differ in count/content, so re-painting from it causes a teardown
   + rebuild. Now the prefetch result is always preferred when idle.

Also adds a direct setMessages call after updateSessionState so the
final paint happens synchronously (updateSessionState's RAF flush via
syncSessionStateToView is deferred and mocked in tests).

The e2e test (large-session-reload.spec.ts) now fails with 1 mutation
burst instead of 2, proving the fix eliminates the duplicate re-render.
The test's MutationObserver was also refined to only count additive
bursts (node additions), ignoring the expected setMessages([]) clear.
2026-07-20 17:15:47 -04:00
..
app fix(desktop): eliminate session-load transcript re-renders 2026-07-20 17:15:47 -04:00
components Merge pull request #65805 from NousResearch/ethie/e2e 2026-07-20 15:19:05 -04:00
contrib feat(desktop): expose ctx.i18n on the plugin SDK 2026-07-19 00:05:08 -04:00
fonts fix(desktop): crisp terminal text via opaque xterm canvas 2026-06-12 19:36:30 -05:00
hooks perf(desktop): kill the layout-thrash cascade on session switch (#66033) 2026-07-16 22:46:08 -04:00
i18n refactor(desktop): drop keep-awake statusbar toggle; persist in main 2026-07-20 13:57:41 -05:00
lib fmt(js): npm run fix on merge (#68135) 2026-07-20 16:46:35 +00:00
plugins feat(desktop): plugin manager, runtime loader, and plugins settings 2026-07-13 17:57:53 -04:00
sdk feat(desktop): expose ctx.i18n on the plugin SDK 2026-07-19 00:05:08 -04:00
store Merge pull request #68140 from NousResearch/bb/desktop-keep-awake 2026-07-20 14:29:04 -05:00
themes refactor(desktop): retire desktop-controller for the contribution shell; views as contributions 2026-07-13 17:57:54 -04:00
types fix(desktop, ink): don't wipe messages before final message (#65919) 2026-07-20 11:42:29 -04:00
global.d.ts feat(desktop): keep-computer-awake toggle + System settings section 2026-07-20 11:50:22 -05:00
hermes-cron-scope.test.ts fix(desktop): scope the cron jobs list to the active profile 2026-07-19 12:19:22 -07:00
hermes-parity.test.ts feat(desktop): CLI/dashboard parity — skills hub, MCP test/toggle/catalog, maintenance ops, log filters (#57441) 2026-07-03 01:02:47 -07:00
hermes-profile-scope.test.ts fix(memory): profile-scope the provider config endpoints 2026-07-07 10:53:43 -04:00
hermes.test.ts fix(desktop): extend read aloud + transcription timeouts (salvage of #39286) (#68056) 2026-07-20 09:51:31 -04:00
hermes.ts fix(desktop): extend read aloud + transcription timeouts (salvage of #39286) (#68056) 2026-07-20 09:51:31 -04:00
main.tsx bench(desktop): measure the full picture — prod build, cold-start, first-token (#67697) 2026-07-19 17:52:39 -05:00
styles.css fix(desktop): kill boot overlay fade-race in e2e screenshots 2026-07-20 11:44:41 -04:00
vite-env.d.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00