Show HN: I made a heatmap diff viewer for code reviews

lawrencechen | 229 points

Why does it require signing and granting you full access to act as me on Github to use?

cmux-agent requires access to your Github account:

    Verify your GitHub identity
    Know what resources you can access
    Act on your behalf
    View your email addresses
I would have logged an issue for this but I see you've disabled logging issues on the repo. Seems a bit sus to me.
smcleod | 16 hours ago

It’s an interesting direction, but feels pretty expensive for what might still be a guess at what matters.

I’m not sure an LLM can really capture project-specific context yet from a single PR diff.

Honestly, a simple data-driven heatmap showing which parts of the code change most often or correlate with past bugs would probably give reviewers more trustworthy signals.

kburman | 18 hours ago

> 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.

n2d4 | 18 hours ago

You’re not going to be able to keep the domain name 0github.com for too long. I’d suggest you start finding a new one immediately.

otterley | 11 hours ago

I think the need for such a tool should be avoided by simply making reasonable PRs. And what's ironic is that I now have to review PRs written by a no-code person using AI tools. They even response to my comments using AI as well. And with this tool it becomes even more absurd. I guess next step is to replace the reviewer with another AI tool.

rckt | 4 hours ago

I tried it on a low-complexity Rust PR I worked on a few months back and it did a pretty good job. I'd probably change where the highlights live (for example x.y.z() -> x.w.z() should highlight y/w in a lot of cases).

For the most part, it seems to draw the eye to the general area where you need to look closer. It found a near-invisible typo in a coworker's PR which was kind of interesting as well.

https://0github.com/geldata/gel-rust/pull/530

It seems to flag _some_ deletions as needing attention, but I feel like a lot of them are ignored.

Is this using some sort of measure of distance between the expected token in this position vs the actual token?

EDIT: Oh, I guess it's just an LLM prompt? I would be interested to see an approach where the expected token vs actual token generates a heatmap.

mmastrac | 18 hours ago

This is very cool and I could see it being really useful especially for those giant PRs. I'd prefer it if instead of the slider I could just click the different heatmap colors and if they indicated what exactly they were for (label not threshold). I get the underlying premise but at a glance it's more to process unless I was to end up using this constantly.

timenotwasted | 20 hours ago

You should have clear metrics, not ChatGPT. ChatGPT is not trained on a huge dataset related to this task.

rf15 | 6 hours ago

This is something I have found missing in my current workflow when reviewing PR's. Particularly in the age of large AI generated PR's.

I think most reviewers do this to some degree by looking at points of interest. It'd be cool if this could look at your prior reviews and try to learn your style.

Is this the correct commit to look at? https://github.com/manaflow-ai/cmux/commit/661ea617d7b1fd392...

cdiamand | 19 hours ago

Maybe add some caching? I clicked one of the example PRs and it kept loading forever...

ramonga | 18 hours ago

Can someone please explain to me how do people build these kind of tools? My background is classic Java/C# backend development and SQL. A bit microservice using Spring Boot. Its 8:30pm and I'm watching React tutorials to understand better how modern websites are built - e.g. use useState, useRef etc.

Now, how does any of my experience translate to building tools like cmux? I genuinely want to understand how.

Is the answer to go line by line of cmux code base or make an attempt to open a PR on one of the bugs issues on cmux and, by magic and time, I will eventually understand?

mattfrommars | 12 hours ago

This is really useful. Might want to add a checkbox at a certain threshold, so that reviewers explicitly answer the concerns of the LLM. Also you can start collecting stats on how "easy to review" PR's of team members are, e.g. they'd probably get a better score if they address the concerns in the comments already.

jtwaleson | 20 hours ago

I like the idea!

File `apps/client/electron/main/proxy-routing.ts` line 63

Adding a comment to explain why the downgrade is done would have resulted in not raising the issue?

Also two suggestions on the UI

- anchors on lines

- anchors on files and ability to copy a filename easily

wiether | 19 hours ago

I think this "'should review' threshold" is a really great idea, but I probably wouldn't be able to trust it enough to make it useful.

nzach | 19 hours ago

This makes reading long PRs not instantly LGTM… now the heatmap guides my eyes so I know where to look.

austinwang115 | 19 hours ago

This is cool! Please add a dark theme and respect `prefers-color-scheme: dark` :)

HellsMaddy | 7 hours ago

Very, very useful. I'll give it a try. Thanks for sharing!

antback | 16 hours ago

Change the domain name, you will likely get a cease and desist otherwise.

petralithic | 18 hours ago

I feel like this is really smart. Going to have to set it up!

skeptrune | 19 hours ago

wondering what if you run a SAST (a fast one) and share that with codex alongside the code diff?

rishabhaiover | 17 hours ago

yoooooo this looks awesome!

tiffnami | 15 hours ago

Reminds me of this one, highlighting for text https://github.com/mattneary/salience

383toast | 19 hours ago

How do I opt out of this tool? I do not want anyone reviewing my code or projects to use or engage with it and it is explicitly against the TOS of those projects. It would be nice if this tool screened for a robots.txt or something of the sort so that I could ensure that this tool never touches my projects.

fao_ | 16 hours ago