MetaMask / MetaMask/metamask-extension

[State Sync Redesign 3.14] Debug-only controller state inspector (optional)

Open
#40,051 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

INVALID-ISSUE-TEMPLATE team-extension-platform
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

Redux DevTools has been non-functional in the extension for some time. This is an opportunity to build something better.

**Option A:** Development-only subscriber that writes all controller state changes to a Redux store for Redux DevTools.
**Option B:** Custom `ControllerStateManager` inspector (log diffs, subscribe to specific controllers, query snapshots from console).

## Steps

1. In development builds, expose `window.__controllerStateManager__` for console access
2. Add `getSnapshot(controllerName)`, `subscribe(controllerName, cb)` to the global
3. Optionally connect to Redux DevTools via a debug Redux store
4. Gate behind `process.env.METAMASK_DEBUG`

## Files

- `ui/store/debug-store.ts`

## Dependencies

Issue 3.1 (can proceed in parallel with migration, but not on critical path)

## Context

Part of [State Sync Redesign — Epic 3: UI-controller subscriptions]. Optional/deferred.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ui/store/debug-store.ts and review the state-sync context around Issue 3.1 before choosing between the Redux DevTools subscriber and the custom ControllerStateManager inspector. Done should include development-only console access to the named snapshot and subscription operations, gated by METAMASK_DEBUG; Redux DevTools integration is explicitly optional.

Written by the indexing model from the issue text.

Assessment

Tech stack
redux, typescript
Domain
developer-experience, devtools, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.