Skip to content

fix: unlock redirect back loop#42184

Merged
HowardBraham merged 1 commit intomainfrom
n3ps/fix-unlock-redirect
Apr 28, 2026
Merged

fix: unlock redirect back loop#42184
HowardBraham merged 1 commit intomainfrom
n3ps/fix-unlock-redirect

Conversation

@n3ps
Copy link
Copy Markdown
Contributor

@n3ps n3ps commented Apr 28, 2026

Description

Fixes the redirect loop when auto unlocking

Changelog

CHANGELOG entry: fix: replace unlock redirect history entry

Related issues

Fixes: #42004

Manual testing steps

  1. Set autolock
  2. Stay idle in the Accounts list
  3. Unlock
  4. Click Back

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Low Risk
Low risk: only adjusts react-router navigation options on unlock redirects, with updated tests; main behavior change is back/forward history handling.

Overview
Fixes an unlock redirect loop by changing post-unlock redirects to use navigate(..., { replace: true }) (both for auto-unlock in UnlockPage and for manual unlock submit in the container), preventing an extra history entry from being added.

Updates UnlockPage tests to assert the new replace: true navigation behavior for redirects driven by location.state.from.

Reviewed by Cursor Bugbot for commit d562049. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-core-extension-ux Core Extension UX team label Apr 28, 2026
@n3ps n3ps changed the title fix: replace unlock redirect history entry fix: unlock redirect Apr 28, 2026
@sonarqubecloud
Copy link
Copy Markdown

@n3ps n3ps marked this pull request as ready for review April 28, 2026 13:16
@n3ps n3ps enabled auto-merge April 28, 2026 13:16
@github-project-automation github-project-automation Bot moved this to Needs dev review in PR review queue Apr 28, 2026
@n3ps n3ps requested review from a team and seaona April 28, 2026 13:18
@n3ps n3ps changed the title fix: unlock redirect fix: unlock redirect back loop Apr 28, 2026
@n3ps n3ps added this pull request to the merge queue Apr 28, 2026
@github-project-automation github-project-automation Bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue Apr 28, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 28, 2026
@HowardBraham HowardBraham added the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Apr 28, 2026
@github-actions github-actions Bot removed the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Apr 28, 2026
@HowardBraham HowardBraham added the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Apr 28, 2026
@HowardBraham HowardBraham enabled auto-merge April 28, 2026 15:39
@HowardBraham HowardBraham added this pull request to the merge queue Apr 28, 2026
Merged via the queue into main with commit 3906c24 Apr 28, 2026
239 of 240 checks passed
@HowardBraham HowardBraham deleted the n3ps/fix-unlock-redirect branch April 28, 2026 16:37
@github-project-automation github-project-automation Bot moved this from Review finalised - Ready to be merged to Merged, Closed or Archived in PR review queue Apr 28, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 28, 2026
@github-actions github-actions Bot removed the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Apr 28, 2026
@metamaskbot metamaskbot added the release-13.30.0 Issue or pull request that will be included in release 13.30.0 label Apr 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.30.0 Issue or pull request that will be included in release 13.30.0 size-S team-core-extension-ux Core Extension UX team

Projects

Archived in project

5 participants