Repository navigation
fix(workspace): read a Windows worktree folder name - #807
Merged
Ishaan Gangwani (ishaan1124) merged 1 commit intoSep 29, 2026
Conversation
ANIRUDDHA ADAK (aniruddhaadak80)
requested review from
Aayam Bansal (aayambansal) and
Ishaan Gangwani (ishaan1124)
as code owners
September 28, 2026 18:45
|
ANIRUDDHA ADAK (@aniruddhaadak80) is attempting to deploy a commit to the InkVell Team on Vercel. A member of the Team first needs to authorize it. |
Ishaan Gangwani (ishaan1124)
force-pushed
the
fix/project-folder-name-windows
branch
from
September 29, 2026 01:24
ef2f8f3 to
20b6213
Compare
The fallback split only on /, so a worktree the server reported with native separators produced one segment and the whole path became the project title. Four other path helpers in the tree already split on both separators.
Ishaan Gangwani (ishaan1124)
force-pushed
the
fix/project-folder-name-windows
branch
from
September 29, 2026 01:31
20b6213 to
2679dff
Compare
Ishaan Gangwani (ishaan1124)
merged commit Sep 29, 2026
7de7274
into
synthetic-sciences:main
1 check failed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
folderName— the fallback used when a project has no configured name — split only on/:A backslash path is one element, so
.at(-1)is the whole path.Why it matters
The server reports native separators:
backend/cli/src/project/project.tsreturnsworktreestraight frompath.resolve()/ the opened directory, with no POSIX normalisation anywhere in the tree.projectNameis the title for the project list, the workbench header, and the command palette entry. On a Windows server, a project with no name — or one whose namereadable()rejects for containing control characters or U+FFFD — showed its full path where every other surface shows the folder name. The same string also goes into each row's accessible label and the palette's search keys.Verification
New file —
pages/home-projects.test.tsdid not exist. Three of six fail before the fix:The whole
src/pages/suite is green: 64 pass, 0 fail across 17 files.The change
function folderName(worktree: string) { if (worktree === "/") return "/" - const parts = worktree.split("/").filter(Boolean) + // The server reports native separators, so a Windows worktree arrives with + // backslashes and a forward-slash split would return the whole path. + const parts = worktree.split(/[\\/]/).filter(Boolean) return parts.at(-1) ?? worktree }Four other path helpers in this codebase already split on both separators, so the fallback was disagreeing with its own siblings:
atlas/command-palette-scope.ts:4context/permission.tsx:156atlas/FilesPane.tsx:386pages/session-undo.ts:19Frontend typecheck clean; touched files are Prettier-clean (checked on LF-normalized copies — this checkout has
core.autocrlf=true, which makes Prettier flag every file in the repo).Fixes #806