mirror of
https://github.com/zed-industries/zed.git
synced 2026-08-04 13:24:41 +00:00
### 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 |
||
|---|---|---|
| .. | ||
| db_tests | ||
| auto_watch_tests.rs | ||
| channel_buffer_tests.rs | ||
| channel_guest_tests.rs | ||
| channel_tests.rs | ||
| collab_panel_tests.rs | ||
| collab_tests.rs | ||
| db_tests.rs | ||
| editor_tests.rs | ||
| following_tests.rs | ||
| git_tests.rs | ||
| integration_tests.rs | ||
| notification_tests.rs | ||
| random_channel_buffer_tests.rs | ||
| random_project_collaboration_tests.rs | ||
| randomized_test_helpers.rs | ||
| remote_editing_collaboration_tests.rs | ||
| test_server.rs | ||