Home keeps the previous network's history rows on screen after a network switch #718

Closed
opened 2026-11-02 23:41:29 +01:00 by clawbot · 1 comment
Collaborator

Where

Home's transaction history, loadHomeTxs() in src/popup/views/home.js, and the list home-tx-list.

What happens

Found by the review of #693; read from the code.

  • Home does not clear home-tx-list on a network switch. The previous network's rows, or its failure message, stay on screen until the new network's answer lands. With "Use Blockscout" off or a slow answer, they stay longer.
  • Home, AddressDetail and AddressToken compare state.networkId before they wait for storedNetworkIs(). An answer that lands during the first storage read of a switch made in Settings is still written to the list.

What should happen

applyChainSwitchFields() clears chain-specific data "so stale data from the previous chain is never displayed". Home shows no row or message from the previous network once the switch is made.

Severity: minor

Definition of done

  • After a network switch, Home's list shows no row or message of the previous network, before and after the new network's answer lands.
  • The three screens also compare state.networkId after the wait for storedNetworkIs().
  • A Jest test for each, failing on next.

Model: opus-5-5

## Where Home's transaction history, `loadHomeTxs()` in `src/popup/views/home.js`, and the list `home-tx-list`. ## What happens Found by the review of https://git.eeqj.de/sneak/AutistMask/pulls/693; read from the code. - Home does not clear `home-tx-list` on a network switch. The previous network's rows, or its failure message, stay on screen until the new network's answer lands. With "Use Blockscout" off or a slow answer, they stay longer. - Home, AddressDetail and AddressToken compare `state.networkId` before they wait for `storedNetworkIs()`. An answer that lands during the first storage read of a switch made in Settings is still written to the list. ## What should happen `applyChainSwitchFields()` clears chain-specific data "so stale data from the previous chain is never displayed". Home shows no row or message from the previous network once the switch is made. Severity: minor ## Definition of done - [ ] After a network switch, Home's list shows no row or message of the previous network, before and after the new network's answer lands. - [ ] The three screens also compare `state.networkId` after the wait for `storedNetworkIs()`. - [ ] A Jest test for each, failing on `next`. Model: opus-5-5
clawbot self-assigned this 2026-11-02 23:41:29 +01:00
Author
Collaborator

Plan: one PR to next, after #720, which shares home.js. A network switch empties home-tx-list, or loadHomeTxs() empties it first when it starts for a network other than the one last drawn, with the "Loading..." line the address screens use. The three screens compare state.networkId again after waiting for storedNetworkIs(), in the answer path and in the failure path. Tests in tests/historyAfterNetworkSwitch.test.js, each failing on next.

Model: opus-5-5

Plan: one PR to `next`, after https://git.eeqj.de/sneak/AutistMask/issues/720, which shares `home.js`. A network switch empties `home-tx-list`, or `loadHomeTxs()` empties it first when it starts for a network other than the one last drawn, with the "Loading..." line the address screens use. The three screens compare `state.networkId` again after waiting for `storedNetworkIs()`, in the answer path and in the failure path. Tests in `tests/historyAfterNetworkSwitch.test.js`, each failing on `next`. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#718