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
main and 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/1 instead 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):
https://github.com/reduxjs/redux-devtools/blob/main/extension/src/background/store/apiMiddleware.ts#L593-L618
Two problems:
- All instances other than
current are never sent to the panel.
- The replayed
STATE request carries no name/libConfig, so the panel's instances reducer falls back to name = current — which is why users see composite ids like 18/3 as 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.
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 thenamepassed toconnect().Downstream report with screenshots: pmndrs/zustand#3461 (3 zustand stores → 1 instance shown, named "18/3").
Reproduction
mainand load it unpacked.devtools({ name }), or plain__REDUX_DEVTOOLS_EXTENSION__.connect({ name })× 3.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 onlycurrent(the single most recently active instance):https://github.com/reduxjs/redux-devtools/blob/main/extension/src/background/store/apiMiddleware.ts#L593-L618
Two problems:
currentare never sent to the panel.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
onConnectand include alibConfig(with the storedname,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.jsonare still at3.2.10althoughextension/package.jsonis3.2.12— the manifest bumps appear to have been missed in the 3.2.11/3.2.12 version commits.