What happens
In the Diff panel, file headers sometimes render only the change icon and the +x -y stats — the file name is missing entirely. Clicking the header to open the file in the editor also silently does nothing in that state.
Whether names appear depends on which diff scope is shown:
- Working tree scope: names are always missing
- Checkpoint/turn diffs and branch-range diffs: names render normally
- GitHub/GitLab PR diffs: names render normally (headers are synthesized server-side)
Repro
- Enable the (fairly common) dotfile setting:
git config --global diff.mnemonicPrefix true
- Change a tracked file, open the Diff panel, select the Working tree scope.
- Every file header shows icon + stats but no file name. The browser console logs
parsePatchContent: invalid git diff header diff --git c/<path> w/<path>.
Root cause
The server generates review patches with plain git diff (e.g. git diff --patch --no-color --no-ext-diff --no-textconv --minimal HEAD --), which inherits the user's global git config. With diff.mnemonicPrefix = true, git replaces the standard a//b/ prefixes:
| command | header |
|---|
git diff HEAD (working tree) | diff --git c/<path> w/<path> |
git diff (worktree vs index) | diff --git i/<path> w/<path> |
git diff <commit> <commit> (checkpoints, branch range) | diff --git a/<path> b/<path> (unaffected) |
The @pierre/diffs patch parser only recognizes the standard prefixes — ALTERNATE_FILE_NAMES_GIT = /^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/ and FILENAME_HEADER_REGEX_GIT = /^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/. When neither matches, the parsed file keeps its initialized name: "" (hunks and stats still parse fine), so the header renders with no title.
Verified against @pierre/diffs@1.3.0-beta.10 directly:
mnemonicprefix: name="" prevName=null type=change hunks=1 stats=+1 -0
standard: name="arquivo.txt" prevName=null type=change hunks=1 stats=+1 -0
diff.noprefix = true breaks it the same way for every scope (headers become diff --git <path> <path>).
Suggested fix
Force the standard prefixes on patch-producing git commands, e.g. prepend -c diff.mnemonicprefix=false -c diff.noprefix=false to the review/checkpoint diff invocations, so server-generated patches always parse regardless of the user's global git config.

What happens
In the Diff panel, file headers sometimes render only the change icon and the
+x -ystats — the file name is missing entirely. Clicking the header to open the file in the editor also silently does nothing in that state.Whether names appear depends on which diff scope is shown:
Repro
parsePatchContent: invalid git diff header diff --git c/<path> w/<path>.Root cause
The server generates review patches with plain
git diff(e.g.git diff --patch --no-color --no-ext-diff --no-textconv --minimal HEAD --), which inherits the user's global git config. Withdiff.mnemonicPrefix = true, git replaces the standarda//b/prefixes:git diff HEAD(working tree)diff --git c/<path> w/<path>git diff(worktree vs index)diff --git i/<path> w/<path>git diff <commit> <commit>(checkpoints, branch range)diff --git a/<path> b/<path>(unaffected)The
@pierre/diffspatch parser only recognizes the standard prefixes —ALTERNATE_FILE_NAMES_GIT = /^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/andFILENAME_HEADER_REGEX_GIT = /^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/. When neither matches, the parsed file keeps its initializedname: ""(hunks and stats still parse fine), so the header renders with no title.Verified against
@pierre/diffs@1.3.0-beta.10directly:diff.noprefix = truebreaks it the same way for every scope (headers becomediff --git <path> <path>).Suggested fix
Force the standard prefixes on patch-producing git commands, e.g. prepend
-c diff.mnemonicprefix=false -c diff.noprefix=falseto the review/checkpoint diff invocations, so server-generated patches always parse regardless of the user's global git config.