-
Notifications
You must be signed in to change notification settings - Fork 5.4k
release(runway): cherry-pick fix: Prevent crash in modal version handling cp-13.11.1 #38396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
gauthierpetetin
merged 1 commit into
release/13.11.1
from
runway-cherry-pick-13.11.1-1764331381
Nov 28, 2025
Merged
release(runway): cherry-pick fix: Prevent crash in modal version handling cp-13.11.1 #38396
gauthierpetetin
merged 1 commit into
release/13.11.1
from
runway-cherry-pick-13.11.1-1764331381
Nov 28, 2025
+92
−73
Conversation
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
…ling cp-13.11.1 (#38382) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Fixes a crash caused by `useMultichainAccountsIntroModal` that entirely bricks Flask. The crash occurs because the version handling doesn't handle our versioning scheme well. This PR changes the logic to use `previousAppVersion` and strips the `prerelease` part of the version (which indicates the build type) for a proper comparison. Also updates the tests for this hook which were flawed as they didn't use the hook in question at all. [](https://codespaces.new/MetaMask/metamask-extension/pull/38382?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Fixes a crash when updating Flask ## **Manual testing steps** 1. Force `lastUpdatedFromVersion` to `13.9.0.150` and `previousAppVersion` to `13.9.0-flask.0` 2. See that it crashes without this PR ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <img width="454" height="634" alt="image" src="https://github.com/user-attachments/assets/ea140cfa-66ef-402e-a6cd-3ca3a2bc6402" /> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Use `previousAppVersion` and strip prerelease parts for version comparison in `useMultichainAccountsIntroModal`; update tests to exercise the hook with provider-backed state. > > - **Hooks** (`ui/hooks/useMultichainAccountsIntroModal.ts`): > - Use `previousAppVersion` instead of `lastUpdatedFromVersion` for upgrade checks. > - Parse and strip prerelease identifiers via `semver.parse` before comparing with `BIP44_ACCOUNTS_INTRODUCTION_VERSION` using `semver.lt`. > - Export `BIP44_ACCOUNTS_INTRODUCTION_VERSION` for external use. > - Maintain display gating by `DEFAULT_ROUTE` and existing state flags; compute and set `showMultichainIntroModal` accordingly. > - **Tests** (`ui/hooks/useMultichainAccountsIntroModal.test.ts`): > - Replace ad-hoc logic with `renderHookWithProvider` to test the actual hook. > - Cover upgrades across thresholds including prerelease versions (e.g., `*-flask.0`) and ensure correct show/hide behavior across routes and states. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9d7267f. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
gauthierpetetin
approved these changes
Nov 28, 2025
Collaborator
Builds ready [a46d32a]
UI Startup Metrics (1217 ± 99 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
|
Collaborator
|
No release label on PR. Adding release label release-13.11.1 on PR, as PR was cherry-picked in branch 13.11.1. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
release-13.11.1
Issue or pull request that will be included in release 13.11.1
team-bots
Bot team (for MetaMask Bot, Runway Bot, etc.)
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.
Description
Fixes a crash caused by
useMultichainAccountsIntroModalthat entirelybricks Flask. The crash occurs because the version handling doesn't
handle our versioning scheme well. This PR changes the logic to use
previousAppVersionand strips theprereleasepart of the version(which indicates the build type) for a proper comparison.
Also updates the tests for this hook which were flawed as they didn't
use the hook in question at all.
Changelog
CHANGELOG entry: Fixes a crash when updating Flask
Manual testing steps
lastUpdatedFromVersionto13.9.0.150andpreviousAppVersionto13.9.0-flask.0Screenshots/Recordings
Before
Note
Fixes modal logic by parsing/stripping prerelease versions and using
previousAppVersion, preventing crashes; rewrites tests to exercise the hook with provider-backed state.ui/hooks/useMultichainAccountsIntroModal.ts):BIP44_ACCOUNTS_INTRODUCTION_VERSIONand switch version source tostate.metamask.previousAppVersion.semver.parseand strip prerelease before comparing withsemver.lt.showMultichainIntroModalaccordingly.ui/hooks/useMultichainAccountsIntroModal.test.ts):renderHookWithProviderto test the actual hook.13.4.0-flask.0) and threshold boundaries; verify behavior across route, lock state, feature flag, prior display, and fresh install.Written by Cursor Bugbot for commit a46d32a. This will update automatically on new commits. Configure here.
a3c1ac2