From 6a9a9d03ae338654f07fa312cf2a3779626fa30a Mon Sep 17 00:00:00 2001 From: Bernhard Jackiewicz Date: Fri, 2 Oct 2026 18:34:23 +0200 Subject: [PATCH 01/12] fix(ui): open node and symbol scopes one layer deep Selecting a symbol in the Galaxy loaded zero hops, so the toolbar read "0 layers, 1 node, 0 edges" and the edge-type filter had nothing to offer until the reader pressed Expand. A single node has no relationships of its own, so node and symbol scopes now start at depth 1 and cannot go below it. File and folder scopes keep depth 0, where their internal edges are already included. The reader range label uses a plain hyphen. Signed-off-by: Bernhard Jackiewicz --- .../galaxy/GalaxyPanel.background.test.tsx | 2 +- graph-ui/src/galaxy/GalaxyPanel.tsx | 2 +- graph-ui/src/galaxy/use-graph-scope.test.tsx | 24 +++++++++++++++++++ graph-ui/src/galaxy/use-graph-scope.ts | 15 ++++++++---- 4 files changed, 37 insertions(+), 6 deletions(-) diff --git a/graph-ui/src/galaxy/GalaxyPanel.background.test.tsx b/graph-ui/src/galaxy/GalaxyPanel.background.test.tsx index 92cbb4e43..55d878cca 100644 --- a/graph-ui/src/galaxy/GalaxyPanel.background.test.tsx +++ b/graph-ui/src/galaxy/GalaxyPanel.background.test.tsx @@ -51,7 +51,7 @@ it('returns a standalone hierarchy selection to the overall Galaxy without stale await act(async () => select.click()); const evidence = JSON.parse(onSelectionEvidence.mock.lastCall![0].text).evidence; expect(evidence.selected.scope).toMatchObject({ kind: 'node', id: 1, name: 'node1' }); - expect(evidence.scope).toMatchObject({ depth: 0, direction: 'both', edgeTypes: 'all' }); + expect(evidence.scope).toMatchObject({ depth: 1, direction: 'both', edgeTypes: 'all' }); expect(evidence.limitations.state).not.toBe('complete-indexed-scope'); await act(async () => host.querySelector('[data-mode="hierarchy"]')!.click()); expect(globalThis.__atlasGalaxy?.mode).toBe('hierarchy'); diff --git a/graph-ui/src/galaxy/GalaxyPanel.tsx b/graph-ui/src/galaxy/GalaxyPanel.tsx index 252030257..3590cc852 100644 --- a/graph-ui/src/galaxy/GalaxyPanel.tsx +++ b/graph-ui/src/galaxy/GalaxyPanel.tsx @@ -2215,7 +2215,7 @@ export default function GalaxyPanel(props: GalaxyPanelProps): JSX.Element { } {props.workspaceExpanded && kind.type)} selected={traceTypes} onChange={changeTraceTypes} />} - {scope.depth} {scope.depth === 1 ? 'layer' : 'layers'}