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 b477d4d; adversarially verified. Fix is app-side.
Summary
HomePage(/home) andAgentPage(/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 recreatesDesktopLayout— including theopenTabs.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
DesktopLayoutonce in a shared layout route (make/homeand/agents/:agentIdchildren of a route whoseelementisDesktopLayout) so element identity is stable across navigation.Found by multi-agent audit @ main b477d4d; adversarially verified. Fix is app-side.