Persist setting is lost when an instance is removed
Maintainers usually reply within 1 day
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 clearspersisted, and the followingTOGGLE_PERSISTturnsundefinedintotrue.
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reduxjs/redux-devtools
-
feature
Difficulty 3/5 1-2 days Newbie friendliness 45/100
reduxjs/redux-devtools#2143 ·
Maintainers usually reply within 1 day
-
connect().subscribe: calling unsubscribe twice removes another listenerPossibly taken @unknownhackerworld claimed this 17 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 25/100
reduxjs/redux-devtools#2137 ·
Maintainers usually reply within 1 day
-
Memory leak in EdgeOpen
Difficulty 3/5 1-2 days Newbie friendliness 48/100
reduxjs/redux-devtools#2129 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
reduxjs/redux-devtools#2125 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
reduxjs/redux-devtools#2091 ·
Maintainers usually reply within 1 day
All issues in reduxjs/redux-devtools
Similar issues
-
idea-scout idea:453
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
jeanibarz/agent-notebook#453 ·
Maintainers usually reply within 1 day
-
level/task
Difficulty 1/5 Under an hour Newbie friendliness 95/100
wazuh/wazuh-dashboard-plugins#9642 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
unicef/adt-studio#1112 ·
Maintainers usually reply within 2 days
-
feature request good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
TabularisDB/tabularis#1513 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100