collab_ui: Fix "lost session" visual bug in Collab Panel#52486
Merged
danilo-leal merged 3 commits intozed-industries:mainfrom Mar 26, 2026
Merged
collab_ui: Fix "lost session" visual bug in Collab Panel#52486danilo-leal merged 3 commits intozed-industries:mainfrom
danilo-leal merged 3 commits intozed-industries:mainfrom
Conversation
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This PR fixes a UX issue ("visual bug") in the collaboration panel documented in issue #51800, where users who had already signed in were still seeing the "Sign In" screen after restarting the editor. As I mentioned in my response there (Link to comment #4132366441), I have investigated the problem thoroughly and found that the session is not actually lost.
What I discovered is that in Zed, only "staff" users automatically connect to the collaboration servers when opening the editor (by design, this logic is in
crates/client/src/client.rsstarting at line962). Therefore, regular users keep their saved session andAuthenticatedstatus, but since they don't automatically connect upon startup, the UI didn't detect this correctly. It erroneously showed the GitHub account request and the "Sign in to enable collaboration" text, giving the false impression that the user had been logged out.Screenshots
Before (Bug)

After (Fix)

Note: This PR specifically addresses the visual issue in the Collab Panel. Similar behaviors might exist in other parts of the editor, but this change focuses on correcting the collaboration interface.
This current PR:
render_signed_outfunction incrates/collab_ui/src/collab_panel.rs.self.client.user_id().is_some(), which is more robust against volatile network states and perfectly covers connection transitions.SignalHigh).How to Review
crates/collab_ui/src/collab_panel.rs:render_signed_out.Statusenum, simply checking the user ID correctly captures any subsequent subtype, properly differentiating between account authorization and a simple network reconnection.Self-Review Checklist
Release Notes: