You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(amazonq): reauth workflow should not prompt profile selection page (#5549)
### Problem
On IDE startup, `QRegionProfileManager` loads the active profile from `aws.xml`.
However, `validateProfile()` is called before SSO reauth completes, causing `listRegionProfiles()` to return empty. This results in the active profile being reset to `null`.
### Fix
Update `getIdcConnectionOrNull()` to return the connection only if it's a valid Q connection **and the token is authorized**.
Also, after successful reauth, immediately show the Q panel to avoid triggering the profile selection flow.
### Summary
- Skip profile validation when token isn't ready
- Ensure Q panel appears after reauth
### Changes
- Refined `getIdcConnectionOrNull()` to check for `BearerTokenAuthState.AUTHORIZED`
This should improve the IDE startup flow for users who rely on SSO, reducing friction and avoiding false-positive "profile selection required" states.
Copy file name to clipboardExpand all lines: plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/toolwindow/AmazonQToolWindowFactory.kt
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,8 @@ class AmazonQToolWindowFactory : ToolWindowFactory, DumbAware {
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/QRegionProfileManagerTest.kt
Copy file name to clipboardExpand all lines: plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/profile/QRegionProfileManager.kt
0 commit comments