From d4e5e7f8755eb1656505c3bccc323c3f88e5d49e Mon Sep 17 00:00:00 2001 From: Lum1104 Date: Sun, 29 Mar 2026 11:18:22 +0800 Subject: [PATCH] fix(dashboard): make header legends horizontally scrollable on overflow Split the header into three sections: fixed left (project name, persona), scrollable middle (diff toggle, node type filters, layer legend), and fixed right (filter, export, path, theme actions). Prevents toolbar overflow when projects have many layers or node types. Co-Authored-By: Claude Opus 4.6 --- .../packages/dashboard/src/App.tsx | 75 +++++++++++-------- .../dashboard/src/components/LayerLegend.tsx | 4 +- .../packages/dashboard/src/index.css | 9 +++ 3 files changed, 53 insertions(+), 35 deletions(-) diff --git a/understand-anything-plugin/packages/dashboard/src/App.tsx b/understand-anything-plugin/packages/dashboard/src/App.tsx index a17dbf5..1d95f42 100644 --- a/understand-anything-plugin/packages/dashboard/src/App.tsx +++ b/understand-anything-plugin/packages/dashboard/src/App.tsx @@ -280,46 +280,55 @@ function Dashboard({ accessToken }: { accessToken: string }) {
{/* Header */} -
-
+
+ {/* Left — fixed */} +

{graph?.project.name ?? "Understand Anything"}

-
- -
- {([ - { key: "code", label: "Code", color: "var(--color-node-file)" }, - { key: "config", label: "Config", color: "var(--color-node-config)" }, - { key: "docs", label: "Docs", color: "var(--color-node-document)" }, - { key: "infra", label: "Infra", color: "var(--color-node-service)" }, - { key: "data", label: "Data", color: "var(--color-node-table)" }, - ] as const).map((cat) => ( - - ))} + + {/* Middle — scrollable legends */} +
+
+ +
+ {([ + { key: "code", label: "Code", color: "var(--color-node-file)" }, + { key: "config", label: "Config", color: "var(--color-node-config)" }, + { key: "docs", label: "Docs", color: "var(--color-node-document)" }, + { key: "infra", label: "Infra", color: "var(--color-node-service)" }, + { key: "data", label: "Data", color: "var(--color-node-table)" }, + ] as const).map((cat) => ( + + ))} +
+
- +
+ + {/* Right — fixed actions */} +