hermes-agent/apps/desktop/src/components
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
..
assistant-ui fix(ui): share compact tool previews across clients 2026-06-25 00:47:14 -05:00
chat fix(desktop): stop auto-opening tool previews 2026-06-22 19:21:20 -05:00
pane-shell feat(desktop): add timeline rail for long chat threads 2026-06-22 18:34:07 -05:00
pet feat(pets): polish generate flow and reduce hatch CPU pressure 2026-06-24 19:08:06 -05:00
ui feat(pets): polish generate flow and reduce hatch CPU pressure 2026-06-24 19:08:06 -05:00
Backdrop.tsx Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
boot-failure-overlay.tsx feat(desktop): unified overlay design system, BrandMark & onboarding redesign (#40708) 2026-06-06 16:32:47 -05:00
boot-failure-reauth.test.ts feat(desktop): per-profile remote gateway hosts (#39778) 2026-06-05 12:14:18 +00:00
boot-failure-reauth.ts feat(desktop): persist i18n language in config 2026-06-05 10:32:26 -07:00
brand-mark.tsx docs(desktop): add DESIGN.md design-system guide + close two consistency gaps (#40823) 2026-06-06 22:13:17 +00:00
desktop-install-overlay.tsx fix(desktop): stop the update overlay looking frozen while it works 2026-06-24 19:20:38 -05:00
desktop-onboarding-overlay.test.tsx fix(desktop): collect + persist API key for custom OpenAI endpoints (#43896) 2026-06-12 00:03:55 +00:00
desktop-onboarding-overlay.tsx fix: guard OAuth account removal 2026-06-13 21:47:13 -07:00
error-boundary.test.tsx fix(desktop): recover the root error boundary from transient render races 2026-06-25 16:15:20 -05:00
error-boundary.tsx fix(desktop): recover the root error boundary from transient render races 2026-06-25 16:15:20 -05:00
gateway-connecting-overlay.test.tsx fix(desktop): keep composer usable during reconnect (#45488) 2026-06-13 02:36:09 -07:00
gateway-connecting-overlay.tsx fix(desktop): keep composer usable during reconnect (#45488) 2026-06-13 02:36:09 -07:00
haptics-provider.tsx perf(desktop): faster session resume & warm AudioContext at idle 2026-06-12 21:07:40 -05:00
language-switcher.test.tsx Add searchable language picker 2026-06-06 07:51:44 -07:00
language-switcher.tsx Add searchable language picker 2026-06-06 07:51:44 -07:00
model-picker.tsx fix(desktop): honor pre-session model pick + restore global reasoning/speed defaults (#47447) 2026-06-16 16:22:09 -05:00
model-visibility-dialog.tsx fix(desktop): preserve other providers' hide-all in model visibility dialog 2026-06-21 15:42:26 +05:30
notifications.tsx fix(desktop): make rendered logs selectable so they can be copied 2026-06-19 10:03:46 -05:00
page-loader.tsx Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
prompt-overlays.tsx fix: show desktop approval fallback (#46548) 2026-06-21 18:57:18 -05:00
remote-display-banner.tsx feat(desktop): notify renderer when GPU acceleration is disabled due to remote display 2026-06-19 16:59:47 -07:00
session-picker.tsx fix(desktop): route profile session reads 2026-06-11 18:09:24 -05:00
status-dot.tsx Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00