Skip to content

Conversation

@ffmcgee725
Copy link
Member

@ffmcgee725 ffmcgee725 commented Nov 13, 2025

Description

This PR removes browser navigation when a user clicks the account group in the initial connection flow.

Changelog

CHANGELOG entry: Fixes navigation on account group click in initial connection flow

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/WAPI-829

Manual testing steps

Feature: my feature name

  Scenario: user clicks account group
    Given it's on initial connection flow

    When user clicks account group
    Then selected account is changed, and no navigation to in app browser happens

Screenshots/Recordings

Before

Screen.Recording.2025-11-13.at.09.55.37.mov

After

Screen.Recording.2025-11-13.at.09.49.44.mov

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

Selecting an account during the initial connection flow now only updates the selected account group without showing a toast or navigating; wiring and tests updated accordingly.

  • MultichainAccountsConnectedList (MultichainAccountsConnectedList.tsx)
    • Add isConnectionFlow prop (default false).
    • Update handleSelectAccount to early-return in connection flow (only sets AccountTreeController.setSelectedAccountGroup).
    • Maintain existing toast + navigation.navigate(Routes.BROWSER.HOME) when not in connection flow; update hook deps.
  • MultichainPermissionsSummary (MultichainPermissionsSummary.tsx)
    • Pass isConnectionFlow={!isAlreadyConnected} to MultichainAccountsConnectedList and update memo deps.
  • Tests (MultichainAccountsConnectedList.test.tsx)
    • Add/adjust cases to verify: selection-only in connection flow; toast + navigation when not in connection flow.
    • Explicitly set isConnectionFlow in relevant tests and validate correct group IDs and side effects.

Written by Cursor Bugbot for commit 952b327. This will update automatically on new commits. Configure here.

@ffmcgee725 ffmcgee725 requested a review from a team as a code owner November 13, 2025 09:01
@metamaskbot metamaskbot added the team-wallet-integrations Wallet Integrations team label Nov 13, 2025
Comment on lines 72 to 75
if (isConnectionFlow) {
AccountTreeController.setSelectedAccountGroup(accountGroup.id);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this guard get moved to below line 77?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 71 to 77
// During connection flow, clicking an account should only change the selected account group instead of navigating
if (isConnectionFlow) {
AccountTreeController.setSelectedAccountGroup(accountGroup.id);
return;
}

AccountTreeController.setSelectedAccountGroup(accountGroup.id);
Copy link
Contributor

@adonesky1 adonesky1 Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right?

Suggested change
// During connection flow, clicking an account should only change the selected account group instead of navigating
if (isConnectionFlow) {
AccountTreeController.setSelectedAccountGroup(accountGroup.id);
return;
}
AccountTreeController.setSelectedAccountGroup(accountGroup.id);
// During connection flow, clicking an account should only change the selected account group instead of navigating
AccountTreeController.setSelectedAccountGroup(accountGroup.id);
if (isConnectionFlow) {
return;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise LGTM!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, the early return can be done after setSelectedAccountGroup

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! ebf3c38

@ffmcgee725 ffmcgee725 enabled auto-merge November 14, 2025 08:51
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeCore, SmokeConfirmationsRedesigned, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeTrade, SmokeWalletPlatform, SmokeWalletUX, SmokeAssets, SmokeSwaps, SmokeStake, SmokeCard, SmokeNotifications, SmokeRewards, SmokePerps, SmokeRamps, SmokeMultiChainPermissions, SmokeAnalytics, SmokeMultiChainAPI, SmokePredictions
  • Risk Level: high
  • AI Confidence: %
click to see 🤖 AI reasoning details

Fallback: AI analysis did not complete successfully. Running all tests.

View GitHub Actions results

@sonarqubecloud
Copy link

@ffmcgee725 ffmcgee725 added this pull request to the merge queue Nov 14, 2025
Merged via the queue into main with commit cc9c67a Nov 14, 2025
151 of 153 checks passed
@ffmcgee725 ffmcgee725 deleted the jc/WAPI-829 branch November 14, 2025 11:05
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2025
@metamaskbot metamaskbot added the release-7.61.0 Issue or pull request that will be included in release 7.61.0 label Nov 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.61.0 Issue or pull request that will be included in release 7.61.0 size-S team-wallet-integrations Wallet Integrations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants