Files
fusion/packages/dashboard/app/hooks/useShellConnection.ts
gsxdsm 4b666a04fe fix(dashboard): memoize normalized shell state to stop render thrash
normalizeShellState rebuilds the object and its profiles array on every
call. useShellConnection was calling it during render, so consumers that
put state.profiles in a useEffect dep array (AppInner does, for the
shell-connection status effect) re-ran the effect on every render. The
async getShellConnectionNativeResult resolution then triggered another
render, feeding the loop. On desktop it stabilized; on iOS Safari it
could pin the main thread.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 08:37:26 -07:00

1.3 KiB