Skip to content

feat(review-tutor): add the Structure graph - #72

Merged
ElbertePlinio merged 1 commit into
mainfrom
feat/review-tutor-structure-graph
Aug 25, 2026
Merged

feat(review-tutor): add the Structure graph#72
ElbertePlinio merged 1 commit into
mainfrom
feat/review-tutor-structure-graph

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

Refs #62 — PR 3 of 4 (deterministic Structure graph). Stacked on #71; part of the batched Review Tutor chain.

What changed

  • A List | Graph switch inside the Structure view (List stays the default at every width; the choice is remembered per tab).
  • One inline SVG: changed files as nodes in a deterministic layered layout (longest-path layering, stable in-layer order by directory then path; byte-identical coordinates for identical snapshots), connections as straight lines with a small arrowhead, colored by status like the list (type-only at reduced opacity). Multi-layer edges route below intermediate rows and back edges below the drawing, so no line ever crosses a label. No physics, no motion.
  • Selecting a node or an edge (click, Enter, Space; Escape clears) shows the same evidence rows and Open in Diff the list uses — same jump path and landing marker. Exactly one selection, one ember.
  • Honest size bound: more than 60 drawable nodes or 200 connections shows one sentence instead of a hairball; zero drawable nodes shows one sentence.
  • Elements added: exactly four (switch, SVG, reused evidence panel, size-bound note). No legend, clusters, filters, tooltips, zoom, or minimap — per branding-visual/DESIGN-PRINCIPLES.md.

Tested

  • Layout determinism, layering on a DAG and a cycle, in-layer ordering, edge routing never intersecting a node rect, size bounds, zero-drawable copy, selection exclusivity, Escape/keyboard order, aria labels, mode persistence, evidence reuse + Open in Diff from the graph, no innerHTML; list mode tests unchanged. Rendered proof at 1440 / 860 / 390 / 360@4x for loaded, node-selected, edge-selected, size-bound, and keyboard-focus states.
  • bun run check: 490 passed | 25 skipped, 81.51% statements.

Not tested

  • Graphs near the size bound on real repositories (fixture-driven renders only).

Local review: serious user-facing class — three independent reviewers (correctness, tests/conformance/doctrine, UI/accessibility with rendered inspection). Human gate: merge only on Elberte's authorization.

@ElbertePlinio

Copy link
Copy Markdown
Member Author

Ready for human review at c4a2f82. Panel + verification clean; low-severity follow-ups listed on #62.

@ElbertePlinio
ElbertePlinio force-pushed the feat/review-tutor-structure-list branch from 616dd86 to 060055c Compare August 25, 2026 19:12
@ElbertePlinio
ElbertePlinio changed the base branch from feat/review-tutor-structure-list to main August 25, 2026 19:14
Add a List | Graph switch inside the Structure view with a
deterministic layered SVG of changed files and their evidence-backed
connections, routed around intermediate nodes, reusing the list's
evidence rows and Open in Diff for the selected node or edge, with an
honest size bound and List as the default everywhere.
@ElbertePlinio
ElbertePlinio force-pushed the feat/review-tutor-structure-graph branch from c4a2f82 to c276cba Compare August 25, 2026 19:16
@ElbertePlinio
ElbertePlinio merged commit 49bf22f into main Aug 25, 2026
4 checks passed
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