Skip to content

fix(dashboard): edges attached to containers are never rendered (missing Handles) + portal edge re-routing on expand#411

Open
maximbelyakov wants to merge 2 commits into
Egonex-AI:mainfrom
maximbelyakov:fix/dashboard-container-edges
Open

fix(dashboard): edges attached to containers are never rendered (missing Handles) + portal edge re-routing on expand#411
maximbelyakov wants to merge 2 commits into
Egonex-AI:mainfrom
maximbelyakov:fix/dashboard-container-edges

Conversation

@maximbelyakov

Copy link
Copy Markdown

Problem

ContainerNode has no React Flow Handle components. React Flow silently skips any edge whose endpoint has no handle, so in the layer-detail view:

  • container → portal dashed edges never render;
  • aggregated container → container edges never render.

Net effect: any layer whose files are grouped into containers looks completely disconnected, even though the graph data has the edges. Single ungrouped files DO render their portal edges, which makes the inconsistency look like bad graph data.

Repro: any graph where a layer has ≥1 container with cross-layer edges; open the layer — portals float with no incident edges.

Fix (commit 1)

  • Add invisible target (top) / source (bottom) handles to ContainerNode.
  • Call useUpdateNodeInternals when the container resizes on expand/collapse, so edge anchors follow the new bounds instead of pointing at the stale pre-expansion geometry.

Follow-up (commit 2)

Stage 1 comments said re-routing portal edges to actual file ids on container expand was deferred ("Task 12 will re-route…") — this implements it: when a container is expanded, its single container→portal edge is replaced with per-file edges (e.g. service.ts → "REST API" portal), via a portalCrossFiles map computed in Stage 1.

Portal cards now also list the names of the external files behind the aggregated connection count (up to 6, then "+N more") via a new findExternalNeighborFiles() helper — before, "REST API — 3 connections" gave no clue WHICH files the layer talks to.

Found while building a graph for a real Java + TypeScript codebase. All 43 dashboard unit tests pass.

ContainerNode had no React Flow Handle components, so every edge whose
endpoint was a container atom (container->portal dashed edges and
aggregated container->container edges) was silently skipped by React
Flow. Add invisible target/top + source/bottom handles, and call
updateNodeInternals when the container resizes on expand/collapse so
edge anchors follow the new bounds instead of pointing at the stale
pre-expansion geometry.
…hbor names on portal cards

1. Portal edges were sourced off container atoms with re-routing on
   expand explicitly deferred (TODO in Stage 1). Implement it: when a
   container is expanded, its container->portal edge is replaced with
   per-file edges from the actual cross-layer files inside it
   (portalCrossFiles map computed in Stage 1).
2. Portal cards now list the names of the external files behind the
   aggregated connection count (up to 6, then +N more), via a new
   findExternalNeighborFiles() helper - the user can see WHICH files in
   the neighboring layer this layer talks to without leaving the view.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant