Fixes reading pull request diffs so pr://N/diff and pr://N/diff/<path> work again; they previously failed with a gh flag error, and a PR whose changes were all reverted now returns an empty diff instead of failing.
gh rejects combining --slurp with --jq, so the changed-path listing now parses newline-delimited JSON objects instead of a slurped array.
An empty file list is handled as a valid empty diff.
Parsing each page's lines independently keeps renamed paths intact across paginated file lists.
Adds tests for multi-page file lists, empty PR diffs, and empty or invalid response lines, and updates the recorded gh double to answer per-page jq output like the real CLI.
Confidence Score: 5/5
The PR appears safe to merge; no blocking issue remains.
Summary
Fixes pull request diff reads by removing incompatible gh flags and reading changed paths as newline-separated JSON.