Skip to content

fix: account dropdown not refreshed when switching users on the same …#323

Merged
fioan89 merged 1 commit into
mainfrom
fix-account-refresh-on-same-deployment
Jun 23, 2026
Merged

fix: account dropdown not refreshed when switching users on the same …#323
fioan89 merged 1 commit into
mainfrom
fix-account-refresh-on-same-deployment

Conversation

@fioan89

@fioan89 fioan89 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

…deployment via URI

When two Coder URIs targeting the same deployment URL but different users are opened in sequence, the account dropdown in the plugin header would still show the username from the first session instead of updating to reflect the newly authenticated user.

This happened because the same-URL URI handling path calls refreshSession() directly, bypassing the onConnect callback that normally updates the account dropdown label after a successful connection. While refreshSession() correctly replaced the REST client and CLI instances with ones authenticated as the new user, it never propagated that change to the UI.

The fix updates refreshSession() to also refresh the account dropdown label and visibility immediately after the new client is initialized, keeping the UI consistent with the active session.

  • resolves DEVEX-372
  • resolves DEVEX-374

…deployment via URI

When two Coder URIs targeting the same deployment URL but different users are opened in sequence, the account dropdown in the plugin header would still show the username from the first session instead of updating to reflect the newly authenticated user.

This happened because the same-URL URI handling path calls refreshSession() directly, bypassing the onConnect callback that normally
updates the account dropdown label after a successful connection. While refreshSession() correctly replaced the REST client and CLI instances with ones authenticated as the new user, it never propagated that change to the UI.

The fix updates refreshSession() to also refresh the account dropdown label and visibility immediately after the new client is
initialized, keeping the UI consistent with the active session.

- resolves DEVEX-372
- resolves DEVEX-374
@linear-code

linear-code Bot commented Jun 22, 2026

Copy link
Copy Markdown

DEVEX-372

DEVEX-374

@fioan89 fioan89 merged commit e014646 into main Jun 23, 2026
6 checks passed
@fioan89 fioan89 deleted the fix-account-refresh-on-same-deployment branch June 23, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants