You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
Loading
Priority
Tier 2 — Differentiator and marketing asset. These diagrams are highly shareable.
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_diagramconfig option and the symbol graph to construct these, but:Proposed Solution
API Handler → Service → Repository → Database<details>tags)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: UserResponsePriority
Tier 2 — Differentiator and marketing asset. These diagrams are highly shareable.