refactor: rename Controller types to MessengerClient types#28610
Conversation
|
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. |
cae0b4f to
69d60d0
Compare
69d60d0 to
e97d56c
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Every single diff examined shows ONLY this import rename and the corresponding type annotation update. No controller logic, initialization order, state schemas, messenger configurations, Redux sync, or runtime behavior was changed. This is a compile-time only change - TypeScript type aliases are erased at runtime. The actual controller initialization functions remain identical in behavior. Risk factors:
Conservative approach: Running a minimal set of smoke tests covering core wallet functionality (accounts, confirmations, wallet platform) to verify the app initializes correctly and core flows work. This covers the most critical controller domains (KeyringController, AccountsController, NetworkController, TransactionController) that were renamed. No performance tests are needed as this is a pure type rename with zero runtime impact on rendering, data loading, or app performance. Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |
|
Looks like a simple change. I would like to locally test this via my iOS simulator. What user flow journey would this affect? |
These are purely variable renames. The flows should not be impacted in any case. The build would have failed if we were still using the old names in some files. I’d suggest running a simple test, but for this kind of change, where a variable used in almost all flows is being renamed, I would rely more on reviewing the code itself to catch anything that might still be using the old name |
NicolasMassart
left a comment
There was a problem hiding this comment.
found 2 naming inconsistencies that could be fixed in this PR
Here are the follow-up PRs that are currently waiting for this one to merge:
Could I address them in #28641 instead? Otherwise, it’s going to be much harder to get 13 reviews again. |
NicolasMassart
left a comment
There was a problem hiding this comment.
approved given the changes will be done in followup PRs



Description
Rename type definitions in
Engine/types.tsto reflect that the init system handles all messenger clients (controllers + services), not just controllers. All consumer imports updated accordingly.PR 1 of 4 in a series that updates the init system API to use "messenger client" terminology:
Controller→MessengerClient,ControllerInitFunction→MessengerClientInitFunction, etc.)CONTROLLER_MESSENGERS→MESSENGER_FACTORIESinitModularizedControllers→initMessengerClients+ utils/Engine.ts renamescontroller→messengerClient,getController→getMessengerClient) in all init files + testsRelates to WPC-916.
Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/WPC-916
Manual testing steps
N/A — 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
Note
Medium Risk
Broad mechanical type renames across many engine init modules and tests; low behavioral risk but moderate integration risk if any downstream code still expects the old
Controller*types.Overview
Updates the Engine init type API to use messenger client terminology:
Controllers��MessengerClients,ControllerName��MessengerClientName,ControllerInitRequest/ControllerInitFunction��MessengerClientInitRequest/MessengerClientInitFunction, and related mapping/request types inapp/core/Engine/types.ts.Propagates the rename through all affected init implementations and unit tests (e.g.,
accountsControllerInit,bridgeControllerInit,TransactionControllerInit, etc.) plus test utilities, without changing initialization logic beyond updated type annotations.Reviewed by Cursor Bugbot for commit e97d56c. Bugbot is set up for automated code reviews on this repo. Configure here.