You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Correction to the implementation sketch above — I'd originally pointed at web/common/src/components/Lineage/LineageLayoutBase.tsx, but the VSCode lineage panel doesn't actually use @sqlmesh-common. The code that runs in the VSCode panel lives in vscode/react/src/components/graph/:
ModelLineage.tsx — renders the panel
context.tsx — LineageFlowContext with withConnected / withImpacted / withSecondary flags (all force-set to true on mount, which is why the panel currently shows everything)
SettingsControl.tsx — the cog menu in the bottom-left of the panel
Opened #5815 with a proposed implementation along those lines. It adds a withOnlyDirect boolean + a memoized directNeighbors set (selected model + direct parents + direct children, computed from the lineage map) and a new toggle in the settings menu. Default off, so existing behavior is unchanged.
Activity
lvanoverberghe commentedon May 28, 2026
Last update to the VS Code extension was over 8 months ago.
tjirab commentedon May 28, 2026
Correction to the implementation sketch above — I'd originally pointed at
web/common/src/components/Lineage/LineageLayoutBase.tsx, but the VSCode lineage panel doesn't actually use@sqlmesh-common. The code that runs in the VSCode panel lives invscode/react/src/components/graph/:ModelLineage.tsx— renders the panelcontext.tsx—LineageFlowContextwithwithConnected/withImpacted/withSecondaryflags (all force-set totrueon mount, which is why the panel currently shows everything)help.ts—getUpdatedNodes/getUpdatedEdgesdecide node/edge visibilitySettingsControl.tsx— the cog menu in the bottom-left of the panelOpened #5815 with a proposed implementation along those lines. It adds a
withOnlyDirectboolean + a memoizeddirectNeighborsset (selected model + direct parents + direct children, computed from the lineage map) and a new toggle in the settings menu. Default off, so existing behavior is unchanged.Feat: Add "Only Direct Neighbors" filter to VSCode lineage panel
nickmuoh commentedon Jun 15, 2026
This can be close since #5815 has been merged