MetaMask / MetaMask/metamask-extension
UI <=> Background - Separate actions with no UI interactions
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### **Epic: Define deeper boundaries between background and redux state**
https://github.com/MetaMask/metamask-extension/issues/18054
### **Tasks:**
- Inside UI folder, create a new background folder with subfolders for each controller whose state the UI interacts with - `ui/background`
- In action.ts file, move “actions” that only interact with the background into and split into each of the controller folders. This is for defining the boundary between states and tracing functionality across the background/ui communication boundary.
Eg: `updateMetamaskStateFromBackground`, `updateSwapApprovalTransaction`, `updateEditableParams`, `updateTransactionSendFlowHistory`, `backupUserData`, `restoreUserData`, `disableSnap`...
Contributor guide
Research direction
Start by reading the existing action.ts file and tracing the listed actions across the UI/background boundary. Use the linked epic for the intended controller boundaries, then organize ui/background into controller-specific folders and move background-only actions accordingly. Done means the actions are separated by controller and UI-facing state interactions remain traceable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100