From f08b72268b1cc9f9e1f92b7c0042d93e0c2f5370 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Sat, 21 Mar 2026 17:20:40 -0700 Subject: [PATCH] fix(spaces): filter disabled modules from both rApp dropdowns renderExternalAppShell was passing the full unfiltered module list to both the app-switcher and tab-bar dropdowns. Now filters by the space's enabledModules, matching the existing renderShell behavior. Co-Authored-By: Claude Opus 4.6 --- server/shell.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/shell.ts b/server/shell.ts index 377b2dd..8fb8d79 100644 --- a/server/shell.ts +++ b/server/shell.ts @@ -1297,7 +1297,12 @@ export function renderExternalAppShell(opts: ExternalAppShellOptions): string { theme = "dark", } = opts; - const moduleListJSON = JSON.stringify(modules); + // Filter modules by space's enabledModules (same logic as renderShell) + const enabledModules = getSpaceShellMeta(spaceSlug).enabledModules; + const visibleModules = enabledModules + ? modules.filter(m => m.id === "rspace" || enabledModules.includes(m.id)) + : modules; + const moduleListJSON = JSON.stringify(visibleModules); const demoUrl = `?view=demo`; return versionAssetUrls(`