The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 09:45 UTC
fix(web): reveal a turn file whose path ends in whitespace (#37879)
Julius Marminge committed
Nov 16, 2026 at 18:38 UTC
77aaabb06161ac051602c2238737ac1c2726c1b8
2 files changed
+3
-5
apps/web/src/components/DiffPanel.browser.test.tsx
+2
-2
@@ -347,10 +347,10 @@ it("says a turn diff cut off at the server's size limit is incomplete", async ()
347
.toBeVisible();
348
});
349
350
-// Paths as git's numstat reports them; the parsed patch trims the trailing space from its name.
350
+// Paths as git's numstat reports them; the parsed patch keeps their edge whitespace.
351
it.each([
352
{ path: " leading.ts", name: " leading.ts" },
353
- { path: "src/trailing.ts ", name: "src/trailing.ts" },
353
+ { path: "src/trailing.ts ", name: "src/trailing.ts " },
354
])("reveals the turn file $path picked from the changed files", async ({ path, name }) => {
355
using context = setup("origin/orphan");
356
state.diffFilesCollapsed = true;
apps/web/src/components/DiffPanel.tsx
+1
-3
@@ -325,9 +325,7 @@ export default function DiffPanel({
325
diffSelection.kind === "branch" || diffSelection.kind === "commit"
326
? diffSelection.baseRef
327
: null;
328
- // @pierre/diffs trims trailing whitespace from parsed file names; leading whitespace survives.
329
- const selectedFilePath =
330
- diffSelection.kind === "turn" ? diffSelection.filePath?.trimEnd() || null : null;
328
+ const selectedFilePath = diffSelection.kind === "turn" ? (diffSelection.filePath ?? null) : null;
329
const selectedFileRevealRequestId =
330
diffSelection.kind === "turn" ? diffSelection.revealRequestId : 0;
331
const selectedTurn =