hermes-agent/apps/desktop/src
蒋方明 f8a554bced fix(desktop): keep message component types stable across Thread re-renders
The component map Thread passes to the virtualizer listed the
onBranchInNewChat / onCancel callbacks as useMemo deps. Whenever a parent
re-render handed down a fresh callback identity, the memo rebuilt the map
and produced new component *types*, so React unmounted and remounted every
visible message. Async-rendered parts (shiki code blocks) collapsed and
re-expanded on each remount, making the whole thread visibly jump.

That is exactly what shipped in v0.15.1: the desktop controller passed an
inline arrow for onBranchInNewChat, and the 15s status-snapshot poll
re-rendered the controller, so threads with code blocks jumped every 15
seconds (layout-shift scores of 0.39 + 0.47 per cycle, measured via CDP).
arrow away from regressing.

Route the callbacks through a ref so the component types survive any
parent re-render; only the callbacks' definedness stays a dep, because it
gates UI (the user-message Stop button). Add a regression test that fails
on the old code by asserting message DOM nodes keep their identity when
callback props change identity.

Tested on macOS arm64 (vitest + rebuilt app, CDP layout-shift
instrumentation confirms zero shifts over multiple poll cycles).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 21:05:54 -05:00
..
app fix(desktop): stop renderer OOM from session.info heartbeat churn on $sessionStates 2026-07-26 20:47:57 -05:00
assets/tiers feat(desktop): Billing page revamp — current-plan card, in-app plans view, tier art (#68722) 2026-07-22 08:07:52 +05:30
components fix(desktop): keep message component types stable across Thread re-renders 2026-07-26 21:05:54 -05:00
contrib feat(desktop): expose ctx.i18n on the plugin SDK 2026-07-19 00:05:08 -04:00
debug fix(desktop): make render-churn measure streaming, not boot churn 2026-07-26 15:54:18 -05:00
fonts fix(desktop): crisp terminal text via opaque xterm canvas 2026-06-12 19:36:30 -05:00
hooks perf(desktop): share one ResizeObserver instead of one per consumer 2026-07-26 19:56:55 -05:00
i18n Merge pull request #72336 from NousResearch/bb/statusbar-prefs 2026-07-26 20:10:16 -05:00
lib Merge pull request #72339 from NousResearch/bb/redirect-user-row 2026-07-26 20:09:46 -05: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 fix(desktop): stop renderer OOM from session.info heartbeat churn on $sessionStates 2026-07-26 20:47:57 -05:00
themes fix(themes): repaint the desktop on an in-place edit of the active skin 2026-07-22 15:07:03 -05:00
types fix(desktop): stop dropping the prompt a mid-turn redirect corrected 2026-07-26 19:44:42 -05:00
global.d.ts feat(desktop): quick-entry window — global hotkey capture to any session 2026-07-26 17:48:19 -07: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 refactor(sidebar): drop session counts and the COUNT(*) that fed them 2026-07-26 19:36:08 -05:00
hermes.ts refactor(sidebar): drop session counts and the COUNT(*) that fed them 2026-07-26 19:36:08 -05:00
main.tsx perf(desktop): one app-level TooltipProvider, not one per Tip 2026-07-26 19:56:55 -05:00
styles.css fix(desktop): restore the pane tab strip's bottom rule 2026-07-26 04:25:29 -05:00
vite-env.d.ts
…
webhooks-rest.test.ts feat(desktop): add Webhooks page for subscription CRUD (#69687) 2026-07-24 14:06:10 -04:00