Keep passkey prompt visible to show success feedback#715
Merged
Conversation
The success card was never shown in practice because the register saga fires registerPasskeySuccess AND loadPasskeys in sequence. As soon as loadPasskeys populates state.auth.passkeys, the container's show prop flips to false (passkeys.length === 0 no longer holds), and the component's top-level if-!show-return-null ran before the showSuccess branch — so the tile disappeared without ever displaying the success feedback. Re-order the render: dismissed first (so the 3.5s auto-dismiss still works), then the success branch (regardless of show), then the show/supported gates for the main state.
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.
Summary
Fixes a bug where the post-login passkey tile disappeared immediately after successful registration — the user never saw the success confirmation that #713 added.
Root cause
The register saga fires two actions in sequence:
registerPasskeySuccess→state.auth.passkeyRegistration.submittinggoes falseloadPasskeys→state.auth.passkeyspopulates with the new credentialThe
PostLoginPasskeyPromptContainercomputesshowas:As soon as (2) lands,
showflips tofalse. In the component render, theif (!show || dismissed) return nullgate ran before theif (showSuccess)branch, so the component returned null the moment registration succeeded. TheshowSuccesseffect did set the state, but the success card was never rendered.Fix
Re-order the render checks:
if (dismissed) return null— preserves the 3.5s auto-dismiss behaviourif (showSuccess)→ render success card (regardless ofshow)if (!show) return null— normal gate for the idle statesupportedcheckTest plan
lszm-test