• llbbdd an hour ago

    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/

    • kodomomo 25 minutes ago

      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.

    • k_bx 41 minutes ago

      What I would love to see is "tig" replacement that is:

      - even faster, especially if you have couple thousand files and just want to press "u" for some time and see them very quickly all get staged

      - has this split-view diff opened for a file

      Otherwise tig is one of my favorite tools to quickly commit stuff without too many key presses but with review abilities, i have its "tig status" aliased to "t"

      • rileymichael an hour ago

        getting users to adopt a new tool with its own incantations is a tough sell. git supports specifying an external pager so folks can plug in alternatives (such as https://github.com/dandavison/delta) while still using the familiar git frontend

        • meain 2 hours ago

          I have been using https://github.com/jeffkaufman/icdiff for the longest time to get side by side diffs.

          • lf-non an hour ago

            I also use icdiff, but it is good to have the file-awareness for git diff esp. the ability to quickly skip files that I know aren't important.

            • Amorymeltzer an hour ago

              For that in particular, I use delta (<https://github.com/dandavison/delta>) with `side-by-side = true` enabled. I find I use both icdiff and delta side-by-side on a regular basis.

              • behnamoh an hour ago

                Delta is so much faster than icdiff too.

          • raphinou 22 minutes ago

            Looks interesting. I'm currently using https://tuicr.dev/ , of which I like that the first screen it shows is the choice of commit range you want to review. Might be something to consider for deff?

            • yottamus an hour ago

                  git difftool --tool=vimdiff
              • metalliqaz an hour ago

                but is it blazingly fast?

                • syngrog66 20 minutes ago

                  if its not in Rust or browser-based or a "cloud" service or the result of multi-GWH of LLM "training" or a VSCode plugin or ideally all of the prior then the HN kids wont be interested :-)

              • hatradiowigwam 11 minutes ago

                vimdiff is pretty fast, and is likely installed on your linux system without you realizing it.

                • jamiecode an hour ago

                  The specific gap side-by-side covers for me is reviewing changes on a remote box without firing up an IDE. Delta is great but keeps the unified format. icdiff does the split view but is pretty barebones. So there's definitely space here.

                  What nobody's mentioned yet is difftastic. Takes a completely different approach - parses syntax trees instead of lines, so indentation changes and bracket shuffles don't show up as noise. Worth a look if you're comparing options.

                  Main question I'd have: how does it hold up on large files? 5k+ line diffs are where most of these tools either choke or produce unreadable output. That'd be the test I'd run first.

                  • teddyh an hour ago

                      emacs --eval='(ediff-files "file1" "file2")'
                    
                    (The “|” key toggles side-by-side view.)
                    • ZoomZoomZoom an hour ago

                      Why shouldn't this be a simple wrapper to tie Delta to some kind of file browser or a thing like television?

                      • syngrog66 19 minutes ago

                        television??