Problem
When selecting a model in the VSCode Lineage panel, the view renders the model's full transitive lineage — every upstream ancestor and every downstream descendant, including unrelated sibling chains that hang off shared ancestors. For models with rich lineage (e.g. a core dimension with ~30+ downstream nodes across marts/exports), this produces a dense graph where it's hard to see the model's immediate dependencies and consumers.
The existing "Only selected nodes" toggle (CircuitBoard icon) helps narrow the view, but it still walks the full transitive graph via recursive getAllIncomers / getAllOutgoers in web/common/src/components/Lineage/LineageLayoutBase.tsx (lines 122-162). There is no 1-hop mode.
Proposed UX
Replace the current binary toggle with a 3-state cycle button:
- All nodes (current default) — full graph
- Connected (transitive) — current "Only selected nodes" behavior
- Direct (1-hop) — selected node + direct parents + direct children only
Alternatively: keep the existing button and add a second one for "Direct only."
Implementation sketch
In LineageLayoutBase.tsx, the connectedNodes memo (lines 164-173) currently does:
const all = [
...getAllIncomers(selectedNode),
...getAllOutgoers(selectedNode),
]
For 1-hop, swap to React Flow's non-recursive helpers:
const all = [
selectedNode,
...getIncomers(selectedNode, nodes, edges),
...getOutgoers(selectedNode, nodes, edges),
]
(Both are already imported at the top of the file.)
Environment
- sqlmesh
0.234.0
- VSCode extension Lineage panel
Problem
When selecting a model in the VSCode Lineage panel, the view renders the model's full transitive lineage — every upstream ancestor and every downstream descendant, including unrelated sibling chains that hang off shared ancestors. For models with rich lineage (e.g. a core dimension with ~30+ downstream nodes across marts/exports), this produces a dense graph where it's hard to see the model's immediate dependencies and consumers.
The existing "Only selected nodes" toggle (
CircuitBoardicon) helps narrow the view, but it still walks the full transitive graph via recursivegetAllIncomers/getAllOutgoersinweb/common/src/components/Lineage/LineageLayoutBase.tsx(lines 122-162). There is no 1-hop mode.Proposed UX
Replace the current binary toggle with a 3-state cycle button:
Alternatively: keep the existing button and add a second one for "Direct only."
Implementation sketch
In
LineageLayoutBase.tsx, theconnectedNodesmemo (lines 164-173) currently does:For 1-hop, swap to React Flow's non-recursive helpers:
(Both are already imported at the top of the file.)
Environment
0.234.0