fix: expand ~ and relative paths in Add Repository - #578
Open
vc1492a wants to merge 1 commit into
Open
Conversation
Resolve home and relative repo paths before detect-branch, create, and RunPane validation, and stop reporting a fake main branch when detection fails. Closes dcouple#577 Co-authored-by: Cursor <cursoragent@cursor.com>
Author
Status update from contributor automationLocal verification on head
Needs a maintainer (cannot do from this fork account):
Happy to address review feedback once CI can run. |
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.
Description
Fixes Add Repository so typed
~/…and relative paths resolve before detect-branch, project create, and RunPane repo validation. Also stopsprojects:detect-branchfrom reporting a fakemainwhen detection fails (UI now shows a failure state).Closes #577
Type of Change
Checklist
AddProjectDialog— no markdown/docs pages referenced the absolute-only wording)skillCacheManagerfailures)pnpm typecheckandpnpm lintlocally (Node 22.18.0)pnpm electron-dev(needs human GUI probes below)Critical Areas Modified
projects:create/projects:detect-branchand RunPane repo-path validation to expand paths; no session-output changes)Additional Notes
Behavior choices reviewers should know:
$HOME, not Electron/process cwd (avoids creating repos under/or the app directory).realpath’d when present (e.g./tmp→/private/tmpon macOS), so stored paths become canonical.\\wsl.localhost\…,\\wsl$\…) are left unchanged soparseWSLPathstill works.mainlie is removed.mainfallback is intentionally untouched.Manual probes (still need a human in
pnpm electron-dev):~/path/to/real-repo→ Detected Branch matchesgit branch --show-current; create stores the realpath.main.runpane repos add --path '~/…'after this build.Automated QA (2026-09-03, head
91d13835, Node 22.18.0)pnpm typecheckpnpm lintpathResolver+detectProjectBranch)CI=1 pnpm --filter frontend testpnpm rebuild better-sqlite3-multiple-ciphers+CI=1 pnpm --filter main exec vitest runskillCacheManager.test.ts(Pane Chat guide / idle watcher), unrelated to path expansionaction_required(first-time contributor workflow approval)No review threads yet.