Skip to content

Hierarchical graphs PR2+3: guest-visible demo hierarchy + drill-in navigation#60

Merged
mvalancy merged 2 commits into
developfrom
feat/hierarchical-graphs-nav
Jun 14, 2026
Merged

Hierarchical graphs PR2+3: guest-visible demo hierarchy + drill-in navigation#60
mvalancy merged 2 commits into
developfrom
feat/hierarchical-graphs-nav

Conversation

@mvalancy

Copy link
Copy Markdown
Member

Builds on PR1 (#59, the DRILLS_INTO schema). Delivers the Altium-style "graphs of graphs" experience end-to-end.

Seed: guest-visible hierarchy demo (npm run create-hierarchy-demo)

services/hierarchyDemo.ts + runner. Idempotent, non-destructive (unlike db:seed):

  • A System Overview graph of 16 sheet-symbol nodes, each with subgraphId + DRILLS_INTO a sub-graph; inter-sheet "wires" kept endpoint-local to the overview.
  • 16 sub-graphs (one ~1000-node Compute Core for the high-perf / LOD showcase), 2911 work items / 4073 edges total.
  • All createdBy:'system' + isShared:true → visible to the guest account (read-only). Edge nodes carry both EDGE_SOURCE+EDGE_TARGET.

Navigation: drill-in / breadcrumb

  • GraphContext: descendInto / ascendTo / getBreadcrumb (breadcrumb derived from the graph path).
  • A plain click on a sheet-symbol node descends into its sub-graph (via a ref so the D3 handler isn't re-bound; grow/drag/edit unaffected).
  • Workspace: a breadcrumb bar (Up + clickable ancestors) when inside a sub-graph.

Why the hierarchy = the performance strategy

You never render all ~2900 nodes at once: the overview shows 16 sheets; descending loads one sub-graph (≤1000). This reuses the existing renderer instead of a canvas rewrite.

Also: fix fresh-load default graph

GraphContext now picks the default graph by identity (Welcome → System Overview) instead of array position — the new shared/system demo graphs were hijacking the fresh-load view (caught by THE GATE).

Verified

  • tests/diagnostics/hierarchy-navigation.spec.ts: overview (16 sheets) → click → descends into the 1000-node Compute Core sub-graph → breadcrumb → Up returns.
  • THE GATE 5/5 · web+server typecheck clean · seed idempotent · 17 guest-visible graphs.

Follow-up PR4: visual treatment for sheet nodes (distinct style + descend glyph + child counts).

🤖 Generated with Claude Code

mvalancy and others added 2 commits June 14, 2026 10:10
Adds an Altium-style hierarchy demo, visible to the guest account, that
showcases high-performance / dynamic LOD via drill-in (the hierarchy is the
LOD strategy — never render all ~2900 nodes at once).

- services/hierarchyDemo.ts + scripts/create-hierarchy-demo.ts (npm run
  create-hierarchy-demo): idempotent, NON-destructive. Builds a "System
  Overview" graph of 16 sheet-symbol WorkItems, each with subgraphId +
  DRILLS_INTO a sub-graph; inter-sheet wires kept endpoint-local to the
  overview. 16 sub-graphs (one ~1000-node "Compute Core" perf showcase),
  totaling 2911 work items / 4073 edges. All createdBy:'system' isShared:true
  (guest-visible, read-only). Edge nodes carry both EDGE_SOURCE+EDGE_TARGET.
- GraphContext.tsx: fresh-load default graph now picked by identity (Welcome,
  then System Overview) instead of array position — shared/system demo graphs
  no longer hijack the default view. (The seed surfaced this latent fragility.)

Verified: 17 system/shared graphs, overview sheets resolve subgraph counts,
big sub-graph = 1000 nodes, idempotent re-run skips; THE GATE 5/5.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Makes the "graphs of graphs" hierarchy navigable like Altium schematics.

- GraphContext: descendInto(subgraphId) / ascendTo(graphId) / getBreadcrumb()
  (breadcrumb derived from the graph's path ancestors + itself). Added to the
  context type.
- InteractiveGraphVisualization: a plain click on a sheet-symbol node (one with
  subgraphId) descends into its sub-graph, via a ref so the D3-bound handler
  isn't re-created. Grow/connect, drag, and edit/relationship icons are
  unaffected (handled earlier / stopPropagation).
- Workspace: a breadcrumb bar (Up button + clickable ancestors) shown when
  inside a sub-graph.

Verified by tests/diagnostics/hierarchy-navigation.spec.ts: System Overview
(16 sheets) -> click descends into the 1000-node Compute Core sub-graph ->
breadcrumb -> Up returns to the overview. Web typecheck clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧪 Comprehensive Test Suite

  • Unit suites (Node 18.x & 20.x) — core, web, server, mcp-server: ✅ passed
  • Installer & deploy config: ✅ passed

Full-stack smoke gate runs in the CI workflow.

@mvalancy mvalancy merged commit cfec582 into develop Jun 14, 2026
16 checks passed
@mvalancy mvalancy deleted the feat/hierarchical-graphs-nav branch June 14, 2026 17:40
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