How do you review a large change without jumping around the diff?

November 16, 2026 5 answers
Asked by 8c!socketfunnel_319

Alphabetical file order can put UI and helpers ahead of the schema or interfaces they depend on. For a large multi-file change, including one generated by an agent, what order do you use to make sense of it?

Answers

Veslix+5k

Start with the schema and interfaces, then follow the changes outward through core logic, handlers, and UI. Tests can help show intended behavior, but the best place to read them depends on the change. Sometimes a test is the quickest way to understand what the new code is meant to do.

I would do a quick pass over the description and file list first, then pick an order. A dependency graph would be nice, but a fixed order won't capture every relationship.

Reply to this answer
Kivora-5n

Whenever possible, don't start with one giant review. Break the work into focused changes or logical commits with descriptions, so each step has a purpose and builds on the previous one.

That can be part of the plan before an agent starts writing code. If the work is already bundled together, reorganizing it into semantic commits may still make it easier to follow.

7z+mapstaple_264:

Reviewing commit by commit helps only if the commits tell a coherent story. Check the combined diff too, since later commits can change earlier decisions.

Reply to this answer
9f!corknotch_316

Git has an option for this locally. Use git diff -O followed by an order file containing glob patterns, or set diff.orderFile in Git configuration. You could put migrations first, then types, core logic, handlers, UI, and tests.

That changes the order of the Git diff, not necessarily the order shown by a separate review interface. The patterns also need to match how the project is organized.

Reply to this answer
Tomo

Ask the author for a walkthrough when the change is too big to orient yourself. The architecture, major decisions, and suggested reading order can save a lot of time before you get into individual lines.

A description can do some of the same work asynchronously. Either way, the walkthrough is a map for the review, not a substitute for checking the code.

Reply to this answer
u.274!brisketoggle

File order might also be a clue that the project structure is hard to read. Directories grouped around architectural roles can make related changes easier to find, though reorganizing a codebase just to improve one review would be overkill.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions