From e29f46157494f06b67d15cf43d83effa47d21650 Mon Sep 17 00:00:00 2001 From: Xingkai98 Date: Sun, 10 May 2026 16:24:26 +0800 Subject: [PATCH] fix(dashboard): reset fn toggle on view switch; hide detail toolbar in domain view - Issue 1: setDetailLevel now resets showFunctionsInClassView so the fn toggle doesn't resurrect when re-entering class view after a file-view round-trip. - Issue 2: detail-level toolbar (Files/+Classes/fn) now gated on viewMode !== "domain" so it doesn't render in domain view where it has no effect. --- understand-anything-plugin/packages/dashboard/src/App.tsx | 2 +- understand-anything-plugin/packages/dashboard/src/store.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/understand-anything-plugin/packages/dashboard/src/App.tsx b/understand-anything-plugin/packages/dashboard/src/App.tsx index 9aa7edd..4aed9bf 100644 --- a/understand-anything-plugin/packages/dashboard/src/App.tsx +++ b/understand-anything-plugin/packages/dashboard/src/App.tsx @@ -448,7 +448,7 @@ function Dashboard({ accessToken }: { accessToken: string }) {
{/* Detail level: file view (architecture) / class view (code structure) */} - {!isKnowledgeGraph && ( + {!isKnowledgeGraph && viewMode !== "domain" && ( <>
diff --git a/understand-anything-plugin/packages/dashboard/src/store.ts b/understand-anything-plugin/packages/dashboard/src/store.ts index aff4339..b3b2a96 100644 --- a/understand-anything-plugin/packages/dashboard/src/store.ts +++ b/understand-anything-plugin/packages/dashboard/src/store.ts @@ -344,6 +344,8 @@ export const useDashboardStore = create()((set, get) => ({ set({ detailLevel: level, // Detail level changes which nodes are visible; cached positions stale. + // Reset fn toggle so it doesn't resurrect when re-entering class view. + showFunctionsInClassView: false, containerLayoutCache: new Map(), containerSizeMemory: new Map(), expandedContainers: new Set(),