feat: container diagram edge routing, auto layout & service switcher#2
Merged
abdullahbodur merged 2 commits intomainfrom Mar 23, 2026
Merged
feat: container diagram edge routing, auto layout & service switcher#2abdullahbodur merged 2 commits intomainfrom
abdullahbodur merged 2 commits intomainfrom
Conversation
- Re-enable routeEdges for containerDiagram (was skipped, causing suboptimal default handle assignment) - Add deferred 150ms second-pass re-route after React Flow measures actual node dimensions, using getNodes() from Zustand store to avoid stale React state positions - Fix onNodeDragStop: replace setEdges-inside-setNodes-updater anti-pattern with getNodes() so drag-end positions are always fresh - Show Auto Layout button for containerDiagram (re-routes to closest handles without dagre); same getNodes() fix applied - Extend service switcher panel to containerDiagram so users can switch services without losing context - Add buildServiceContainer.ts: builds per-service container view (service node + infra children + external dependency nodes + edges) - Extend archmap.yml types in scanner, graph-builder, and web to support infra declarations (databases, queues, caches, external services) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ighlighting Data flow view - Frontend-built data flow view (buildDataFlowView.ts) — deduplicates DTOs across services, draws DTO→DTO type-reference edges, strips generics correctly - DataTypeNode shows all fields without truncation; enums styled in amber, DTOs in purple - Click any DTO node to open a JSON example popup (DtoJsonModal) with recursive nested expansion and enum-aware values Function flow - Frontend-built function flow view (buildFunctionFlowView.ts) replaces the static graph-builder output; filters out @Configuration/@Application noise - Functions grouped in labeled ClassGroupNode containers by class name with kind-colored accent bars; click header to collapse/expand a group - Kind filter bar (SERVICE / HTTP / CONSUMER / REPO / SCHEDULED) to hide layers - Isolated private helpers (no outgoing calls) are pruned automatically Edge improvements - All edges switched to bezier with arrowclosed markers (16×16) for clean heads - Clicking any node highlights its connected edges in amber; dims the rest - Click canvas background to clear selection - Parallel edges get varied curvatures so they arc apart visually Order service examples - Added OrderMaintenanceScheduler (3 @scheduled jobs: expire, report, archive) - Added NotificationService (email confirmation, cancellation, fraud alert) - Added ReportingService (daily summary, monthly revenue via PricingService) - Re-ran local scanner — order-service now has 43 functions across 14 classes Tests - New buildDataFlowView.test.ts (18 tests) and buildDtoExample.test.ts (20 tests) - data-flow.test.ts rewritten for DTO→DTO edge contract - data-types.test.ts extended with enum detection cases - Added vitest config for web app with @/ path alias resolution Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
routeEdgeswas being skipped entirely, causing React Flow's default (suboptimal) handle assignment. Now runs on every view, with a 150ms deferred second pass after React Flow measures actual node dimensions.onNodeDragStopfixed — edges re-route to the closest dock point after any node drag. Previous implementation calledsetEdgesinside asetNodesupdater (anti-pattern); replaced withgetNodes()which reads React Flow's Zustand store synchronously, guaranteeing fresh drag-end positions.getNodes()fix applied.buildServiceContainer.ts— new library that builds a per-service container view (service node + infra children + external dependency nodes + labeled edges).archmap.ymlinfra declarations supported across scanner, graph-builder, and web packages.Test plan
pnpm --filter @archmap/web exec tsc --noEmitpasses with no errors🤖 Generated with Claude Code