Skip to content

Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.

fix(dashboard): preserve sidebar composition + restore slide-up code viewer

Lum1104c6f540911164
diff --git a/CLAUDE.md b/CLAUDE.md
index 10334a4f..9ab3dc7a 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -20,8 +20,8 @@ An open-source tool combining LLM intelligence + static analysis to produce inte
- Dark luxury theme: deep blacks (#0a0a0a), gold/amber accents (#d4a574), DM Serif Display typography
- Graph-first layout: 75% graph + 360px right sidebar
- No ChatPanel or Monaco Editor
-- Sidebar: ProjectOverview (default) → NodeInfo (node selected) → LearnPanel (Learn persona)
-- Code viewer: styled summary overlay (slides up from bottom on file node click)
+- Sidebar tabs: `Info` (ProjectOverview default → NodeInfo when node selected → LearnPanel in Learn persona, composing) and `Files` (FileExplorer tree built from the structural graph)
+- Code viewer: prism-react-renderer source viewer that slides up from the bottom on file node click; an expand button promotes it into a full-screen modal. Source content is fetched from the dev server's `/file-content.json` endpoint, gated by access token + a graph-derived path allowlist
- Schema validation on graph load with error banner
## Agent Pipeline
diff --git a/understand-anything-plugin/packages/dashboard/src/App.tsx b/understand-anything-plugin/packages/dashboard/src/App.tsx
index 0e21e174..b3240e6c 100644
--- a/understand-anything-plugin/packages/dashboard/src/App.tsx
+++ b/understand-anything-plugin/packages/dashboard/src/App.tsx
@@ -345,11 +345,7 @@ function Dashboard({ accessToken }: { accessToken: string }) {
</>
);
- const sidebarContent = codeViewerOpen ? (
- <Suspense fallback={null}>
- <CodeViewer accessToken={accessToken} onExpand={expandCodeViewer} />
- </Suspense>
- ) : (
+ const sidebarContent = (
<div className="h-full flex flex-col min-h-0">
<div className="flex items-center gap-1 p-2 border-b border-border-subtle bg-surface shrink-0">
{(["info", "files"] as const).map((tab) => (
@@ -367,7 +363,7 @@ function Dashboard({ accessToken }: { accessToken: string }) {
</button>
))}
</div>
- <div className="flex-1 min-h-0 overflow-hidden">
+ <div className="flex-1 min-h-0 overflow-auto">
{sidebarTab === "files" ? <FileExplorer /> : infoSidebarContent}
</div>
</div>
@@ -538,9 +534,18 @@ function Dashboard({ accessToken }: { accessToken: string }) {
</div>
{/* Right sidebar */}
- <aside className="w-[360px] shrink-0 bg-surface border-l border-border-subtle overflow-hidden">
+ <aside className="w-[360px] shrink-0 bg-surface border-l border-border-subtle overflow-auto">
{sidebarContent}
</aside>
+
+ {/* Code viewer slide-up overlay (collapsed state) */}
+ {codeViewerOpen && !codeViewerExpanded && (
+ <div className="absolute bottom-0 left-0 right-0 h-[40vh] bg-surface border-t border-border-subtle animate-slide-up z-20 overflow-hidden">
+ <Suspense fallback={null}>
+ <CodeViewer accessToken={accessToken} onExpand={expandCodeViewer} />
+ </Suspense>
+ </div>
+ )}
</div>
{/* Expanded code viewer modal */}
diff --git a/understand-anything-plugin/packages/dashboard/src/components/CodeViewer.tsx b/understand-anything-plugin/packages/dashboard/src/components/CodeViewer.tsx
index 1f4548e0..4d8b0182 100644
--- a/understand-anything-plugin/packages/dashboard/src/components/CodeViewer.tsx
+++ b/understand-anything-plugin/packages/dashboard/src/components/CodeViewer.tsx
@@ -67,7 +67,12 @@ export default function CodeViewer({
const codeViewerNodeId = useDashboardStore((s) => s.codeViewerNodeId);
const closeCodeViewer = useDashboardStore((s) => s.closeCodeViewer);
const activeGraph = viewMode === "domain" && domainGraph ? domainGraph : graph;
- const node = activeGraph?.nodes.find((n) => n.id === codeViewerNodeId) ?? null;
+ // Files tab always builds its tree from the structural graph, so a node ID opened from
+ // there may not exist in the active (domain) graph — fall back to the structural graph.
+ const node =
+ activeGraph?.nodes.find((n) => n.id === codeViewerNodeId) ??
+ graph?.nodes.find((n) => n.id === codeViewerNodeId) ??
+ null;
const [state, setState] = useState<SourceState>({
status: "idle",
source: null,