Review code 100X faster
PR lens draws animated architecture and data flow diagrams, inside the pull request, so you can see the change before you read a single line
- Open source
- No API key
- Works locally
- MIT licensed
Not Mermaid.
A custom renderer built for humans. With zero cognitive overload
See code through a new lens
See what truly matters before you read any line of code. Software is changing. The way we read it is as well
Rich visuals
Depth, weight, glyph and colour carry meaning. Not dark lines on white boxes.
Additions, changes and deletions in context
What is new, what was touched and what was taken out, visually linked. You see it before you read it.
The whole system, not just the diff
A pull request touches one part and moves several. The parts it did not touch stay on the page, so you build a model of the system rather than a patch
Animated data flow
See how the system moves and connect the dots faster.Animation is usually a distraction. Here it is intentional
It arrives where you already are
One comment on the pull request, rewritten on every push
One document. Every lens.
A deterministic render from a strongly typed schema
{
"kind": "graph",
"lenses": [
"architecture",
"data-flow"
],
"lanes": [
{ "id": "api", "label": "API" }
],
"nodes": [
{
"id": "health-route",
"label": "GET /health",
"kind": "route",
"delta": "modified",
"lane": "api"
}
]
}Lanes, nodes and edges, each carrying what the change did to it. Nothing in here says how to draw anything.
It scales with the diff
A one file fix and a monorepo refactor get the same treatment. Only what changed, grouped into the lanes it changed in.
A single endpoint changed. The render says so and stops.
Drawn from real pull requests
Famous PRs redrawn with PR Lens
Powered by Lens
A new kind of render. A pure function from a schema-checked document to an SVG, optimised for one thing; being understood at a glance.
import { render } from "@coldtea/pr-lens-renderer";
const { svg } = render(doc, { lens: "architecture", theme: "dark" });- Zero dependencies
- The schema it validates against, and nothing else. No layout engine, no browser, no runtime of its own
- Deterministic
- Text is measured against an embedded table rather than a font engine, so a CI runner with no fonts installed draws the same bytes as your laptop
- No JavaScript in the output
- Motion is animateMotion in the markup. That is why a diagram still moves inside a GitHub comment, where scripts are stripped
- Not only pull requests
- If it is code, it can be drawn. Use it in a blog post, a documentation site, or a local tool. The schema is the same, and the renderer is the same
Turn it on
Install the App and every pull request in the repositories you pick gets drawn. Or hand the prompt to the agent you already have open.
Install the GitHub App
Pick the repositories once. Every pull request opened in them is drawn and redrawn on each push, with no key of yours anywhere in it.