[PR #7232] Fix for #7229 Fix/project sidebar folder name #12309

Closed
opened 2026-02-16 18:17:13 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7232

State: closed
Merged: Yes


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

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7232 **State:** closed **Merged:** Yes --- 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: <img width="336" height="166" alt="sidebar" src="https://github.com/user-attachments/assets/862e70f7-c4b4-4cf1-8c24-e730b0178917" /> After: <img width="359" height="180" alt="sidebar2" src="https://github.com/user-attachments/assets/4d4db2e2-50e4-4356-982f-b49df055e36c" /> 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
yindo added the pull-request label 2026-02-16 18:17:13 -05:00
yindo closed this issue 2026-02-16 18:17:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12309