Skip to content

refactor: rename initModularizedControllers to initMessengerClients and update result properties#28645

Open
cryptodev-2s wants to merge 1 commit intomainfrom
rename-init-modularized-controllers-to-init-messenger-clients
Open

refactor: rename initModularizedControllers to initMessengerClients and update result properties#28645
cryptodev-2s wants to merge 1 commit intomainfrom
rename-init-modularized-controllers-to-init-messenger-clients

Conversation

@cryptodev-2s
Copy link
Copy Markdown
Contributor

@cryptodev-2s cryptodev-2s commented Apr 10, 2026

Description

Rename initModularizedControllers to initMessengerClients, drop existingControllersByName, rename controllerInitFunctions to initFunctions, and update return type to messengerClientsByName. Update all consumers in Engine.ts, utils.test.ts, and test utility functions.

80 files changed. PR 3 of 4 — depends on PR 2 (#28641).

Relates to WPC-916.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/WPC-916

Manual testing steps

Feature: Messenger client init system

  Scenario: App builds and runs normally
    Given the app is built from this branch

    When user opens the app
    Then the app behaves identically to main (no runtime behavior change)

Screenshots/Recordings

N/A — no UI changes.

Before

N/A

After

N/A

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

Medium Risk
Touches Engine startup wiring by renaming and reshaping the controller/messenger-client initialization helper; behavior should be equivalent but regressions could prevent controllers from being initialized or retrieved in the correct order.

Overview
Renames the modular engine initialization helper from initModularizedControllers to initMessengerClients, updating its API (controllerInitFunctionsinitFunctions) and return shape (controllersByNamemessengerClientsByName).

Updates Engine.ts to use the new helper/return value for wiring controller instances into the Engine context, and adjusts the helper to drop support for pre-seeded existingControllersByName in favor of a single progressively-built map.

Renames the associated test utilities (buildControllerInitRequestMock/createMockControllerInitFunction) and updates a large set of controller init tests to use the new mock builder and updated helper/error messages.

Reviewed by Cursor Bugbot for commit 6f60b10. 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-platform Core Platform team label Apr 10, 2026
@cryptodev-2s cryptodev-2s force-pushed the rename-controller-messengers-to-messenger-factories branch from d94c76a to 56cc68e Compare April 10, 2026 13:43
Base automatically changed from rename-controller-messengers-to-messenger-factories to main April 10, 2026 18:22
@cryptodev-2s cryptodev-2s force-pushed the rename-init-modularized-controllers-to-init-messenger-clients branch from 13768ee to 6f60b10 Compare April 11, 2026 07:16
@cryptodev-2s cryptodev-2s marked this pull request as ready for review April 11, 2026 07:17
@cryptodev-2s cryptodev-2s requested review from a team as code owners April 11, 2026 07:17
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - draft PR

All E2E tests pre-selected.

View GitHub Actions results

@github-actions
Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
11 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud
Copy link
Copy Markdown

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants