Skip to content

Conversation

@0xajka
Copy link
Contributor

@0xajka 0xajka commented Jan 7, 2026

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:
sidebar

After:
sidebar2

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

@0xajka 0xajka requested a review from adamdotdevin as a code owner January 7, 2026 16:50
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

(Note: PR #7230 was mentioned in the description as the previous attempt that was closed, but it doesn't appear in search results, which is expected if it was already closed/replaced by the current PR #7232. PR #6082 is related to Windows path handling but addresses a different scope - Git Bash/MSYS paths rather than sidebar folder name display.)

@adamdotdevin
Copy link
Contributor

@0xajka just making sure, you tested on non-Windows as well?

@0xajka
Copy link
Contributor Author

0xajka commented Jan 7, 2026

No I don't have a non windows machine, sorry I didn't think about that, if needed I can use a live boot of linux and try it

- Fix getFilename() to handle both / and \ for cross-platform support
- Change tooltip to show folder name instead of worktree path
- Remove duplicate getFilename function in dialog-edit-project
@0xajka 0xajka force-pushed the fix/project-sidebar-folder-name branch from a80d637 to 7fd75b2 Compare January 8, 2026 00:04
@0xajka
Copy link
Contributor Author

0xajka commented Jan 8, 2026

@adamdotdevin re: testing on a non windows machine, I was unable to get my computer to boot linux, did test the getFileName function manually to ensure it would work for either windows (which I also built the app and tested that way) and linux style (tested manually that the function would work
filepath
)

Also the forced push was I noticed there was still a reference to a function from my other PR that wasn't merged so I removed it

@adamdotdevin adamdotdevin merged commit faa848c into anomalyco:dev Jan 8, 2026
aryasaatvik pushed a commit to aryasaatvik/opencode that referenced this pull request Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants