Fullscreen diff: rename label renders directory column wrong #527
Labels
No labels
backend
bug
chore
duplication
effort:complex
effort:medium
effort:trivial
enhancement
follow-up
frontend
fullstack
priority:high
ready-for-agent
refactor
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dries/ocman#527
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 stringold/path.ts → new/path.ts, and the name/directory split is done on the last/of the whole label. So a renamesrc/a.ts → src/b.tsrenders the directory column assrc/a.ts → srcand the filename asb.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
srcand the name columna.ts → b.ts(or similar).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.