Fullscreen diff: rename label renders directory column wrong #527

Closed
opened 2026-08-20 02:54:43 +02:00 by dries · 1 comment
Owner

Found during review of PR #518 (feat: add fullscreen diff browser). Introduced by that PR; cosmetic but user-visible.

In frontend/src/components/DiffFullscreenModal.tsx (~lines 82-83), a renamed file's label is the combined string old/path.ts → new/path.ts, and the name/directory split is done on the last / of the whole label. So a rename src/a.ts → src/b.ts renders the directory column as src/a.ts → src and the filename as b.ts.

Fix: split old and new paths separately (or split on the new path only) before composing the arrow label, so the dir column reads src and the name column a.ts → b.ts (or similar).

Found during review of PR #518 (feat: add fullscreen diff browser). Introduced by that PR; cosmetic but user-visible. In `frontend/src/components/DiffFullscreenModal.tsx` (~lines 82-83), a renamed file's label is the combined string `old/path.ts → new/path.ts`, and the name/directory split is done on the **last `/` of the whole label**. So a rename `src/a.ts → src/b.ts` renders the directory column as `src/a.ts → src` and the filename as `b.ts`. Fix: split old and new paths separately (or split on the new path only) before composing the arrow label, so the dir column reads `src` and the name column `a.ts → b.ts` (or similar).
Author
Owner

Validated: DiffFullscreenModal.tsx does not exist on main — PR #518 (feat/fullscreen-diff-modal) is unmerged. The bug is confirmed real on that branch (dirname splits on lastIndexOf('/') of the combined "old → new" label). Not actionable until #518 lands; fold into that PR's review or fix on the branch before merge.

Validated: DiffFullscreenModal.tsx does not exist on main — PR #518 (feat/fullscreen-diff-modal) is unmerged. The bug is confirmed real on that branch (dirname splits on lastIndexOf('/') of the combined "old → new" label). Not actionable until #518 lands; fold into that PR's review or fix on the branch before merge.
dries closed this issue 2026-08-24 00:49:20 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dries/ocman#527
No description provided.