Repository navigation
fix(site): delay desktop VNC connection until tab is selected - #23861
Merged
Merged
Conversation
DanielleMaywood
force-pushed
the
delay-desktop-tab-open
branch
from
March 31, 2026 16:01
ee9c3dd to
2fd9f2a
Compare
DanielleMaywood
marked this pull request as ready for review
March 31, 2026 16:02
hugodutka
approved these changes
Mar 31, 2026
hugodutka
left a comment
Collaborator
There was a problem hiding this comment.
The desktop panel previously established a VNC WebSocket connection as soon as the sidebar mounted, even if the user never clicked the Desktop tab.
was that a regression after the recent refactors or did I implement it like that originally? I thought the connection already got opened only after the user clicked the desktop tab
Collaborator
Author
|
@hugodutka a regression from me. I recently changed it so that tabbing away didn't destroy state (useful when mid-way through adding a diff comment). Unfortunately I forgot to handle this scenario |
The desktop panel previously established a VNC WebSocket connection as soon as the sidebar mounted, even if the user never clicked the Desktop tab. This wasted bandwidth and server resources. Adopt the same 'activated' pattern from the terminal panel (PR #23231): the connection stays dormant until the tab is first selected, then persists across tab switches. Changes: - useDesktopConnection: add 'activated' option to gate doConnect() - DesktopPanel: add isVisible prop with activated state latch - SidebarTabView: pass isVisible based on effectiveTabId
DanielleMaywood
force-pushed
the
delay-desktop-tab-open
branch
from
March 31, 2026 16:09
2fd9f2a to
26d00ab
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The desktop panel previously established a VNC WebSocket connection as soon as the sidebar mounted, even if the user never clicked the Desktop tab. This wasted bandwidth and server resources.
Adopts the same
activatedpattern from the terminal panel (PR #23231): the connection stays dormant until the tab is first selected, then persists across tab switches.Changes
useDesktopConnection—activatedoption gatesdoConnect()DesktopPanel—isVisibleprop with activated state latchSidebarTabView— passesisVisiblebased oneffectiveTabId