#455·sphere

[HIGH] Desktop↔tab navigation remounts DesktopLayout, reloading every open iframe app

Author: KruGoLCreated Jul 23, 2026Updated Jul 23, 2026
Labelsbug

Summary

HomePage (/home) and AgentPage (/agents/:agentId) are different components that each render <DesktopLayout />. React unmounts the whole subtree when the matched route element type changes, so every navigation between the desktop and any tab destroys and recreates DesktopLayout — including the openTabs.map() block that deliberately keeps inactive tabs mounted-but-hidden to preserve state (DesktopLayout.tsx:169-185). Every open iframe app reloads on each desktop/tab switch.

Where

src/App.tsx:51, src/components/desktop/DesktopLayout.tsx:169-185.

Fix

Render DesktopLayout once in a shared layout route (make /home and /agents/:agentId children of a route whose element is DesktopLayout) so element identity is stable across navigation.

Found by multi-agent audit @ main b477d4d7; adversarially verified. Fix is app-side.