Skip to content

Fix relationship type/flip live update + orthogonal Welcome graph; add interaction audit#57

Merged
mvalancy merged 1 commit into
developfrom
fix/interaction-audit
Jun 14, 2026
Merged

Fix relationship type/flip live update + orthogonal Welcome graph; add interaction audit#57
mvalancy merged 1 commit into
developfrom
fix/interaction-audit

Conversation

@mvalancy

Copy link
Copy Markdown
Member

What

Two basic, user-facing graph interactions were silently broken. Fixed test-first (each failure demonstrated before its fix), plus a reusable interaction-audit harness.

Bugs fixed

1. Relationship type change didn't update the label; flip duplicated the edge.
The reinitialization gatekeeper effect in InteractiveGraphVisualization.tsx keyed only on node props + edge count. An edge whose type changed kept the same count, and a flip (delete + recreate → same count, new id) also kept the count — so neither re-ran the effect and the DOM stayed stale (old label / lingering duplicate). Fix: track an edge signature (id + type + direction), force a reinit when it changes, and add the signature to the effect's dependency array so the change is actually observed.

2. The Welcome graph broke the layout rules it's meant to teach.
Seed nodes sat at the unpinned origin, edges were diagonal, and spacing was tighter than the edge label. Re-authored onboarding.ts onto an orthogonal grid: every edge horizontal or vertical, spaced for label + small margin, every node placed/pinned, no edge routed through a non-endpoint node. (The original two-hub structure can't be fully orthogonal, so the tutorial flow was simplified — content we own.)

Tests (test-first: shown failing, then green)

  • New tests/diagnostics/interaction-audit.spec.ts — drives the real UI: type change → label "Blocks" immediately (no reload); flip → exactly one edge, direction swapped.
  • New onboarding-template.test.ts — asserts the Welcome template is orthogonal, spaced, connected, fully placed, and routes no edge through a node.

Verification

  • Interaction audit: pass · Onboarding template: 5/5
  • THE GATE (smoke): 5/5 · Web unit: 122/122 · Server onboarding: 5/5

🤖 Generated with Claude Code

…d interaction audit

Basic graph interactions were silently broken. Test-first, each failure shown
before its fix:

- Relationship TYPE change didn't update the edge label, and flipping an edge's
  DIRECTION left a stale duplicate. Root cause: the reinitialization gatekeeper
  effect keyed only on node props + edge COUNT, so an edge whose type changed
  (same count) or whose direction flipped (delete+create => same count, new id)
  never triggered a rebuild. Fix: track an edge signature (id + type +
  direction) and force a reinit when it changes; add the signature to the
  effect's dependency array so the change is observed.

- The Welcome onboarding graph violated the layout rules new users are meant to
  learn: nodes at the unpinned origin, diagonal edges, and spacing tighter than
  the edge label. Re-authored the template onto an orthogonal grid (every edge
  horizontal or vertical, spaced for the label + small margin, every node
  placed/pinned, no edge routed through a non-endpoint node).

Verification:
- New tests/diagnostics/interaction-audit.spec.ts drives the real UI: type
  change -> label "Blocks" immediately (no reload); flip -> exactly one edge,
  direction swapped. Shown failing first, green after the fix.
- New onboarding-template.test.ts asserts the Welcome template is orthogonal,
  spaced, connected, fully placed, and routes no edge through a node.
- THE GATE 5/5, web unit 122/122, server onboarding 5/5.

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 6666acd into develop Jun 14, 2026
16 checks passed
@mvalancy mvalancy deleted the fix/interaction-audit branch June 14, 2026 07:45
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