From 3e72c424424e13605426a0df4835f90518105037 Mon Sep 17 00:00:00 2001 From: Agung Subastian Date: Thu, 9 Jul 2026 08:44:48 +0700 Subject: [PATCH] perf: unmount idle Marketplace/Admin/Docs/ApiTest views Classic layout kept every center view mounted via a CSS hidden class instead of conditionally rendering, so each view's own polling (incl. cloud-touching calls in Marketplace) ran forever in the background regardless of which tab was visible, and their state/DOM never got released, growing memory over a long session. Mount only the active view for these four, matching the pattern FocusShell already uses correctly. Widgets/Terminal/AI Chat stay always-mounted (home view / live sessions that must survive switching away and back). --- web/src/os/Desktop.tsx | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/web/src/os/Desktop.tsx b/web/src/os/Desktop.tsx index d07740b..5e73b97 100644 --- a/web/src/os/Desktop.tsx +++ b/web/src/os/Desktop.tsx @@ -302,23 +302,29 @@ export function Desktop() {
-
- -
+ {view === "apitest" && ( +
+ +
+ )}
move(id, "drawer")} />
-
- -
- {isMod && ( -
+ {view === "marketplace" && ( +
+ +
+ )} + {isMod && view === "admin" && ( +
)} -
- -
+ {view === "docs" && ( +
+ +
+ )}