A connection allowed without "Remember my choice for this site" lived in a module-level object in src/background/index.js, so it ended the first time Chrome stopped the idle background worker. Each such connection is now one item in the browser's session storage (storage.session, key origin:address), which outlives the worker and is emptied when the browser closes. The background reads and writes it through sessionStorageGet/Set/Remove, added to src/shared/browserApi.js beside the storage.local wrappers. Removal in Settings, address switch, address removal and wallet removal still end it.
What a reviewer might trip over:
One item per connection, so making one is a single write and two never overwrite each other. Ending one reads the items, then removes some.
Settings now waits for the background's answer to AUTISTMASK_REMOVE_SITE before drawing the lists again; otherwise it could list the site before the removal lands.
On an address switch, pending approvals are rejected before the connections end, because ending now waits on storage.
tests/support/storageStub.js gains a session area. The Settings stub in tests/backgroundApproval.test.js now hands back the background's answer when it is sent, as the browser does.
tests/e2e/slowApproval.js now connects its site without "Remember" and asks eth_accounts once Chrome has stopped the worker.
New file: tests/connectedSitesWorkerRestart.test.js, in tests/.
Disclosures:
manifest/firefox.json declared no minimum version; it now declares 115.0, the first Firefox with session storage.
Judgement call: address and wallet removal still tell the background without waiting, so those connections end one storage round trip after the message.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/AutistMask/issues/526.
A connection allowed without "Remember my choice for this site" lived in a module-level object in `src/background/index.js`, so it ended the first time Chrome stopped the idle background worker. Each such connection is now one item in the browser's session storage (`storage.session`, key `origin:address`), which outlives the worker and is emptied when the browser closes. The background reads and writes it through `sessionStorageGet`/`Set`/`Remove`, added to `src/shared/browserApi.js` beside the `storage.local` wrappers. Removal in Settings, address switch, address removal and wallet removal still end it.
What a reviewer might trip over:
- One item per connection, so making one is a single write and two never overwrite each other. Ending one reads the items, then removes some.
- Settings now waits for the background's answer to `AUTISTMASK_REMOVE_SITE` before drawing the lists again; otherwise it could list the site before the removal lands.
- On an address switch, pending approvals are rejected before the connections end, because ending now waits on storage.
- `tests/support/storageStub.js` gains a session area. The Settings stub in `tests/backgroundApproval.test.js` now hands back the background's answer when it is sent, as the browser does.
- `tests/e2e/slowApproval.js` now connects its site without "Remember" and asks `eth_accounts` once Chrome has stopped the worker.
New file: `tests/connectedSitesWorkerRestart.test.js`, in `tests/`.
Disclosures:
- `manifest/firefox.json` declared no minimum version; it now declares 115.0, the first Firefox with session storage.
- Judgement call: address and wallet removal still tell the background without waiting, so those connections end one storage round trip after the message.
Model: opus-5-5
A connection allowed without "Remember my choice for this site" was held
in a module-level object in the background worker. Chrome stops the worker
after about 30 seconds idle, so the connection ended at the first idle
spell. Each such connection is now one item in the browser's session
storage, which outlives the worker but not the browser, read and written
through new wrappers in src/shared/browserApi.js. Settings now waits for
the background to end a removed site's connections before listing the
connected sites again. The Firefox manifest declares 115.0, the first
version with session storage, as its minimum.
Model: opus-5-5
clawbot
self-assigned this 2026-10-18 23:04:11 +02:00
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.
Fixes #526.
A connection allowed without "Remember my choice for this site" lived in a module-level object in
src/background/index.js, so it ended the first time Chrome stopped the idle background worker. Each such connection is now one item in the browser's session storage (storage.session, keyorigin:address), which outlives the worker and is emptied when the browser closes. The background reads and writes it throughsessionStorageGet/Set/Remove, added tosrc/shared/browserApi.jsbeside thestorage.localwrappers. Removal in Settings, address switch, address removal and wallet removal still end it.What a reviewer might trip over:
AUTISTMASK_REMOVE_SITEbefore drawing the lists again; otherwise it could list the site before the removal lands.tests/support/storageStub.jsgains a session area. The Settings stub intests/backgroundApproval.test.jsnow hands back the background's answer when it is sent, as the browser does.tests/e2e/slowApproval.jsnow connects its site without "Remember" and askseth_accountsonce Chrome has stopped the worker.New file:
tests/connectedSitesWorkerRestart.test.js, intests/.Disclosures:
manifest/firefox.jsondeclared no minimum version; it now declares 115.0, the first Firefox with session storage.Model: opus-5-5
Review passed.
Model: opus-5-5