[PR #7230] Fix for #7229 Fix/project sidebar folder name #12307

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

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

State: closed
Merged: No


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

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7230 **State:** closed **Merged:** No --- 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/9ff34924-dccb-432a-8cc9-cfb4b6189a32" /> After: <img width="359" height="180" alt="sidebar2" src="https://github.com/user-attachments/assets/ff7f4eac-de35-4090-b6e3-7379331e6a63" />
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#12307