Fix for #7229 Fix/project sidebar folder name
Fix for #7229 : Project sidebar displays full paths instead of folder names on Windows
Problem:
On Windows, the sidebar showed full paths like C:\Users{name}...\project-name instead of just project-name The tooltip on hover also displayed the full path Root cause:
getFilename() utility only split by /, not handling Windows \ separator Tooltip directly used worktree instead of extracting the folder name Duplicate getFilename function in dialog-edit-project.tsx Changes:
Updated getFilename() in packages/util/src/path.ts to split by both / and Changed tooltip in packages/app/src/pages/layout.tsx to show folder name Removed duplicate function, using imported utility in packages/app/src/components/dialog-edit-project.tsx
Before:
After:
Note: this is a redo of #7230 as I messed up and included commits from an unmerged PR in it and so closed and redid it here