Skip to content

Keep review graphs aligned on empty and service-shaped walks - #25

Merged
cursor[bot] merged 3 commits into
mainfrom
cursor/oss-pr-graph-campaign-93f2
Aug 16, 2026
Merged

cursor[bot] merged 3 commits into
mainfrom
cursor/oss-pr-graph-campaign-93f2

Conversation

@Modsofthenation

@Modsofthenation Modsofthenation commented Aug 16, 2026

Copy link
Copy Markdown
Owner

What

Ran Loadpath against 30 public Django/React PRs and fixed the graph/review mismatches that showed up.

Campaign (first pass)

Indexed each PR head, walked the review impact graph plus the architecture graph, and checked dangling edges, missing files, layout overlap, and whether sinks/findings/checklist ids resolve on the graph that is shown.

First pass: 25/30 internally linked. Four empty-impact ranges (docs/version/constants/CI) leaked the whole architecture into the review and were mis-titled leaf ui. django-filter hit a local worktree clone glitch (same PR had already passed a smoke review: 516 nodes / 568 edges). Isolated test-only walks (kitsune, taiga) were missing the dataclasses/permission classes the diff actually changed.

Fixes

  • Stop classifying an empty impact set as leaf_ui
  • Scope review findings to the walk (or changed files), not the full architecture
  • Drop checklist node_ids that are not on the review graph
  • Extract @dataclass types as services and *Permission classes as permission nodes; include both on the architecture map
  • Show “no typed nodes on this walk” instead of “index the repo first” when a review exists but extracted nothing
  • Unify view permission_classes with extracted *Permission class ids
  • Keep the graph tab on the loading state while architecture is still hydrating
  • Stop the index-progress e2e from blocking other API routes (CI flake)

After the fix, the four leaking reviews are internal_service with 0 findings. Kitsune goes from 163 isolated tests to 183 nodes / 15 edges (18 services). Taiga’s changed permission classes appear on the walk.

Evidence

pretix 2D graph with inspector
oscar empty-walk message
pontoon React graph inspector
pretix_pr_graph_nodes_edges_inspector.mp4
oscar_empty_walk_and_pontoon_react_graph.mp4

Tests

pytest on the touched unit files, the previously failing test_ui_index_polls_progress_endpoint, and cd ui && npm test (74 vitest cases).

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • New Features

    • Architecture graphs now include services and permissions.
    • Dataclass-based services and permission relationships are recognized in code analysis.
    • Tests can be linked to the entities they exercise.
  • Bug Fixes

    • Improved review impact classification and filtering for empty or documentation-only changes.
    • Removed invalid checklist links when referenced graph nodes are unavailable.
  • User Interface

    • Added a clear empty state when no impact graph data is available.
    • Refreshed graph styling, responsive layouts, controls, and light/dark themes.

Empty impact ranges were classified as leaf UI and inherited every architecture finding, so checklist items pointed at nodes the review graph did not contain. Scope findings to the walk, extract permission classes and dataclasses onto the map, and show an empty-walk state instead of a missing-index message.

Co-authored-by: zord.lack.net <zord.lack.net@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 850134b0-cb94-4323-b105-672e0a1b7bd6

📥 Commits

Reviewing files that changed from the base of the PR and between 8b30cdc and 25f2b8a.

📒 Files selected for processing (8)
  • src/loadpath/extractors/django.py
  • src/loadpath/index.py
  • src/loadpath/static/assets/LayeredGraph3D-Dg13YVFZ.js
  • src/loadpath/static/assets/index-Cj5VBWfS.js
  • src/loadpath/static/index.html
  • tests/e2e/test_ui_flows.py
  • tests/unit/test_django_extractors.py
  • ui/src/App.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • ui/src/App.tsx
  • src/loadpath/static/index.html
  • tests/unit/test_django_extractors.py
  • src/loadpath/extractors/django.py

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The PR adds Django permission and dataclass graph extraction, updates review finding scoping, handles empty graph states, refreshes frontend assets, and updates related tests and indexing behavior.

Changes

Architecture and review flow

Layer / File(s) Summary
Django graph extraction
src/loadpath/extractors/django.py, src/loadpath/architecture/snapshot.py, src/loadpath/index.py, tests/unit/test_django_extractors.py
Django extraction now emits permission nodes, classifies non-test dataclasses as services, normalizes permission identities, and links tests to permission entities. Architecture snapshots support service and permission nodes. Index revision changes to 16.
Review finding and checklist scoping
src/loadpath/review/engine.py, src/loadpath/review/experience.py, tests/unit/test_review_features.py, tests/unit/test_experience.py
Empty impact types no longer produce UI-only classification. Findings and checklist references are limited to impacted or resolvable nodes and changed files.
Empty graph rendering
ui/src/App.tsx, ui/src/ImpactGraph.tsx, ui/src/ImpactGraph.test.ts, ui/src/styles.css
The graph stage renders for available reviews or indexed architectures. Empty walks display a dedicated message instead of a graph view.
Browser asset refresh
src/loadpath/static/assets/*, src/loadpath/static/index.html, tests/e2e/test_ui_flows.py
Generated frontend assets and hashed HTML references are refreshed. The 3D graph bundle uses the new Three.js chunk. Progress polling accepts Indexing and waits up to 20 seconds.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Merge Risk: ⚪ Minimal · up to 25f2b

This change aligns review graphs for empty and service-shaped walks and adds focused extraction and UI handling; no actionable merge-blocking risk remains beyond normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant DjangoSource
  participant DjangoExtractor
  participant ArchitectureSnapshot
  DjangoSource->>DjangoExtractor: provide classes, views, and test references
  DjangoExtractor->>DjangoExtractor: normalize permission identities and classify entities
  DjangoExtractor->>ArchitectureSnapshot: emit service and permission nodes
  DjangoExtractor->>ArchitectureSnapshot: add permission-aware test usage edges
Loading

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

Co-authored-by: zord.lack.net <zord.lack.net@gmail.com>
@Modsofthenation
Modsofthenation marked this pull request as ready for review August 16, 2026 04:30
View permission_classes now share node ids with extracted *Permission classes so the inspector and tests point at the same node. The graph tab shows the loading state while architecture is still hydrating. The progress e2e no longer blocks other API routes with a sleep, which was racing the poll assertion in CI.

Co-authored-by: zord.lack.net <zord.lack.net@gmail.com>
@cursor
cursor Bot merged commit 846036e into main Aug 16, 2026
2 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.

2 participants