Commit 1a57043
authored
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.1 parent 330f565 commit 1a57043
File tree
3 files changed
+45
-7
lines changed- plugins/amazonq
- chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/toolwindow
- codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer
3 files changed
+45
-7
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
| |||
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
109 | | - | |
| 117 | + | |
110 | 118 | | |
111 | 119 | | |
112 | 120 | | |
| |||
384 | 392 | | |
385 | 393 | | |
386 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
387 | 419 | | |
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
197 | 203 | | |
198 | | - | |
199 | 204 | | |
200 | 205 | | |
201 | 206 | | |
| |||
0 commit comments