mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-29 18:46:59 +00:00
The sidebar stays mounted beneath every overlay/page, and it subscribes to $sessions + $workingSessionIds — both tick on every streaming token. An unmemoized SidebarSessionRow re-rendered the whole list (Codicon, labels, status dots) on each delta, and that churn bled into every overlay opened on top: Cron, Profiles, Agents, Starmap, Webhooks, Command Center, Settings. - SidebarSessionRow: memo() with a custom comparator that ignores the pure id-forwarding callbacks (fresh closures by design) and compares only the data that changes what the row paints. Rows bail out while siblings stream. - SessionStatusDot: the 5 $...SessionIds arrays now read via useStoreSelector returning this session's boolean, so a dot repaints only when ITS OWN membership flips, not on every array tick. - Artifacts: stable cellCtx (useMemo) + memoized Primary/Location/Session cells so a link-title fetch on one row stops re-rendering the whole table. Measured before/after (2s idle, sessions streaming), sidebar-fed overlays: Cron 407->~30 wasted, Profiles 732->~80, Agents 132->9, Starmap 188->56, Webhooks 154->22. |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||