Panel only shows the most recent instance when connecting after stores initialize (regression since MV3)
Bug
When multiple stores connect() before the devtools panel is opened, the panel shows only one instance (the most recently active one), and its name is displayed as the internal composite id (e.g. 18/3) instead of the name passed to connect().
Downstream report with screenshots: pmndrs/zustand#3461 (3 zustand stores → 1 instance shown, named "18/3").
Reproduction
- Build the extension from
mainand load it unpacked. - Open a page that creates 3 connections before the panel is open, e.g. three zustand stores with
devtools({ name }), or plain__REDUX_DEVTOOLS_EXTENSION__.connect({ name })× 3. - Open the devtools panel.
- Instance dropdown shows a single instance named like
920546649/1instead of three named instances.
Works correctly in extension 3.1.6 (MV2).
Cause
In MV2 the panel read the background page's store directly, so it always saw every registered instance. After the MV3 migration (#1714) the panel gets state via messages, and #1771 ("Send state from background when monitor connects") added a replay in onConnect — but it replays only current (the single most recently active instance):
Two problems:
- All instances other than
currentare never sent to the panel. - The replayed
STATErequest carries noname/libConfig, so the panel's instances reducer falls back toname = current— which is why users see composite ids like18/3as instance names.
Fix
Iterate over all registered instances in onConnect and include a libConfig (with the stored name, features, serialize) in each replayed request.
I have this implemented and verified locally (Playwright + unpacked build: before = 1 instance named 920546649/1, after = all 3 instances with correct names). Happy to open a PR.
Side note
extension/{chrome,edge,firefox}/manifest.json are still at 3.2.10 although extension/package.json is 3.2.12 — the manifest bumps appear to have been missed in the 3.2.11/3.2.12 version commits.
Source: reduxjs/redux-devtools