←back to thread

262 points lawrencechen | 4 comments | | HN request time: 0.211s | source

0github.com is a pull request viewer that color-codes every diff line/token by how much human attention it probably needs. Unlike PR-review bots, we try to flag not just by "is it a bug?" but by "is it worth a second look?" (examples: hard-coded secret, weird crypto mode, gnarly logic, ugly code).

To try it, replace github.com with 0github.com in any pull-request URL. Under the hood, we split the PR into individual files, and for each file, we ask an LLM to annotate each line with a data structure that we parse into a colored heatmap.

Examples:

https://0github.com/manaflow-ai/cmux/pull/666

https://0github.com/stack-auth/stack-auth/pull/988

https://0github.com/tinygrad/tinygrad/pull/12995

https://0github.com/simonw/datasette/pull/2548

Notice how all the example links have a 0 prepended before github.com. This navigates you to our custom diff viewer where we handle the same URL path parameters as github.com. Darker yellows indicate that an area might require more investigation. Hover on the highlights to see the LLM's explanation. There's also a slider on the top left to adjust the "should review" threshold.

Repo (MIT license): https://github.com/manaflow-ai/cmux

Show context
n2d4 ◴[] No.45763021[source]
> https://0github.com/stack-auth/stack-auth/pull/988

Very fun to see my own PR on Hacker News!

This looks great. I'm probably gonna keep the threshold set to 0%, so a bit more gradient variety could be nice. Red-yellow-green maybe?

Also, can I use this on AI-generated code before creating a PR somehow? I find myself spending a lot of time reviewing Codex and Claude Code edits in my IDE.

replies(2): >>45763252 #>>45769394 #
1. lawrencechen ◴[] No.45763252[source]
Yeah we definitely want to make the gradient and colors configurable.

What form factor would make the most sense for you? Maybe a a cli command that renders the diff in cli or html?

replies(2): >>45764178 #>>45765527 #
2. n2d4 ◴[] No.45764178[source]
Either would work, I think. How I do it right now is that I let AI edit automatically, but then check the diff in Cursor before I stage my Git changes. May be different for others.
replies(1): >>45764658 #
3. lawrencechen ◴[] No.45764658[source]
Yeah, heatmapping the diff before creating a PR would need tighter IDE integration. We're working on cmux for this purpose. It's kinda an IDE, and it lives in the same repo: https://github.com/manaflow-ai/cmux.

After we add the heatmap diff viewer into cmux, I expect that I'll be spending most of my time in between the heatmap diff and a browser preview: https://github.com/manaflow-ai/cmux/raw/main/docs/assets/cmu...

4. froh ◴[] No.45765527[source]
colorbrewer has proven high contrast gradients and also color blind options.

a cli command with two options, console (color) and HTML opens all doors, right?