Skip to content

fix(desktop): resolve project redirection for parallel checkouts#35676

Open
WayhomeZ wants to merge 2 commits into
anomalyco:devfrom
WayhomeZ:fix-checkout-redirect
Open

fix(desktop): resolve project redirection for parallel checkouts#35676
WayhomeZ wants to merge 2 commits into
anomalyco:devfrom
WayhomeZ:fix-checkout-redirect

Conversation

@WayhomeZ

@WayhomeZ WayhomeZ commented Jul 7, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #35674

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

When opening parallel checkouts of the same repository, they share the same remote URL and project ID. The frontend previously mapped registered sandboxes back to the main worktree, which caused sessions opened from a parallel checkout to redirect to the first checkout.

This PR adds path containment checks so sessions and project navigation use the actual checkout directory when it is not a descendant of the main worktree. It also default-enables the Workspaces list when a project has sandboxes, making parallel checkouts visible and switchable.

How did you verify your code works?

  • Added unit tests for isDescendant.
  • Added unit tests for projectForSession when multiple projects share the same ID.
  • Ran bun run test:unit; all 547 app unit tests passed.
  • Ran bun run typecheck.

Screenshots / recordings

N/A. This is a routing/workspace resolution fix.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jul 7, 2026
@WayhomeZ
WayhomeZ force-pushed the fix-checkout-redirect branch 2 times, most recently from 32075d3 to 6a3868c Compare July 7, 2026 09:25
@WayhomeZ
WayhomeZ force-pushed the fix-checkout-redirect branch from 6a3868c to 1c1f6ea Compare July 7, 2026 09:27
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

Parallel checkouts/worktrees of the same repository redirect to the first opened folder

1 participant