From 95de798414b9fb6dc0e6e050a3de33872198d0db Mon Sep 17 00:00:00 2001 From: Guilhem Date: Wed, 4 Mar 2026 16:04:44 +0000 Subject: [PATCH] refactor: hide group header card when expanded, keep only tab and ellipsis menu Co-Authored-By: Claude Opus 4.6 --- .../lib/components/graph/FlowGraphV2.svelte | 8 +- .../lib/components/graph/GroupOverlay.svelte | 84 +++++++------------ .../components/graph/groupEditor.svelte.ts | 11 +-- 3 files changed, 36 insertions(+), 67 deletions(-) diff --git a/frontend/src/lib/components/graph/FlowGraphV2.svelte b/frontend/src/lib/components/graph/FlowGraphV2.svelte index a6608bc772..3667ce44a8 100644 --- a/frontend/src/lib/components/graph/FlowGraphV2.svelte +++ b/frontend/src/lib/components/graph/FlowGraphV2.svelte @@ -718,12 +718,10 @@ // Apply group label spacing (pushes nodes down like group notes do) const groups = groupEditorContext?.groupEditor.getGroups() ?? [] - const noteHeights = showNotes ? (groupEditorContext?.groupEditor.getNoteHeights() ?? {}) : {} if (groups.length > 0) { const groupPositions = computeGroupSpacing( groups, - finalNodes.map((n) => ({ id: n.id, position: n.position })), - noteHeights + finalNodes.map((n) => ({ id: n.id, position: n.position })) ) finalNodes = finalNodes.map((n) => ({ ...n, @@ -734,10 +732,11 @@ // Apply collapsed group note spacing const collapsedGroups = groupEditorContext?.groupEditor.getCollapsedGroups() ?? [] if (collapsedGroups.length > 0) { + const collapsedNoteHeights = showNotes ? (groupEditorContext?.groupEditor.getNoteHeights() ?? {}) : {} const collapsedPositions = computeCollapsedGroupNoteSpacing( collapsedGroups, finalNodes.map((n) => ({ id: n.id, position: n.position })), - noteHeights + collapsedNoteHeights ) finalNodes = finalNodes.map((n) => ({ ...n, @@ -1120,7 +1119,6 @@ {hoveredNodeId} allNodes={nodesWithOffset as (Node & { type: string })[]} {editMode} - {showNotes} /> diff --git a/frontend/src/lib/components/graph/GroupOverlay.svelte b/frontend/src/lib/components/graph/GroupOverlay.svelte index 80b12afa4c..88df2eb2ef 100644 --- a/frontend/src/lib/components/graph/GroupOverlay.svelte +++ b/frontend/src/lib/components/graph/GroupOverlay.svelte @@ -1,11 +1,9 @@