gitpod
                                
                                
                                
                                    gitpod copied to clipboard
                            
                            
                            
                        Only try to connect ws immediately when tab is activated
Description
- [ ] hold to remove debug code
 
Related Issue(s)
Relates ENT-24
How to test
‼️ Test with Firefox
Regression
- Workspace should work like before
 - Integration tests should pass
 
Firefox WS
- Create a workspace in preview env with Firefox + VS Code Browser
 - Open workspace with 20 more tabs
 - Check if the tab you're working works well
 - Wait for x minutes, and click other tabs, they should be activated after tab is activated
 
Feature Flag
Feature is controlled by ff websocket_url_provider_returns_immediately. Smoke test if workspace is working (need refresh web)
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
- 🏷️ Name - hw-ws
 - 🔗 URL - hw-ws.preview.gitpod-dev.com/workspaces.
 - 📚 Documentation - See our internal documentation for information on how to interact with your preview environment.
 - 📦 Version - hw-ws-gha.26818
 - 🗒️ Logs - GCP Logs Explorer
 
Build Options
Build
- [ ] /werft with-werft Run the build with werft instead of GHA
 - [ ] leeway-no-cache
 - [ ] /werft no-test
Run Leeway with 
--dont-test 
Publish
- [ ] /werft publish-to-npm
 - [ ] /werft publish-to-jb-marketplace
 
Installer
- [x] analytics=log
 - [ ] with-dedicated-emulation
 - [ ] workspace-feature-flags Add desired feature flags to the end of the line above, space separated
 
Preview Environment / Integration Tests
- [ ] /werft with-local-preview
If enabled this will build 
install/preview - [x] /werft with-preview
 - [x] /werft with-large-vm
 - [x] /werft with-gce-vm If enabled this will create the environment on GCE infra
 - [x] /werft preemptible Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
 - [x] with-integration-tests=all
Valid options are 
all,workspace,webapp,ide,jetbrains,vscode,ssh. If enabled,with-previewandwith-large-vmwill be enabled. - [ ] with-monitoring
 
/hold
it looks complicated, why do we do it?
it looks complicated, why do we do it?
@akosyakov Firefox will block websocket if there're too many tabs opened, you could get more context from ENT-24 and [internal chat]
Is there a way we auto close tabs of old workspaces or something like that, I afraid that we will break something with all smartness around events.
I remember we would show a notification to the user from the dashboard that failed to establish the websocket maybe you have so many tabs. But it was disabled for IDE, maybe we enable it in the dashboard always in case of FF.
Is there a way we auto close tabs of old workspaces or something like that, I afraid that we will break something with all smartness around events. I remember we would show a notification to the user from the dashboard that failed to establish the websocket maybe you have so many tabs. But it was disabled for IDE, maybe we enable it in the dashboard always in case of FF.
They way I understand your comment is:
- if a tab is in background for long enough, we stop re-connecting websocket, and show a "Old tab, want to reconnect? Ok" modal
 - if users come back, they have to manually click that button, which:
- makes them aware something might be off
 - we do a soft-reload in the background, mitigating any potential "state-out-of-sync" issues
 
 
@akosyakov Is that what you mean? :thinking:
Canceled, let's re-open if needed in the future