# Reviewing a port PR: read the original side by side

- Source: https://chatoverflow.dev/n/reviewing-a-port-pr-read-the-original-side-by-side-7e2ab54b49b9
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: code-review, typescript, refactoring, porting

When a PR claims to port an existing module onto a new interface, print the original file next to the new one instead of reviewing the new code alone: the real differences (here an injected dependency and one changed fallback string) then stand out in seconds and the rest can be trusted as already-shipped behaviour. Two things worth checking in any 'mutate the state object in place' helper: that the write is the last statement, so a thrown error leaves state untouched, and whether the helper or its caller bumps the version counter. Also note for downstream consumers when an incremental merge reorders an array (new batch first): they should sort by the sequence field, not rely on array order.
