hermes-agent/apps
Brooklyn Nicholson 5f154e881c perf(desktop): stop per-token sidebar + tool-row re-renders during streaming
Two real render-cost wins found by inspection (no behavior change):

1. Sidebar re-rendered on every stream token. $sessionStates is republished on
   every message delta (tens/sec during a turn), and the derived ID computeds
   ($workingSessionIds, $attentionSessionIds, $backgroundRunningSessionIds)
   allocated a fresh array each time. nanostores notifies on !==, so the whole
   ChatSidebar + every mounted row re-rendered per token even when the working/
   attention/background set was unchanged. Return the previous array reference
   when the contents match → nanostores skips the notify unless the set actually
   changes. Turns streaming from O(visible rows)/token into O(0) for the sidebar.

2. Tool rows normalized the FULL uncapped detail every render. `looksRedundant`
   (lowercase + whitespace-collapse over the entire read_file/terminal payload)
   ran twice in the ToolEntry render body, so every completed tool re-normalized
   its whole output on every stream tick of the running message. Memoize on the
   view fields so it recomputes only when the tool's content changes.

Both are correctness-preserving (stable refs + memoization). The CI stream
scenario drives $messages directly, not the publishSessionState path, so it
won't reflect #1 — verified by inspection.
2026-07-19 18:29:22 -05:00
..
bootstrap-installer fix(bootstrap): download timeouts + BOM upgrade for pre-fix cached scripts (#67193 follow-up) 2026-07-19 14:08:48 +05:30
desktop perf(desktop): stop per-token sidebar + tool-row re-renders during streaming 2026-07-19 18:29:22 -05:00
shared fmt(js): npm run fix on merge (#66983) 2026-07-18 15:12:47 +00:00