fix: refusing a From address the wallet does not hold moves nothing (closes #609) #617

Merged
clawbot merged 1 commits from issue-609-from-address-refusal into next 2026-10-19 20:50:03 +02:00
Collaborator

Fixes #609.

When the selected wallet does not hold the From address on the confirmation screen, Sign & Send wrote its refusal onto the password error line. That line reserves one line of text, but the sentence runs to about three, so the password field and Sign & Send moved down. README's No Layout Shift rules that out.

The refusal now has its own box above the password field, the same way #583 handled the network and fee refusals. The sentence is fixed in index.html, the box holds its space from the first paint, and the refusal only makes it visible. Drawing the screen hides it again, and so does each press. README's ConfirmTx section and its browser-test section now say this.

The Chrome browser test shows a send from the HD wallet, selects the key wallet and reopens the popup onto the confirmation screen. It then presses Sign & Send and checks three things: nothing was broadcast, the password field and Sign & Send did not move, and the sentence is in its own box. It waits for the sentence wherever it appears on the screen. If the refusal went back to the password error line, the test would fail because Sign & Send moved, not because the wait timed out.

  • Judgement call: the test selects the key wallet by writing that selection straight into extension storage, as another popup selecting it would save it. It does not drive a second popup.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/AutistMask/issues/609. When the selected wallet does not hold the From address on the confirmation screen, Sign & Send wrote its refusal onto the password error line. That line reserves one line of text, but the sentence runs to about three, so the password field and Sign & Send moved down. README's No Layout Shift rules that out. The refusal now has its own box above the password field, the same way https://git.eeqj.de/sneak/AutistMask/issues/583 handled the network and fee refusals. The sentence is fixed in `index.html`, the box holds its space from the first paint, and the refusal only makes it visible. Drawing the screen hides it again, and so does each press. README's ConfirmTx section and its browser-test section now say this. The Chrome browser test shows a send from the HD wallet, selects the key wallet and reopens the popup onto the confirmation screen. It then presses Sign & Send and checks three things: nothing was broadcast, the password field and Sign & Send did not move, and the sentence is in its own box. It waits for the sentence wherever it appears on the screen. If the refusal went back to the password error line, the test would fail because Sign & Send moved, not because the wait timed out. - Judgement call: the test selects the key wallet by writing that selection straight into extension storage, as another popup selecting it would save it. It does not drive a second popup. Model: opus-5-5
clawbot added the needs-review label 2026-10-19 18:42:34 +02:00
clawbot self-assigned this 2026-10-19 18:42:35 +02:00
Author
Collaborator

Review: FAIL (needs-rework)

  1. tests/e2e/run.js, confirmState() and the new browser test: against next's src/popup/views/confirmTx.js and src/popup/index.html, the test never reaches Sign & Send. confirmState() now reads #confirm-from-address-error, which next's index.html does not have, so the test stops on a script error while recording where Sign & Send sits, and so does every other confirmation screen test. The test for this issue should fail on next because Sign & Send moved. Acceptable: record the positions before the press without reading the new box, check that nothing was broadcast and nothing moved, and only then check that the sentence is in #confirm-from-address-error, for example on the element the wait found.

  2. src/popup/views/confirmTx.js, show(): no test checks the new line that hides the box when the screen is drawn again. Without it, a user who was refused, went back and reviewed a send again would read "nothing was sent" on the new screen. Acceptable: in the case in tests/addressKey.test.js, draw the screen again after the refusal and check the box is hidden before any press.

  3. README.md, End-to-End Tests: "It covers the same way a send refused because the selected wallet does not hold its From address" reads as if "the same way a send refused" were one phrase. Acceptable: a plain sentence such as "It checks the same for a send refused because the selected wallet does not hold its From address".

Model: opus-5-5

**Review: FAIL (`needs-rework`)** 1. `tests/e2e/run.js`, `confirmState()` and the new browser test: against `next`'s `src/popup/views/confirmTx.js` and `src/popup/index.html`, the test never reaches Sign & Send. `confirmState()` now reads `#confirm-from-address-error`, which `next`'s `index.html` does not have, so the test stops on a script error while recording where Sign & Send sits, and so does every other confirmation screen test. The test for this issue should fail on `next` because Sign & Send moved. Acceptable: record the positions before the press without reading the new box, check that nothing was broadcast and nothing moved, and only then check that the sentence is in `#confirm-from-address-error`, for example on the element the wait found. 2. `src/popup/views/confirmTx.js`, `show()`: no test checks the new line that hides the box when the screen is drawn again. Without it, a user who was refused, went back and reviewed a send again would read "nothing was sent" on the new screen. Acceptable: in the case in `tests/addressKey.test.js`, draw the screen again after the refusal and check the box is hidden before any press. 3. `README.md`, End-to-End Tests: "It covers the same way a send refused because the selected wallet does not hold its From address" reads as if "the same way a send refused" were one phrase. Acceptable: a plain sentence such as "It checks the same for a send refused because the selected wallet does not hold its From address". Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-19 19:38:49 +02:00
clawbot added 1 commit 2026-10-19 19:48:24 +02:00
fix: refusing a From address the wallet does not hold moves nothing (closes #609)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
318835f397
Sign & Send wrote its refusal of a From address the selected wallet does not
hold onto the password error line, which reserves one line. The sentence runs
to about three, so it pushed Sign & Send down.

The refusal now has its own box above the password field, its sentence fixed
in index.html, holding its space from the first paint and only made visible,
as #583 did for the other
refusals. Drawing the screen and each press hide it again. A Chrome test
writes the other wallet into the stored selection, reopens the popup onto the
screen, presses Sign & Send and checks that nothing was broadcast and nothing
moved.

Model: opus-5-5
clawbot force-pushed issue-609-from-address-refusal from 6e31d3768d to 318835f397 2026-10-19 19:48:24 +02:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-10-19 20:11:04 +02:00
Author
Collaborator

Rework:

  1. confirmState() no longer reads the new box. The browser test checks that nothing was broadcast and nothing moved first. Only then does it check that the element the wait found is #confirm-from-address-error and holds the sentence. Against next's confirmTx.js and index.html, this test now fails because Sign & Send moved, and the other confirmation screen tests still pass.
  2. The case in tests/addressKey.test.js now draws the screen again after the refusal and checks that the box is hidden before any press. With the hiding line in show() removed, it fails.
  3. The README sentence now reads "It checks the same for a send refused because the selected wallet does not hold its From address".

Model: opus-5-5

Rework: 1. `confirmState()` no longer reads the new box. The browser test checks that nothing was broadcast and nothing moved first. Only then does it check that the element the wait found is `#confirm-from-address-error` and holds the sentence. Against `next`'s `confirmTx.js` and `index.html`, this test now fails because Sign & Send moved, and the other confirmation screen tests still pass. 2. The case in `tests/addressKey.test.js` now draws the screen again after the refusal and checks that the box is hidden before any press. With the hiding line in `show()` removed, it fails. 3. The README sentence now reads "It checks the same for a send refused because the selected wallet does not hold its From address". Model: opus-5-5
Author
Collaborator

Review: PASS

Model: opus-5-5

**Review: PASS** Model: opus-5-5
clawbot merged commit 2c882c75d6 into next 2026-10-19 20:50:03 +02:00
clawbot deleted branch issue-609-from-address-refusal 2026-10-19 20:50:04 +02: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#617