Skip to content

feat: add group.status - #9104

Open
ccharly wants to merge 12 commits into
mainfrom
cc/feat/account-group-status
Open

feat: add group.status#9104
ccharly wants to merge 12 commits into
mainfrom
cc/feat/account-group-status

Conversation

@ccharly

@ccharly ccharly commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Explanation

Adding a new group.status in the account-tree, so the UI can use this information to show loading spinner when a group is not fully-aligned.

References

N/A

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Breaking account-tree messenger and state shape changes affect all consumers; alignment/status timing is user-facing but covered by new tests and mirrors existing wallet status patterns.

Overview
Adds per-group alignment status end-to-end so the UI can show spinners while a multichain account group is creating or aligning accounts.

multichain-account-service introduces MultichainAccountGroupStatus and tracks it on MultichainAccountGroup (uninitialized, in-progress variants, aligned, misaligned). Status updates publish MultichainAccountService:groupStatusChange. Alignment and post-creation flows run group updates inside withState, which sets in-progress status and finalizes to aligned/misaligned without clobbering an outer in-progress state.

account-tree-controller (breaking) adds required status on AccountGroupMultichainAccountObject. On tree build it reads wallet/group status from getMultichainAccountWallet / getMultichainAccountGroup (default uninitialized if missing) instead of hardcoding wallet ready. It subscribes to MultichainAccountService:groupStatusChange to keep group status in sync. Messenger types now require the new event plus the get actions.

Exports isMultichainAccountGroup and isMultichainAccountWallet type guards for safer branching in insert/sync paths.

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

@ccharly
ccharly marked this pull request as ready for review July 8, 2026 13:42
@ccharly
ccharly requested review from a team as code owners July 8, 2026 13:42
@ccharly
ccharly temporarily deployed to default-branch July 8, 2026 13:42 — with GitHub Actions Inactive
@ccharly

ccharly commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 34f2bcb. Configure here.

groupIndex,
groupState,
);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Alignment asserts missing gap groups

High Severity

