Skip to content

collab: Fix unable to rejoin shared project after leaving a call#50630

Merged
Anthony-Eid merged 1 commit intomainfrom
fix-collab-subscription-error
Mar 3, 2026
Merged

collab: Fix unable to rejoin shared project after leaving a call#50630
Anthony-Eid merged 1 commit intomainfrom
fix-collab-subscription-error

Conversation

@Anthony-Eid
Copy link
Copy Markdown
Contributor

When a downstream project was disconnected from the host (e.g. the guest left the call), disconnected_from_host_internal did not clear client_subscriptions. These subscriptions hold entries in the Client's entity subscription map, so a subsequent join_remote_project with the same project ID would fail with "already subscribed to entity".

The fix adds self.client_subscriptions.clear() to disconnected_from_host_internal, matching what unshare_internal already does for the host side.

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects

Release Notes:

  • collab: Fix unable to rejoin project bug ("already subscribed to entity")

This bug happened because downstream projects wouldn't clear their
subscriptions when leaving a project,
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 3, 2026
@Anthony-Eid Anthony-Eid enabled auto-merge (squash) March 3, 2026 19:35
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 3, 2026
@Anthony-Eid Anthony-Eid merged commit 3d3a66d into main Mar 3, 2026
38 checks passed
@Anthony-Eid Anthony-Eid deleted the fix-collab-subscription-error branch March 3, 2026 19:46
tahayvr pushed a commit to tahayvr/zed that referenced this pull request Mar 4, 2026
…-industries#50630)

When a downstream project was disconnected from the host (e.g. the guest
left the call), `disconnected_from_host_internal` did not clear
`client_subscriptions`. These subscriptions hold entries in the
`Client`'s entity subscription map, so a subsequent
`join_remote_project` with the same project ID would fail with "already
subscribed to entity".

The fix adds `self.client_subscriptions.clear()` to
`disconnected_from_host_internal`, matching what `unshare_internal`
already does for the host side.

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects

Release Notes:

- collab: Fix unable to rejoin project bug ("already subscribed to
entity")
wzulfikar pushed a commit to wzulfikar/zed that referenced this pull request Mar 4, 2026
…-industries#50630)

When a downstream project was disconnected from the host (e.g. the guest
left the call), `disconnected_from_host_internal` did not clear
`client_subscriptions`. These subscriptions hold entries in the
`Client`'s entity subscription map, so a subsequent
`join_remote_project` with the same project ID would fail with "already
subscribed to entity".

The fix adds `self.client_subscriptions.clear()` to
`disconnected_from_host_internal`, matching what `unshare_internal`
already does for the host side.

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects

Release Notes:

- collab: Fix unable to rejoin project bug ("already subscribed to
entity")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant