-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or requestpriority: lowLower priority / backlogLower priority / backlog
Description
Problem
Greptile and CodeRabbit auto-generate Mermaid sequence diagrams showing call flow for changed functions. These are highly shared by engineering teams and function as organic marketing. DiffScope has the smart_review_diagram config option and the symbol graph to construct these, but:
- It's off by default
- It's not wired into the GitHub PR comment flow
- The symbol graph data isn't used to generate accurate call-flow diagrams
Proposed Solution
- Enable diagram generation by default in smart review mode
- Use symbol graph data to generate accurate sequence/flow diagrams:
- Call flow:
API Handler → Service → Repository → Database - Data flow: How data transforms through the changed code path
- Dependency graph: What modules are affected by this change
- Call flow:
- Embed Mermaid diagrams in PR comments — GitHub natively renders Mermaid in markdown
- Collapsible by default in the summary comment (use
<details>tags) - Generate diagrams only when meaningful — skip for trivial changes (typos, config, etc.)
Example Output
sequenceDiagram
participant Client
participant AuthMiddleware
participant UserController
participant UserService
participant PostgreSQL
Client->>AuthMiddleware: POST /api/users (changed)
AuthMiddleware->>UserController: validateToken()
UserController->>UserService: createUser(dto) (changed)
UserService->>PostgreSQL: INSERT users (changed)
PostgreSQL-->>UserService: User record
UserService-->>UserController: UserResponse
Priority
Tier 2 — Differentiator and marketing asset. These diagrams are highly shareable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpriority: lowLower priority / backlogLower priority / backlog