From 4bce89aecb05a08d6a4c3e7b4f61f5ab59c4c5c7 Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Sun, 23 Aug 2026 22:01:38 +0200 Subject: [PATCH] fix(c2,arch-004): workspace visibleModuleKeys respects is_visible=false --- frontend/src/store/workspaceStore.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/store/workspaceStore.ts b/frontend/src/store/workspaceStore.ts index b69009a..696be2a 100644 --- a/frontend/src/store/workspaceStore.ts +++ b/frontend/src/store/workspaceStore.ts @@ -36,7 +36,7 @@ export interface WorkspaceContextState { name?: string; icon?: string; role?: string; - modules: { module_key: string; menu_order: number; config: Record }[]; + modules: { module_key: string; menu_order: number; config: Record; is_visible?: boolean }[]; widgets: WorkspaceWidgetConfig[]; error?: string; } @@ -102,7 +102,13 @@ export const useWorkspaceStore = create()( visibleModuleKeys: () => { const ctx = get().context; - return new Set(ctx?.modules?.map(m => m.module_key) || []); + // ARCH-004: respect is_visible=false from workspace module config. + // Modules without the flag stay visible (backward compatible). + return new Set( + (ctx?.modules ?? []) + .filter(m => m.is_visible !== false) + .map(m => m.module_key) + ); }, hasWorkspaces: () => get().myWorkspaces.length > 0,