zed/crates/collab/tests/integration
Anthony Eid dbdea58349
collab: Fix multiworkspace location out of sync bugs (#61598)
### Summary

This PR fixes three small bugs that could cause a multi-workspace's
reported location to be out of sync with its actual location, which
causes following to break in multiplayer collaboration sessions.

The first bug was that each child workspace's title bar within a
multi-workspace had its own `cx.observe_window_activation` subscription
that would set the associated child workspace's project location. This
caused problems because it ran for all child workspaces instead of just
the active workspace within the multi-workspace. The fix was moving
`cx.observe_window_activation` to the `cx.observe_new` call in the
`call` crate that tracks newly created windows/multi-workspaces.

The second bug was caused by an incorrect `if` statement in a
`MultiWorkspace` subscription that would return early if the window was
active and the event emitted by `MultiWorkspace` wasn't
`ActiveWorkspaceChanged`. This caused issues when the window was
inactive because it would incorrectly set the active call's location to
the wrong project. The fix was making the early return happen if the
window wasn't active.

The third bug was that every child `Workspace` also observed window
activation and called `update_active_view_for_followers`. This allowed
hidden workspaces to report their active view instead of only the active
workspace.

### Testing

I added a property test for bugs one/two and another prop test for bug 3


Release Notes:

- collab: Fix out of sync following bugs
2026-07-25 03:39:45 +00:00
..
db_tests Unship shared threads (#59981) 2026-06-26 20:50:37 +00:00
auto_watch_tests.rs Disable auto watch when leaving a call (#57196) 2026-05-19 21:31:34 +00:00
channel_buffer_tests.rs client: Rename UserId to LegacyUserId (#56185) 2026-05-08 15:53:40 +00:00
channel_guest_tests.rs collab: Introduce UserService (#55449) 2026-05-06 18:15:36 +00:00
channel_tests.rs livekit_api: Fix LiveKit token revocation timestamps (#60157) 2026-07-03 09:50:42 +00:00
collab_panel_tests.rs Add the ability to reorder favorited collab channels (#52649) 2026-03-30 13:07:13 +00:00
collab_tests.rs client: Add username to User and start using it (#60107) 2026-06-29 20:21:46 +00:00
db_tests.rs collab: Remove writes to github_user_id and github_login (#58474) 2026-06-04 15:43:03 +00:00
editor_tests.rs Show tag names in git blame tooltips (#60757) 2026-07-14 01:21:38 +00:00
following_tests.rs collab: Fix multiworkspace location out of sync bugs (#61598) 2026-07-25 03:39:45 +00:00
git_tests.rs Support loading Git commit templates when remote (#55490) 2026-07-22 12:01:29 +00:00
integration_tests.rs language: Refactor available_languages into its own struct (#61388) 2026-07-23 11:22:43 +00:00
notification_tests.rs collab: Extract tests into integration tests crate (#47668) 2026-01-26 20:28:09 +01:00
random_channel_buffer_tests.rs collab: Extract tests into integration tests crate (#47668) 2026-01-26 20:28:09 +01:00
random_project_collaboration_tests.rs language: Refactor available_languages into its own struct (#61388) 2026-07-23 11:22:43 +00:00
randomized_test_helpers.rs collab: Remove writes to github_user_id and github_login (#58474) 2026-06-04 15:43:03 +00:00
remote_editing_collaboration_tests.rs language: Refactor available_languages into its own struct (#61388) 2026-07-23 11:22:43 +00:00
test_server.rs livekit_api: Fix LiveKit token revocation timestamps (#60157) 2026-07-03 09:50:42 +00:00