-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent activation of previous workspace when launching Connect via deep link to a different cluster #50063
Open
gzdunek
wants to merge
10
commits into
master
Choose a base branch
from
gzdunek/device-trust-correct-workspace
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Prevent activation of previous workspace when launching Connect via deep link to a different cluster #50063
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
51c37e9
Refactor `setActiveWorkspace` to async/await
gzdunek f43b0ae
Keep all the logic that restores a single workspace state in `getWork…
gzdunek dc70bdf
Separate restoring state from setting active workspace
gzdunek a6bb953
Allow the dialog to reopen documents to be closed without any decision
gzdunek e941385
Add a test that verifies if the correct workspace is activated
gzdunek 9fc2003
Docs improvements
gzdunek cc2644a
Return early if there's no restoredWorkspace
gzdunek 3dde323
Fix logger name
gzdunek 8c4dbec
Improve test name
gzdunek 8776788
Make restored state immutable
gzdunek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I close the app while I'm in workspace A with a valid cert and open it again through a deep link to workspace B, I can close the login modal and continue to use workspace A without making a decision wrt restored state. The user should be forced to make an action before interacting with a workspace.
valid-cert-on-launch.mov
How do we fix this? I almost feel like
DeepLinksService
should always bail out to the "Connect" screen. As in, whenloginAndSetActiveWorkspace
is called, we check if the current workspace is equal to the workspace from the URL. If not, then we always zerorootClusterUri
inWorkspacesService
to force the user back to cluster choice. Otherwise, I feel it kind of makes little sense to launch the app through a link to workspace B, interact with a modal about workspace B (the login modal), then close it and be back at workspace A, just because it was the last used workspace before the app was closed.I'm just not sure at this point how this is going to interact with the rest of the app.