Review Multi-File Changes and Rehearse Rollback
Split a booking-status change across domain and view into reviewable steps, catch an out-of-scope file, and choose a safe reversal.
Today's Goals
- Review a multi-file diff by file and behavior.
- Distinguish Cursor checkpoints from Git history when reverting.
- Record why each edit should stay, be redone, or be removed.
Plain-Language Walkthrough
Split a large request into reviewable behavior
A booking-status change may require a domain status helper, the confirmation view, and a test to move together. This is larger than D2's single display fix, but it still needs a boundary. The fictional request is to show whether a booking is confirmed or pending. The allowed paths are booking/domain/slots.js, booking/ui/Confirmation.js, and booking/tests/confirmation.test.js. Agent unexpectedly edits billing/ledger.js as well. The reviewer must decide what to keep and what to reject without destroying a teammate's later manual work. This is a review exercise; the workbook does not contain an actual Cursor diff or a real checkpoint.
Before editing in a live repository, record the base revision and current working-tree state. A diff is meaningful only relative to a known base. If there are pre-existing changes, identify their owner and separate them from the Agent task. Then ask Agent to make the change in stages: describe the status contract, change the domain helper, adapt the UI, add tests, run focused checks. Smaller stages give the reviewer a chance to catch a mistaken contract before it spreads across files. They also make it easier to explain which test proves which behavior.
Interview questions
How do you review a multi-file Agent change?如何审阅 Agent 的多文件改动?
Common in ChinaCommon overseasBasic#cursor#workflow🔒 Unlock this chapter to see the answer keys.
Why is a Cursor checkpoint different from a Git commit?Cursor checkpoint 与 Git 提交有何不同?
Common in ChinaCommon overseasIntermediate#cursor#workflow🔒 Unlock this chapter to see the answer keys.
When is selective rework safer than broad restore?什么时候选择性重做比整段恢复更安全?
Common in ChinaCommon overseasDeep dive#cursor#workflow🔒 Unlock this chapter to see the answer keys.
