fix(fe): Reset identity popover state on authentication failure#3722
Merged
fix(fe): Reset identity popover state on authentication failure#3722
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ensures the identity switcher UI doesn’t get stuck in an “authenticating” state when authentication is cancelled or otherwise fails, by guaranteeing popover/dialog state cleanup even when authenticate(...) throws.
Changes:
- Wrapped
handleSignInintry/finallysoisIdentityPopoverOpen,isAuthDialogOpen, andisAuthenticatingare always reset. - Applied the same cleanup pattern across the landing page, authorize layout, and manage authenticated layout.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/frontend/src/routes/(new-styling)/manage/(authenticated)/+layout.svelte |
Ensures identity popover/auth dialog state is reset even if sign-in throws during identity switching. |
src/frontend/src/routes/(new-styling)/+page.svelte |
Adds try/finally cleanup around sign-in/navigation so the landing page identity switch UI can’t get stuck. |
src/frontend/src/routes/(new-styling)/(channel)/authorize/+layout.svelte |
Ensures authorize flow identity switching resets UI state on authentication failure/cancellation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aterga
approved these changes
Apr 2, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When switching identities via the identity popover, if authentication fails
(e.g. the user cancels the passkey prompt), the popover and dialog state
(
isIdentityPopoverOpen,isAuthDialogOpen,isAuthenticating) are neverreset. This leaves the UI in a broken state where the popover cannot be closed by clicking outside it.
Changes
handleSignInintry/finallyblocks across three routes so thatpopover/dialog state is always cleaned up, even when authentication throws:
(channel)/authorize/+layout.svelte+page.sveltemanage/(authenticated)/+layout.svelte