From 554e551386e799c48f9c39e4b3bca775130b1377 Mon Sep 17 00:00:00 2001 From: viettranx Date: Tue, 10 Mar 2026 20:33:24 +0700 Subject: [PATCH] fix(kg): use flex layout for full-height graph rendering Replace fixed h-[500px] with flex-1 min-h-0 so graph fills available viewport. Fix knowledge graph page and entities tab containers. --- .../knowledge-graph/knowledge-graph-page.tsx | 4 +- ui/web/src/pages/memory/kg-entities-tab.tsx | 4 +- ui/web/src/pages/memory/kg-graph-view.tsx | 51 ++++++++++--------- 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/ui/web/src/pages/knowledge-graph/knowledge-graph-page.tsx b/ui/web/src/pages/knowledge-graph/knowledge-graph-page.tsx index 4fb14fce..4a71f8c4 100644 --- a/ui/web/src/pages/knowledge-graph/knowledge-graph-page.tsx +++ b/ui/web/src/pages/knowledge-graph/knowledge-graph-page.tsx @@ -12,7 +12,7 @@ export function KnowledgeGraphPage() { const [userIdFilter, setUserIdFilter] = useState(""); return ( -
+
{/* Header + filters in one row */}
@@ -44,7 +44,7 @@ export function KnowledgeGraphPage() {
{/* Content */} -
+
{!agentId ? ( +
{/* Search + stats + actions — single compact row */}
{/* Content area */} +
{viewMode === "graph" ? (
)} +
{/* Entity detail dialog */} +
{t("kg.graphView.empty")}
); } return ( -
- - - - { - const type = (n.data as any)?.type as string; - return (TYPE_COLORS[type] || DEFAULT_COLOR).border; - }} - maskColor="rgba(0,0,0,0.1)" - /> - +
+
+ + + + { + const type = (n.data as any)?.type as string; + return (TYPE_COLORS[type] || DEFAULT_COLOR).border; + }} + maskColor="rgba(0,0,0,0.1)" + style={{ width: 100, height: 75 }} + /> + +
{/* Legend */}