Tested tool guide
Tested browser tools
Checked August 16, 2026
What Diff / Patch Viewer does, with a checked example
Diff / Patch Viewer converts unified diff text into a structured, color-coded view of each affected file and hunk. It distinguishes removed lines, added lines, and unchanged context while retaining the old and new line positions declared by each hunk header. The frequent mistake is pasting two ordinary source files and expecting a comparison. This viewer expects an existing unified diff or patch, including its line prefixes and hunk metadata.
Worked example
A concrete input and expected output from the current implementation.
Input
--- a/greeting.txt
+++ b/greeting.txt
@@ -1 +1 @@
-Hello, world.
+Hello, Codex.
->
Expected output
One file comparison with old path `a/greeting.txt` and new path `b/greeting.txt`. The single hunk marks `Hello, world.` as a deletion at old line 1 and `Hello, Codex.` as an addition at new line 1.
The hunk header declares one old line and one new line, both beginning at line 1. The minus-prefixed line is removed, and the plus-prefixed line replaces it.