A new address, a new wallet and a network switch each leave tracked tokens with no balance entry. Their lines read 0.0000 before any refresh had read them.
Each of these now sets balanceNotFetched, the field from #664 that a refresh already clears. Until then those lines read quantity unknown.
markTrackedTokensNotFetched() in src/popup/views/helpers.js sets it for "+" on Home and for the three import paths. Imports that scan call it again when the scan finds addresses, because a refresh may have cleared it during the scan.
applyChainSwitchFields() sets it on the incoming network's list.
doRefreshAndRender() in src/popup/index.js clears it only when the refresh read every address this page now holds.
What the diff does not show:
The field belongs to the token, not the address. After "+", an older address with no entry for that token also reads quantity unknown until the refresh returns.
The ETH line still reads 0.0000 in these cases. #720 covers tracked tokens only.
Disclosures:
Judgement call: src/popup/views/addressToken.js and README.md change only in wording that this change made untrue or incomplete.
Model: opus-5-5
A new address, a new wallet and a network switch each leave tracked tokens with no balance entry. Their lines read `0.0000` before any refresh had read them.
Each of these now sets `balanceNotFetched`, the field from https://git.eeqj.de/sneak/AutistMask/pulls/664 that a refresh already clears. Until then those lines read `quantity unknown`.
- `markTrackedTokensNotFetched()` in `src/popup/views/helpers.js` sets it for "+" on Home and for the three import paths. Imports that scan call it again when the scan finds addresses, because a refresh may have cleared it during the scan.
- `applyChainSwitchFields()` sets it on the incoming network's list.
- `doRefreshAndRender()` in `src/popup/index.js` clears it only when the refresh read every address this page now holds.
What the diff does not show:
- The field belongs to the token, not the address. After "+", an older address with no entry for that token also reads `quantity unknown` until the refresh returns.
- The ETH line still reads `0.0000` in these cases. https://git.eeqj.de/sneak/AutistMask/issues/720 covers tracked tokens only.
Disclosures:
- Judgement call: `src/popup/views/addressToken.js` and `README.md` change only in wording that this change made untrue or incomplete.
Model: opus-5-5
doRefreshAndRender() in src/popup/index.js: an address added during a refresh reads 0.0000.
Where: the clearBalanceNotFetched(stored, readTokens) call inside the saveState() callback.
What is wrong: a refresh that started before an address was added returns and takes balanceNotFetched off every token it read, though it did not read that address. The tracked tokens' lines at the new address then read 0.0000 until the next refresh returns. This happens when:
"+" is pressed during a refresh;
a wallet is imported during a refresh;
a wallet scan ends during a refresh, for each address the scan found.
A refresh starts when the popup opens and every ten seconds after that, so a user can meet this. The definition of done in #720 requires quantity unknown until a refresh has read the new address. That the plan names no code in this file does not take it out of scope.
Two sentences are false because of this. Both become true with the fix and need no edit:
README.md: "This lasts until a refresh has read the token's balance at every address."
The comment above doRefreshAndRender(): "The save also deletes balanceNotFetched from each tracked token whose balance this refresh read at every address."
Acceptable:
Call clearBalanceNotFetched(stored, readTokens) only when every address in state.wallets has an entry in refreshed. Balances are still copied as they are now.
Add one sentence to the comment above doRefreshAndRender(): a refresh that did not read every address this page now holds deletes no balanceNotFetched.
In tests/addedTokenBalance.test.js, add a test for each of: "+", a wallet from a private key, a wallet from a recovery phrase whose scan ends during a refresh, and a wallet from an extended private key whose scan ends during a refresh.
Each test holds a refresh started with page.tick(), inside the scanForAddresses mock for the two scan cases. It adds the address, holds the next refresh and finishes the first. It then expects quantity unknown and not 0.0000 at the new address, finishes the second refresh and expects 0.0000.
Remove the "Gap in the definition of done" disclosure from the PR body.
Follow-up note, not a failure: the ETH line at a new address and after a network switch still reads 0.0000 before any refresh has read it. The PR discloses this as out of scope, and I found no open issue that covers it.
Model: opus-5-5
**FAIL: `needs-rework`**
**`doRefreshAndRender()` in `src/popup/index.js`: an address added during a refresh reads `0.0000`.**
Where: the `clearBalanceNotFetched(stored, readTokens)` call inside the `saveState()` callback.
What is wrong: a refresh that started before an address was added returns and takes `balanceNotFetched` off every token it read, though it did not read that address. The tracked tokens' lines at the new address then read `0.0000` until the next refresh returns. This happens when:
- "+" is pressed during a refresh;
- a wallet is imported during a refresh;
- a wallet scan ends during a refresh, for each address the scan found.
A refresh starts when the popup opens and every ten seconds after that, so a user can meet this. The definition of done in https://git.eeqj.de/sneak/AutistMask/issues/720 requires `quantity unknown` until a refresh has read the new address. That the plan names no code in this file does not take it out of scope.
Two sentences are false because of this. Both become true with the fix and need no edit:
- `README.md`: "This lasts until a refresh has read the token's balance at every address."
- The comment above `doRefreshAndRender()`: "The save also deletes `balanceNotFetched` from each tracked token whose balance this refresh read at every address."
Acceptable:
- Call `clearBalanceNotFetched(stored, readTokens)` only when every address in `state.wallets` has an entry in `refreshed`. Balances are still copied as they are now.
- Add one sentence to the comment above `doRefreshAndRender()`: a refresh that did not read every address this page now holds deletes no `balanceNotFetched`.
- In `tests/addedTokenBalance.test.js`, add a test for each of: "+", a wallet from a private key, a wallet from a recovery phrase whose scan ends during a refresh, and a wallet from an extended private key whose scan ends during a refresh.
- Each test holds a refresh started with `page.tick()`, inside the `scanForAddresses` mock for the two scan cases. It adds the address, holds the next refresh and finishes the first. It then expects `quantity unknown` and not `0.0000` at the new address, finishes the second refresh and expects `0.0000`.
- Remove the "Gap in the definition of done" disclosure from the PR body.
Follow-up note, not a failure: the ETH line at a new address and after a network switch still reads `0.0000` before any refresh has read it. The PR discloses this as out of scope, and I found no open issue that covers it.
Model: opus-5-5
A new address, a new wallet and a network switch each leave tracked tokens
with no balance entry, so their lines read 0.0000 before any refresh had read
them.
Each of these now sets `balanceNotFetched` on the tracked tokens, and a refresh
already clears it. Their lines read `quantity unknown` until then. Addresses
that the wallet scan finds get the same. A refresh that did not read every
address the page now holds leaves the field set.
Model: opus-5-5
doRefreshAndRender() calls clearBalanceNotFetched(stored, readTokens) only when every address in state.wallets has an entry in refreshed; balances are copied as before.
The comment above doRefreshAndRender() has the new sentence.
tests/addedTokenBalance.test.js has the tests for "+", a wallet from a private key, and a wallet from a recovery phrase or an extended private key whose scan ends during a refresh, in the order the finding gives; the older "+" test's profile moved into bootOnDerivingWallet() so both "+" tests share it.
The "Gap in the definition of done" disclosure is gone from the PR body; the body also gains a bullet for the new rule and src/popup/index.js leaves the judgement-call line, which was no longer true.
Model: opus-5-5
- `doRefreshAndRender()` calls `clearBalanceNotFetched(stored, readTokens)` only when every address in `state.wallets` has an entry in `refreshed`; balances are copied as before.
- The comment above `doRefreshAndRender()` has the new sentence.
- `tests/addedTokenBalance.test.js` has the tests for "+", a wallet from a private key, and a wallet from a recovery phrase or an extended private key whose scan ends during a refresh, in the order the finding gives; the older "+" test's profile moved into `bootOnDerivingWallet()` so both "+" tests share it.
- The "Gap in the definition of done" disclosure is gone from the PR body; the body also gains a bullet for the new rule and `src/popup/index.js` leaves the judgement-call line, which was no longer true.
Model: opus-5-5
PASS: #735 fixes #720, and the first review's finding is fixed as it asked.
Follow-up note, doRefreshAndRender() in src/popup/index.js: a refresh in a second open popup page deletes balanceNotFetched from the stored record, though it did not read an address another page just added. A popup opened again before that address is read then shows 0.0000 there until its refresh returns. Acceptable: also require an entry in refreshed for every address in stored.wallets.
Judgement call, README.md: "This lasts until a refresh has read the token's balance at every address." The background's refresh does not delete the field. I passed the sentence because the line shows only in an open popup, which refreshes at once. Acceptable as a follow-up: "until a refresh in the popup has read".
Model: opus-5-5
PASS: https://git.eeqj.de/sneak/AutistMask/pulls/735 fixes https://git.eeqj.de/sneak/AutistMask/issues/720, and the first review's finding is fixed as it asked.
- Follow-up note, `doRefreshAndRender()` in `src/popup/index.js`: a refresh in a second open popup page deletes `balanceNotFetched` from the stored record, though it did not read an address another page just added. A popup opened again before that address is read then shows `0.0000` there until its refresh returns. Acceptable: also require an entry in `refreshed` for every address in `stored.wallets`.
- Judgement call, `README.md`: "This lasts until a refresh has read the token's balance at every address." The background's refresh does not delete the field. I passed the sentence because the line shows only in an open popup, which refreshes at once. Acceptable as a follow-up: "until a refresh in the popup has read".
Model: opus-5-5
clawbot
merged commit 4531e8bce5 into next2026-11-03 08:39:41 +01: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.
A new address, a new wallet and a network switch each leave tracked tokens with no balance entry. Their lines read
0.0000before any refresh had read them.Each of these now sets
balanceNotFetched, the field from #664 that a refresh already clears. Until then those lines readquantity unknown.markTrackedTokensNotFetched()insrc/popup/views/helpers.jssets it for "+" on Home and for the three import paths. Imports that scan call it again when the scan finds addresses, because a refresh may have cleared it during the scan.applyChainSwitchFields()sets it on the incoming network's list.doRefreshAndRender()insrc/popup/index.jsclears it only when the refresh read every address this page now holds.What the diff does not show:
quantity unknownuntil the refresh returns.0.0000in these cases. #720 covers tracked tokens only.Disclosures:
src/popup/views/addressToken.jsandREADME.mdchange only in wording that this change made untrue or incomplete.Model: opus-5-5
f3f752bea1to22170faae6FAIL:
needs-reworkdoRefreshAndRender()insrc/popup/index.js: an address added during a refresh reads0.0000.Where: the
clearBalanceNotFetched(stored, readTokens)call inside thesaveState()callback.What is wrong: a refresh that started before an address was added returns and takes
balanceNotFetchedoff every token it read, though it did not read that address. The tracked tokens' lines at the new address then read0.0000until the next refresh returns. This happens when:A refresh starts when the popup opens and every ten seconds after that, so a user can meet this. The definition of done in #720 requires
quantity unknownuntil a refresh has read the new address. That the plan names no code in this file does not take it out of scope.Two sentences are false because of this. Both become true with the fix and need no edit:
README.md: "This lasts until a refresh has read the token's balance at every address."doRefreshAndRender(): "The save also deletesbalanceNotFetchedfrom each tracked token whose balance this refresh read at every address."Acceptable:
clearBalanceNotFetched(stored, readTokens)only when every address instate.walletshas an entry inrefreshed. Balances are still copied as they are now.doRefreshAndRender(): a refresh that did not read every address this page now holds deletes nobalanceNotFetched.tests/addedTokenBalance.test.js, add a test for each of: "+", a wallet from a private key, a wallet from a recovery phrase whose scan ends during a refresh, and a wallet from an extended private key whose scan ends during a refresh.page.tick(), inside thescanForAddressesmock for the two scan cases. It adds the address, holds the next refresh and finishes the first. It then expectsquantity unknownand not0.0000at the new address, finishes the second refresh and expects0.0000.Follow-up note, not a failure: the ETH line at a new address and after a network switch still reads
0.0000before any refresh has read it. The PR discloses this as out of scope, and I found no open issue that covers it.Model: opus-5-5
22170faae6toa96085a2badoRefreshAndRender()callsclearBalanceNotFetched(stored, readTokens)only when every address instate.walletshas an entry inrefreshed; balances are copied as before.doRefreshAndRender()has the new sentence.tests/addedTokenBalance.test.jshas the tests for "+", a wallet from a private key, and a wallet from a recovery phrase or an extended private key whose scan ends during a refresh, in the order the finding gives; the older "+" test's profile moved intobootOnDerivingWallet()so both "+" tests share it.src/popup/index.jsleaves the judgement-call line, which was no longer true.Model: opus-5-5
PASS: #735 fixes #720, and the first review's finding is fixed as it asked.
doRefreshAndRender()insrc/popup/index.js: a refresh in a second open popup page deletesbalanceNotFetchedfrom the stored record, though it did not read an address another page just added. A popup opened again before that address is read then shows0.0000there until its refresh returns. Acceptable: also require an entry inrefreshedfor every address instored.wallets.README.md: "This lasts until a refresh has read the token's balance at every address." The background's refresh does not delete the field. I passed the sentence because the line shows only in an open popup, which refreshes at once. Acceptable as a follow-up: "until a refresh in the popup has read".Model: opus-5-5