hermes-agent/apps/desktop/src
Brooklyn Nicholson 2e3efce66e fix(desktop): recover the root error boundary from transient render races
A stale-index render race in assistant-ui (a just-shrunk thread rendered
at an old message index during a session switch / teardown) throws
errors like "tapClientLookup: Index N out of bounds", "Cannot read
properties of undefined (reading 'type')", or "Tried to unmount a fiber
that is already unmounted". These bubble to the root ErrorBoundary and
latch the WHOLE desktop app on the "Reload window" fallback even though
the next render against fresh state would be fine.

Teach the root boundary to treat that small set of known-transient
renderer errors as recoverable: log them and schedule a next-tick
reset() so React re-renders against current state instead of stranding
the user on the fallback.

Auto-recovery is BOUNDED -- at most MAX_RECOVERIES (3) attempts within a
5s window -- so a genuinely persistent error can't spin the boundary in
a reset -> throw -> reset loop; after the budget is spent the fallback
is left up for the user. Manual retry (the button) resets the budget.
Only the root boundary auto-recovers; scoped boundaries keep their own
fallbacks, and unrecognized errors are never swallowed.

Tests: transient race recovers (fallback never sticks), a persistent
recoverable error stops at the cap and surfaces the fallback (proving
the loop is bounded), and neither a non-root boundary nor an
unrecognized root error auto-recovers.

Closes #41693. Supersedes #41787 by @izumi0uu, reimplemented with a
bounded recovery budget so a non-transient error can't loop forever.

Co-authored-by: izumi0uu <izumi0uu@gmail.com>
2026-06-25 16:15:20 -05:00
..
app feat(moa): expose MoA presets as selectable virtual models (#46081) 2026-06-25 13:52:06 -07:00
components fix(desktop): recover the root error boundary from transient render races 2026-06-25 16:15:20 -05:00
fonts fix(desktop): crisp terminal text via opaque xterm canvas 2026-06-12 19:36:30 -05:00
hooks fix(desktop): keep generated images in the tool slot, not inline 2026-06-13 02:42:15 -05:00
i18n feat(pets): remix a draft into a fresh round 2026-06-25 01:09:19 -05:00
lib fix(desktop): compact tool row titles 2026-06-25 00:01:11 -05:00
store feat(pets): remix a draft into a fresh round 2026-06-25 01:09:19 -05:00
themes feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -05:00
types feat(moa): expose MoA presets as selectable virtual models (#46081) 2026-06-25 13:52:06 -07:00
global.d.ts Merge remote-tracking branch 'origin/main' into bb/pets-merge 2026-06-23 19:05:22 -05:00
hermes-profile-scope.test.ts fix(desktop): route gateway restart / status / update to the active profile 2026-06-24 19:16:26 -05:00
hermes.test.ts fix(desktop): route profile session reads 2026-06-11 18:09:24 -05:00
hermes.ts feat(moa): expose MoA presets as selectable virtual models (#46081) 2026-06-25 13:52:06 -07:00
main.tsx feat(desktop): floating pet, pop-out overlay + Cmd+K picker 2026-06-20 14:18:40 -05:00
styles.css feat(pets): polish generate flow and reduce hatch CPU pressure 2026-06-24 19:08:06 -05:00
vite-env.d.ts