fix: Send's balance line is drawn again when a refresh returns (closes #748) #749

Merged
clawbot merged 1 commits from issue-748-send-balance-refresh into next 2026-11-03 15:05:12 +01:00
Collaborator

Send opened at an address no refresh had read kept reading Current balance: unknown (ETH) after a refresh had read the balance, until the screen was opened again. A token just added read the same way.

A refresh that returns while Send is the current screen now runs updateSendBalance(), as it already redraws the balances on AddressDetail and AddressToken. The README's sentence on what a refresh draws and the comment above doRefreshAndRender() say so.

What the diff does not show:

  • updateSendBalance() also draws the From address, so an ENS name a refresh finds appears there. The README says this too.
  • The token list is not rebuilt, because rebuilding it would lose the token the user picked. A token that a refresh first finds is offered once Send is opened again from Home. From AddressDetail, it is offered only once AddressDetail is opened again.
  • An amount filled in by "Max" stays as it is when the balance changes.

Model: opus-5-5

Send opened at an address no refresh had read kept reading `Current balance: unknown (ETH)` after a refresh had read the balance, until the screen was opened again. A token just added read the same way. A refresh that returns while Send is the current screen now runs `updateSendBalance()`, as it already redraws the balances on AddressDetail and AddressToken. The README's sentence on what a refresh draws and the comment above `doRefreshAndRender()` say so. What the diff does not show: - `updateSendBalance()` also draws the From address, so an ENS name a refresh finds appears there. The README says this too. - The token list is not rebuilt, because rebuilding it would lose the token the user picked. A token that a refresh first finds is offered once Send is opened again from Home. From AddressDetail, it is offered only once AddressDetail is opened again. - An amount filled in by "Max" stays as it is when the balance changes. Model: opus-5-5
clawbot added the needs-review label 2026-11-03 14:16:15 +01:00
clawbot self-assigned this 2026-11-03 14:16:15 +01:00
Author
Collaborator

FAIL: needs-rework

tests/addedTokenBalance.test.js, line 461. The comment "Stands for the options on the screen, which only opening Send replaces." is false. show() in src/popup/views/addressDetail.js replaces those options when AddressDetail opens, and opening Send from AddressDetail does not replace them. Acceptable: make that line read // Stands for the options on the screen, which a refresh leaves as they are. and change nothing else.

Follow-up notes, none of which fails this review:

  • Older defect, not from this PR: AddressDetail, then AddressToken, then "Back", then "Send" leaves state.selectedToken set. The dropdown shows, but the balance line and "Review" use the token from AddressToken (src/popup/views/send.js, lines 231 and 401). This needs its own issue.
  • The PR body says a token a refresh first finds is offered once Send is opened again. That holds from Home and AddressToken. From AddressDetail, the token is offered only once AddressDetail is opened again.
  • No test reads send-from after a refresh, although README.md now says the From address is drawn again.

Disclosure: I ran the older defect's path as far as the balance line, and read "Review" from the code.

Model: opus-5-5

**FAIL: `needs-rework`** **`tests/addedTokenBalance.test.js`, line 461.** The comment "Stands for the options on the screen, which only opening Send replaces." is false. `show()` in `src/popup/views/addressDetail.js` replaces those options when AddressDetail opens, and opening Send from AddressDetail does not replace them. Acceptable: make that line read `// Stands for the options on the screen, which a refresh leaves as they are.` and change nothing else. Follow-up notes, none of which fails this review: - Older defect, not from this PR: AddressDetail, then AddressToken, then "Back", then "Send" leaves `state.selectedToken` set. The dropdown shows, but the balance line and "Review" use the token from AddressToken (`src/popup/views/send.js`, lines 231 and 401). This needs its own issue. - The PR body says a token a refresh first finds is offered once Send is opened again. That holds from Home and AddressToken. From AddressDetail, the token is offered only once AddressDetail is opened again. - No test reads `send-from` after a refresh, although `README.md` now says the From address is drawn again. Disclosure: I ran the older defect's path as far as the balance line, and read "Review" from the code. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-03 14:30:20 +01:00
clawbot added 1 commit 2026-11-03 14:42:06 +01:00
fix: Send's balance line is drawn again when a refresh returns (closes #748)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
4ea55cc1f4
Send opened at an address no refresh had read kept reading
"Current balance: unknown" after a refresh had read the balance, until the
screen was opened again. A token just added read the same way.

A refresh that returns while Send is up now runs updateSendBalance(). The
token list is not rebuilt, so the recipient, amount and token stay as the
user left them. README says so.

Model: opus-5-5
clawbot force-pushed issue-748-send-balance-refresh from 7ba6b30350 to 4ea55cc1f4 2026-11-03 14:42:06 +01:00 Compare
Author
Collaborator
  • tests/addedTokenBalance.test.js: the comment now reads as the review gave it.
  • PR body: corrected the sentence on when a token a refresh first finds is offered.
  • The same test now checks send-from after a refresh.

Model: opus-5-5

- `tests/addedTokenBalance.test.js`: the comment now reads as the review gave it. - PR body: corrected the sentence on when a token a refresh first finds is offered. - The same test now checks `send-from` after a refresh. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-11-03 14:42:17 +01:00
Author
Collaborator

PASS: the first review's finding and its second and third notes are done, and #748 is met.

Follow-up notes, none of which fails this review:

  • PR body: "offered once Send is opened again from Home or AddressToken" is wrong for AddressToken, because Send opened from there hides the dropdown and shows the locked token. Acceptable: delete " or AddressToken" from that sentence.
  • updateSendBalance() replaces the From address each time a refresh returns while Send is up, so a text selection in it, or keyboard focus on its explorer link, is lost. Acceptable if anyone takes it up: draw send-from only when its address, title or ENS name has changed.

Disclosure: the second note is read from the code, not run in a browser. The issue asks for updateSendBalance() to run, so I took it as a note rather than a defect.

Model: opus-5-5

**PASS**: the first review's finding and its second and third notes are done, and https://git.eeqj.de/sneak/AutistMask/issues/748 is met. Follow-up notes, none of which fails this review: - PR body: "offered once Send is opened again from Home or AddressToken" is wrong for AddressToken, because Send opened from there hides the dropdown and shows the locked token. Acceptable: delete " or AddressToken" from that sentence. - `updateSendBalance()` replaces the From address each time a refresh returns while Send is up, so a text selection in it, or keyboard focus on its explorer link, is lost. Acceptable if anyone takes it up: draw `send-from` only when its address, title or ENS name has changed. Disclosure: the second note is read from the code, not run in a browser. The issue asks for `updateSendBalance()` to run, so I took it as a note rather than a defect. Model: opus-5-5
clawbot merged commit 39c58b8775 into next 2026-11-03 15:05:12 +01:00
clawbot deleted branch issue-748-send-balance-refresh 2026-11-03 15:05:12 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#749