#alignAccountsForRange now asserts each index already has a service group before applying alignment state, but alignment still builds account state for indices treated as unaligned when no group exists. Wallets can have non-contiguous group indices after init, so alignment can throw instead of creating or updating the missing group.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 34f2bcb. Configure here.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/account-tree-controller@7.5.3-preview-34f2bcbf7
@metamask-previews/accounts-controller@39.0.4-preview-34f2bcbf7
@metamask-previews/address-book-controller@7.1.2-preview-34f2bcbf7
@metamask-previews/ai-controllers@0.8.0-preview-34f2bcbf7
@metamask-previews/analytics-controller@1.2.1-preview-34f2bcbf7
@metamask-previews/analytics-data-regulation-controller@0.0.0-preview-34f2bcbf7
@metamask-previews/announcement-controller@8.1.0-preview-34f2bcbf7
@metamask-previews/app-metadata-controller@2.0.1-preview-34f2bcbf7
@metamask-previews/approval-controller@9.0.2-preview-34f2bcbf7
@metamask-previews/assets-controller@10.1.0-preview-34f2bcbf7
@metamask-previews/assets-controllers@109.3.0-preview-34f2bcbf7
@metamask-previews/authenticated-user-storage@3.0.0-preview-34f2bcbf7
@metamask-previews/base-controller@9.1.0-preview-34f2bcbf7
@metamask-previews/base-data-service@0.1.3-preview-34f2bcbf7
@metamask-previews/bitcoin-regtest-up@1.0.0-preview-34f2bcbf7
@metamask-previews/bridge-controller@77.3.2-preview-34f2bcbf7
@metamask-previews/bridge-status-controller@74.1.0-preview-34f2bcbf7
@metamask-previews/build-utils@3.0.4-preview-34f2bcbf7
@metamask-previews/chain-agnostic-permission@1.7.0-preview-34f2bcbf7
@metamask-previews/chomp-api-service@3.1.0-preview-34f2bcbf7
@metamask-previews/claims-controller@0.5.3-preview-34f2bcbf7
@metamask-previews/client-controller@1.0.1-preview-34f2bcbf7
@metamask-previews/client-utils@0.0.0-preview-34f2bcbf7
@metamask-previews/compliance-controller@2.1.0-preview-34f2bcbf7
@metamask-previews/composable-controller@12.0.1-preview-34f2bcbf7
@metamask-previews/config-registry-controller@0.4.1-preview-34f2bcbf7
@metamask-previews/connectivity-controller@0.2.0-preview-34f2bcbf7
@metamask-previews/controller-utils@12.3.0-preview-34f2bcbf7
@metamask-previews/core-backend@6.5.0-preview-34f2bcbf7
@metamask-previews/delegation-controller@3.0.2-preview-34f2bcbf7
@metamask-previews/earn-controller@12.2.2-preview-34f2bcbf7
@metamask-previews/eip-5792-middleware@3.0.4-preview-34f2bcbf7
@metamask-previews/eip-7702-internal-rpc-middleware@0.1.1-preview-34f2bcbf7
@metamask-previews/eip1193-permission-middleware@2.0.1-preview-34f2bcbf7
@metamask-previews/ens-controller@19.1.5-preview-34f2bcbf7
@metamask-previews/eth-block-tracker@15.0.1-preview-34f2bcbf7
@metamask-previews/eth-json-rpc-middleware@23.1.3-preview-34f2bcbf7
@metamask-previews/eth-json-rpc-provider@6.0.1-preview-34f2bcbf7
@metamask-previews/foundryup@1.0.1-preview-34f2bcbf7
@metamask-previews/gas-fee-controller@26.2.4-preview-34f2bcbf7
@metamask-previews/gator-permissions-controller@4.2.2-preview-34f2bcbf7
@metamask-previews/geolocation-controller@0.1.3-preview-34f2bcbf7
@metamask-previews/java-tron-up@1.0.0-preview-34f2bcbf7
@metamask-previews/json-rpc-engine@10.5.0-preview-34f2bcbf7
@metamask-previews/json-rpc-middleware-stream@8.0.8-preview-34f2bcbf7
@metamask-previews/keyring-controller@27.1.0-preview-34f2bcbf7
@metamask-previews/local-node-utils@1.0.0-preview-34f2bcbf7
@metamask-previews/logging-controller@8.0.2-preview-34f2bcbf7
@metamask-previews/message-manager@14.1.2-preview-34f2bcbf7
@metamask-previews/messenger@2.0.0-preview-34f2bcbf7
@metamask-previews/messenger-cli@0.2.0-preview-34f2bcbf7
@metamask-previews/money-account-api-data-service@0.1.0-preview-34f2bcbf7
@metamask-previews/money-account-balance-service@2.1.2-preview-34f2bcbf7
@metamask-previews/money-account-controller@0.3.3-preview-34f2bcbf7
@metamask-previews/money-account-upgrade-controller@2.2.1-preview-34f2bcbf7
@metamask-previews/multichain-account-service@11.1.0-preview-34f2bcbf7
@metamask-previews/multichain-api-middleware@4.0.1-preview-34f2bcbf7
@metamask-previews/multichain-network-controller@3.2.1-preview-34f2bcbf7
@metamask-previews/multichain-transactions-controller@7.1.1-preview-34f2bcbf7
@metamask-previews/name-controller@9.1.2-preview-34f2bcbf7
@metamask-previews/network-controller@34.0.0-preview-34f2bcbf7
@metamask-previews/network-enablement-controller@5.4.1-preview-34f2bcbf7
@metamask-previews/notification-services-controller@25.0.0-preview-34f2bcbf7
@metamask-previews/passkey-controller@2.0.1-preview-34f2bcbf7
@metamask-previews/permission-controller@13.1.1-preview-34f2bcbf7
@metamask-previews/permission-log-controller@5.1.0-preview-34f2bcbf7
@metamask-previews/perps-controller@9.2.1-preview-34f2bcbf7
@metamask-previews/phishing-controller@17.2.0-preview-34f2bcbf7
@metamask-previews/platform-api-docs@0.0.0-preview-34f2bcbf7
@metamask-previews/polling-controller@16.0.8-preview-34f2bcbf7
@metamask-previews/preferences-controller@23.1.0-preview-34f2bcbf7
@metamask-previews/profile-metrics-controller@4.0.1-preview-34f2bcbf7
@metamask-previews/profile-sync-controller@28.2.0-preview-34f2bcbf7
@metamask-previews/ramps-controller@15.1.0-preview-34f2bcbf7
@metamask-previews/rate-limit-controller@7.0.1-preview-34f2bcbf7
@metamask-previews/react-data-query@0.2.1-preview-34f2bcbf7
@metamask-previews/remote-feature-flag-controller@4.2.2-preview-34f2bcbf7
@metamask-previews/sample-controllers@5.0.3-preview-34f2bcbf7
@metamask-previews/seedless-onboarding-controller@10.0.3-preview-34f2bcbf7
@metamask-previews/selected-network-controller@26.1.5-preview-34f2bcbf7
@metamask-previews/shield-controller@5.1.2-preview-34f2bcbf7
@metamask-previews/signature-controller@39.2.7-preview-34f2bcbf7
@metamask-previews/smart-transactions-controller@25.0.0-preview-34f2bcbf7
@metamask-previews/snap-account-service@1.0.0-preview-34f2bcbf7
@metamask-previews/social-controllers@2.4.0-preview-34f2bcbf7
@metamask-previews/solana-test-validator-up@1.0.0-preview-34f2bcbf7
@metamask-previews/stellar-quickstart-up@0.0.0-preview-34f2bcbf7
@metamask-previews/storage-service@1.0.2-preview-34f2bcbf7
@metamask-previews/subscription-controller@6.2.0-preview-34f2bcbf7
@metamask-previews/transaction-controller@68.3.0-preview-34f2bcbf7
@metamask-previews/transaction-pay-controller@23.17.4-preview-34f2bcbf7
@metamask-previews/user-operation-controller@41.2.6-preview-34f2bcbf7
@metamask-previews/wallet@7.0.0-preview-34f2bcbf7
@metamask-previews/wallet-cli@0.0.0-preview-34f2bcbf7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant