Skip to content

fix: expand ~ and relative paths in Add Repository - #578

Open
vc1492a wants to merge 2 commits into
dcouple:mainfrom
vc1492a:fix/expand-user-repo-paths
Open

vc1492a wants to merge 2 commits into
dcouple:mainfrom
vc1492a:fix/expand-user-repo-paths

Conversation

@vc1492a

@vc1492a vc1492a commented Sep 3, 2026

Copy link
Copy Markdown

Description

Fixes Add Repository and RunPane repository validation so typed ~/… and relative paths expand before branch detection, project creation, and repository validation. Branch detection now reports failure instead of falsely showing main.

Existing absolute paths retain the user's normalized spelling rather than being canonicalized through realpath. On macOS this prevents /var/... paths from becoming /private/var/..., which could bypass the existing-project match and create a duplicate stored repository.

WSL UNC paths (\\wsl.localhost\\…, \\wsl$\\…) remain unchanged for WSL parsing.

Closes #577.

Verification

  • Isolated checkout dependency resolution: pnpm install --frozen-lockfile --offline --ignore-scripts
  • Focused utility tests: 13/13 passed (pathResolver and detectProjectBranch)
  • pnpm typecheck passed
  • pnpm lint passed (five pre-existing ESLint warnings in skillCacheManager.ts)
  • The IPC suite requires the SQLite native binding. It was not rebuilt in the isolated checkout because lifecycle scripts were intentionally skipped; the fresh Code Quality macOS job is the integration verification and is running after workflow approval.

Manual checks still useful

  • Add an existing repository through a typed ~/… path.
  • Add a repository below /var/... on macOS and confirm its stored path keeps that spelling.
  • Confirm a bogus path shows branch-detection failure rather than main.

@vc1492a

vc1492a commented Sep 3, 2026

Copy link
Copy Markdown
Author

Status update from contributor automation

Local verification on head 91d13835 (Node 22.18.0):

  • pnpm typecheck
  • pnpm lint
  • Issue-specific tests ✅ 13/13
  • Frontend unit tests ✅ 327/327
  • Full main Vitest: 902 passed; 4 failures in skillCacheManager.test.ts only (unrelated to this path-expansion change)

Needs a maintainer (cannot do from this fork account):

  1. Approve / enable the pending GitHub Actions workflows for this first-time contributor PR (Code Quality + React Doctor are currently action_required):
  2. Optional: GUI smoke of Add Repository with ~/… / bogus path / Browse after CI is green (pnpm electron-dev).

Happy to address review feedback once CI can run.

@parsakhaz
parsakhaz force-pushed the fix/expand-user-repo-paths branch 2 times, most recently from 9446fb2 to 665c003 Compare September 4, 2026 23:47
vc1492a and others added 2 commits September 4, 2026 17:50
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>
@parsakhaz
parsakhaz force-pushed the fix/expand-user-repo-paths branch from 665c003 to c787d78 Compare September 5, 2026 00:52
@vc1492a

vc1492a commented Sep 11, 2026

Copy link
Copy Markdown
Author

@parsakhaz quick check-in on this one, it closes #577. It's still small (7 files) and merges cleanly against current main; checks are green. Happy to rebase or split it if that helps review.

Context for why it matters to me: I run Pane on a couple of machines and add repos by typing paths, and ~/... or a relative path silently failing was the first thing that tripped me on a fresh host this week. Let me know if there's anything you'd like changed.

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.

fix: expand ~ and relative paths in Add Repository

2 participants