Summary
Cross-layer navigation can keep stale container layout state, causing the target layer graph to render incorrectly.
Affected paths in packages/dashboard/src/store.ts:
navigateToNodeInLayer
navigateToHistoryIndex
goBackNode
These paths can switch activeLayerId but do not clear:
containerLayoutCache
containerSizeMemory
expandedContainers
pendingFocusContainer
Reproduction
- Open a graph with containers in multiple layers.
- Enter layer A, for example
Storefront.
- Expand a container, for example
Cluster A.
- Use search result, history, breadcrumb, or back navigation to jump to a node in layer B, for example
Checkout > renderCart.
- If layer B has a container with the same id, the graph may reuse layer A's cached child positions.
Actual behavior
The breadcrumb and side panel can show the target layer/node, but the main graph does not render the expected target-layer nodes.
In my repro, the UI showed Project > CHECKOUT and selected renderCart, but the main React Flow canvas did not show Checkout nodes such as renderCart, Cart Drawer UI, or Cart State Store.
Actual screenshot
It shows Project > CHECKOUT and renderCart selected in the side panel, but the main graph does not show the expected Checkout nodes such as renderCart, Cart Drawer UI, or Cart State Store.
Expected behavior
When navigation switches to a different layer, container layout/cache state should be cleared and recomputed for that layer.
A correctly rendered Checkout layer should show Checkout's own nodes inside the expanded containers, for example Cart State Store, renderCart, Cart Drawer UI, or related Checkout functions.
Expected screenshot
The graph may still contain empty space because of layout/zoom, but Checkout's own nodes should be visible in the canvas. For example, this fresh Checkout layout shows nodes such as Cart State Store and renderOperationsView.
Why this likely happens
drillIntoLayer, navigateToOverview, and filter/detail-level setters already clear container layout state. The three cross-layer navigation paths above also change activeLayerId, but keep the old container cache. Container ids can collide across layers, so the new layer may reuse stale child positions from the previous layer.
Impact
Visible UI rendering bug. No data corruption, but common navigation paths can make the graph look empty or incorrect.
Summary
Cross-layer navigation can keep stale container layout state, causing the target layer graph to render incorrectly.
Affected paths in
packages/dashboard/src/store.ts:navigateToNodeInLayernavigateToHistoryIndexgoBackNodeThese paths can switch
activeLayerIdbut do not clear:containerLayoutCachecontainerSizeMemoryexpandedContainerspendingFocusContainerReproduction
Storefront.Cluster A.Checkout > renderCart.Actual behavior
The breadcrumb and side panel can show the target layer/node, but the main graph does not render the expected target-layer nodes.
In my repro, the UI showed
Project > CHECKOUTand selectedrenderCart, but the main React Flow canvas did not show Checkout nodes such asrenderCart,Cart Drawer UI, orCart State Store.Actual screenshot
It shows
Project > CHECKOUTandrenderCartselected in the side panel, but the main graph does not show the expected Checkout nodes such asrenderCart,Cart Drawer UI, orCart State Store.Expected behavior
When navigation switches to a different layer, container layout/cache state should be cleared and recomputed for that layer.
A correctly rendered Checkout layer should show Checkout's own nodes inside the expanded containers, for example
Cart State Store,renderCart,Cart Drawer UI, or related Checkout functions.Expected screenshot
The graph may still contain empty space because of layout/zoom, but Checkout's own nodes should be visible in the canvas. For example, this fresh Checkout layout shows nodes such as
Cart State StoreandrenderOperationsView.Why this likely happens
drillIntoLayer,navigateToOverview, and filter/detail-level setters already clear container layout state. The three cross-layer navigation paths above also changeactiveLayerId, but keep the old container cache. Container ids can collide across layers, so the new layer may reuse stale child positions from the previous layer.Impact
Visible UI rendering bug. No data corruption, but common navigation paths can make the graph look empty or incorrect.