Persist setting is lost when an instance is removed

Open Beginner friendly
#2,126 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@RaphaelFakhri is already working on this.

Since Oct 17, 2026.

  • #2127 by @RaphaelFakhri — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
redux, typescript
Domain
devtools

Research direction

Start with removeState in packages/redux-devtools-app-core/src/reducers/instances.ts and inspect the instances reducer's REMOVE_INSTANCE handling. The minimal reducer repro in the issue shows the expected behavior: removing an instance should preserve persisted: true; confirm the reducer returns that value after the action.

Written by the indexing model from the issue text.

Description

The instances reducer drops persisted on REMOVE_INSTANCE. removeState in packages/redux-devtools-app-core/src/reducers/instances.ts returns { selected, current, sync, connections, options, states } and leaves out persisted.

Effects

Based on where REMOVE_INSTANCE is dispatched:

  • Standalone app: when a connected store disconnects, the persist button turns off on its own.
  • Extension: with persist on and a closed tab's instance still listed, the first click on the persist button does not turn persist off. togglePersist() in the background middleware removes the disconnected instance first, which clears persisted, and the following TOGGLE_PERSIST turns undefined into true.

Minimal reducer repro

const next = instances(
  { ...stateWithTwoConnections, persisted: true },
  { type: REMOVE_INSTANCE, id: 1 },
);
next.persisted; // undefined, expected true
Dominant language
TypeScript
Stars
14.4k
Forks
1.2k
Avg merge
3d 6h
Merged PRs (30d)
12

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from reduxjs/redux-devtools

All issues in reduxjs/redux-devtools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.