The tracked-token save in saveStateOnce() in src/shared/state.js, with two popup pages open on one network.
What happens
A save writes trackedTokens whole. Page A and page B are open on one network. B adds a token, and B's "Added SYMBOL" shows. A has not read that save. A then adds or removes a token, and A's save writes A's list over the stored one, so B's token is gone from the stored list. A token B removed comes back the same way. Read from the code; not run in a browser.
Found by the fourth review of #704, outside its scope. It is the same on next without that PR.
What should happen
No tracked token is lost and none comes back, whichever page saves last. README's text for a successful add stays true.
Severity: minor
Definition of done
A save merges this page's change into the stored trackedTokens by contract address, as takeStoredTrackedTokens() does for a switch, so another page's add or removal stays.
A test for an add and a test for a removal on the other page, each failing on next.
Model: opus-5-5
## Where
The tracked-token save in `saveStateOnce()` in `src/shared/state.js`, with two popup pages open on one network.
## What happens
A save writes `trackedTokens` whole. Page A and page B are open on one network. B adds a token, and B's "Added SYMBOL" shows. A has not read that save. A then adds or removes a token, and A's save writes A's list over the stored one, so B's token is gone from the stored list. A token B removed comes back the same way. Read from the code; not run in a browser.
Found by the fourth review of https://git.eeqj.de/sneak/AutistMask/pulls/704, outside its scope. It is the same on `next` without that PR.
## What should happen
No tracked token is lost and none comes back, whichever page saves last. README's text for a successful add stays true.
Severity: minor
## Definition of done
- [ ] A save merges this page's change into the stored `trackedTokens` by contract address, as `takeStoredTrackedTokens()` does for a switch, so another page's add or removal stays.
- [ ] A test for an add and a test for a removal on the other page, each failing on `next`.
Model: opus-5-5
clawbot
self-assigned this 2026-11-02 23:14:16 +01:00
Plan: one PR to next, in saveStateOnce() in src/shared/state.js. When the save leaves the network as it was and the page's trackedTokens differs from baseline, merged.trackedTokens is mergeListByIdentity() of baseline.trackedTokens, current.trackedTokens and fresh.trackedTokens, by contract address, with this page's record winning for a token both hold. A save that switches networks stays as it is. The save's comment and README's Stored data sentence on what is merged entry by entry say so. Tests in tests/trackedTokensPerNetwork.test.js, each failing on next: the other page's add stays, and the other page's removal stays removed.
Model: opus-5-5
Plan: one PR to `next`, in `saveStateOnce()` in `src/shared/state.js`. When the save leaves the network as it was and the page's `trackedTokens` differs from `baseline`, `merged.trackedTokens` is `mergeListByIdentity()` of `baseline.trackedTokens`, `current.trackedTokens` and `fresh.trackedTokens`, by contract address, with this page's record winning for a token both hold. A save that switches networks stays as it is. The save's comment and README's Stored data sentence on what is merged entry by entry say so. Tests in `tests/trackedTokensPerNetwork.test.js`, each failing on `next`: the other page's add stays, and the other page's removal stays removed.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Where
The tracked-token save in
saveStateOnce()insrc/shared/state.js, with two popup pages open on one network.What happens
A save writes
trackedTokenswhole. Page A and page B are open on one network. B adds a token, and B's "Added SYMBOL" shows. A has not read that save. A then adds or removes a token, and A's save writes A's list over the stored one, so B's token is gone from the stored list. A token B removed comes back the same way. Read from the code; not run in a browser.Found by the fourth review of #704, outside its scope. It is the same on
nextwithout that PR.What should happen
No tracked token is lost and none comes back, whichever page saves last. README's text for a successful add stays true.
Severity: minor
Definition of done
trackedTokensby contract address, astakeStoredTrackedTokens()does for a switch, so another page's add or removal stays.next.Model: opus-5-5
Plan: one PR to
next, insaveStateOnce()insrc/shared/state.js. When the save leaves the network as it was and the page'strackedTokensdiffers frombaseline,merged.trackedTokensismergeListByIdentity()ofbaseline.trackedTokens,current.trackedTokensandfresh.trackedTokens, by contract address, with this page's record winning for a token both hold. A save that switches networks stays as it is. The save's comment and README's Stored data sentence on what is merged entry by entry say so. Tests intests/trackedTokensPerNetwork.test.js, each failing onnext: the other page's add stays, and the other page's removal stays removed.Model: opus-5-5