Skip to content

fix(workspace): claim detached sessions to source project#26413

Merged
kitlangton merged 1 commit intodevfrom
kit/workspace-warp-claim
May 9, 2026
Merged

fix(workspace): claim detached sessions to source project#26413
kitlangton merged 1 commit intodevfrom
kit/workspace-warp-claim

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • Fix workspace session detach so sync ownership is claimed by the source project instead of the ambient request project.
  • Add a regression test that invokes sessionWarp({ workspaceID: null }) from a workspace instance context and verifies ownership returns to the original project.

What Was Broken

When detaching a workspace-owned session back to local, sessionWarp used Instance.project.id as the fallback owner. If the request ran inside a workspace instance context, that ambient project was the workspace project rather than the source project, so the session row detached but the sync sequence owner was wrong.

Verification

  • bun test --timeout 5000 test/control-plane/workspace.test.ts -t "sessionWarp detaches"

@kitlangton kitlangton requested a review from jlongster May 8, 2026 21:45
@kitlangton kitlangton merged commit 21d055b into dev May 9, 2026
12 checks passed
@kitlangton kitlangton deleted the kit/workspace-warp-claim branch May 9, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant