-
Notifications
You must be signed in to change notification settings - Fork 748
fix(amazonq): Sync IDE windows for Amazon Q auth state and region profile selection #7320
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
fix(amazonq): Sync IDE windows for Amazon Q auth state and region profile selection #7320
Conversation
|
|
|
Very nice. Does it work if you say, select the profile in the other window that you weren't using to log in? |
|
Do we need to poll every second? Maybe every 2 or 3 seconds? |
The behavior gets awkward when you are logged out and log back in; the 'other' window will keep the region selector displayed until the sync. I can increase to 2 seconds, but I don't think we want to keep that state much longer
Yes it behaves the same! |
|
One thing to note with this polling length. We should think of realistic user behaviors and if we set polling to 2-3 seconds, would they even notice it? Assuming they sign in or out on one IDE instance, it is low likelihood they are switching to the other IDE very quickly. It is also unlikely that the user will select the profile in one window and then immediately switch to the other. |
+1 No one is comparing how smooth the auth change is side-by-side. |
|
thanks for this change, it's really nice. Maybe we should bring this to mainline as well |
We won't be adding features for auth to mainline for now, but instead prioritize releasing this branch with auth on LSP identity server |
ed4b265
into
aws:feature/amazonqLSP-auth
Problem
The auth state and region profile selection is not sycned between different IDE windows
Solution
Auth state
ssoCacheWatcherto the LSP auth client, with hooks ononDidCreateandonDidDeleteAuthUtil, add the following handlers:onDidCreate: trigger a restore flow to fetch the latest auth stateonDidDelete: trigger a logoutRegion profile
GlobalStatePollerutil that polls the global state value every second, and call a handler if the value updatesRegionProfileManageradd the poller for the region profile global state variable and add a handler that switches the profileTesting
Screen.Recording.2025-05-15.at.13.06.26.mov
feature/xbranches will not be squash-merged at release time.