logoalt Hacker News

llbbddtoday at 7:27 PM6 repliesview on HN

I was looking for a good TUI tool for diffs recently, but I'm not sure yet if what I want exists already (and I don't think this tool does it (yet?)). I've been moving my workflow out of VSCode as I'm using TUI-driven coding agents more often lately but one thing I miss from my VSCode/GitHub workflow is the ability to provide a comment on lines or ranges in a diff to provide targeted feedback to the agent. Most diff tools seem to be (rightfully) focused on cleanly visualizing changes and not necessarily iterating on the change.

I admit I haven't looked super hard yet, I settled on configuring git to use delta [0] for now and I'm happy with it, but I'm curious if anyone has a workflow for reviewing/iterating on diffs in the terminal that they'd be willing to share. Also open to being told that I'm lightyears behind and that there's a better mental model for this.

[0] https://github.com/dandavison/delta/


Replies

thamertoday at 10:00 PM

I had tried `delta` a few years ago but eventually went with `diff-so-fancy`[1]

The two are kind of similar if I remember correctly, and both offer a lot of config options to change the style and more. I mostly use it for diffs involving long lines since it highlights changes within a line, which makes it easier to spot such edits.

I have an alias set in `~/.gitconfig` to pipe the output of `git diff` (with options) to `diff-so-fancy` with `git diffs`:

    diffs = "!f() { git diff $@ | diff-so-fancy; }; f"

[1] https://github.com/so-fancy/diff-so-fancy
show 1 reply
kodomomotoday at 8:01 PM

Octo [0] for nvim lets you submit reviews, add comments on ranges, reply to threads, etc.

This in conjunction with gh-dash [1] to launch a review can get you a pretty nice TUI review workflow.

[0] https://github.com/pwntester/octo.nvim

[1] https://github.com/dlvhdr/gh-dash

*Edit: I see you meant providing feedback to an agent, not a PR. Well that's what I get for reading too fast.

show 1 reply
flamestrotoday at 9:28 PM

I was also searching for some time, but most of them did not have enough context for my workflow tbh. So thats why I decided to make deff. Another good one I liked is vimdiff

mckn1ghttoday at 8:40 PM

I use delta for quick diffs in a shell (along with the -U0 option on git-diff), but in my claude workflow, i have a 3 pane setup in tmux: :| where the right side is a claude session, the top left is emacs opened to magit, and the bottom left is a shell. Magit makes navigating around a diff pretty easy (as well as all the other git operations), and I can dive into anything and hand edit as well.

jfynetoday at 8:43 PM

Not TUI based but I made something called meatcheck. The idea being that the LLM requests a review from the human, you can leave inline comments like a PR review.

Once you submit it outputs to stdout and the agent reads your comments and actions them.

https://github.com/jfyne/meatcheck

show 1 reply
coryrctoday at 8:46 PM

magit