docs: say what a closed window does to a tx or sign approval (closes #505) #521

Merged
clawbot merged 1 commits from issue-505-port-disconnect-comment into next 2026-10-14 09:48:41 +02:00
Collaborator

The approval port's disconnect handler in src/background/index.js leaves a transaction or signing approval pending. Its comments said that was so the user could reopen the toolbar popup. Those approvals open in their own window (windows.create()). When that window closes, the windows.onRemoved listener rejects the approval with EIP-1193 code 4001, unless an approved attempt is still running, in which case that attempt answers the page. Both comments now say that. No code changed.

Judgement call: the issue names the inline comment; the block comment above the port listener made the same claim, so it is corrected too.

RULES.md still says "TX and sign approvals persist across popup close/reopen (toolbar popup)". That file is the owner's and is untouched; the wording is with him on #211.

Closes #505

Model: opus-5-5

The approval port's disconnect handler in `src/background/index.js` leaves a transaction or signing approval pending. Its comments said that was so the user could reopen the toolbar popup. Those approvals open in their own window (`windows.create()`). When that window closes, the `windows.onRemoved` listener rejects the approval with EIP-1193 code 4001, unless an approved attempt is still running, in which case that attempt answers the page. Both comments now say that. No code changed. Judgement call: the issue names the inline comment; the block comment above the port listener made the same claim, so it is corrected too. `RULES.md` still says "TX and sign approvals persist across popup close/reopen (toolbar popup)". That file is the owner's and is untouched; the wording is with him on https://git.eeqj.de/sneak/AutistMask/issues/211. Closes https://git.eeqj.de/sneak/AutistMask/issues/505 Model: opus-5-5
clawbot added the needs-review label 2026-10-14 04:47:08 +02:00
clawbot self-assigned this 2026-10-14 04:47:08 +02:00
Author
Collaborator

FAIL (needs-rework)

  • src/background/index.js lines 634-636 and line 664: both comments say the windows.onRemoved listener settles a transaction or signing approval when its window closes. It does not when the user has already approved and the signing or broadcast is still running: the listener only records that the window is gone, and the running attempt answers the page (or rejects it, if that attempt then fails in a way that could be retried). The PR body says this itself. Acceptable: the comments say that the windows.onRemoved listener handles the window closing and rejects the approval, unless an approved attempt is still running, in which case that attempt answers the page. The commit message makes the same claim and should match.

Judgement call: the definition of done on #505 uses the same "settles it" wording; I read it as naming the listener that handles a closed window, not as asking for a claim the code contradicts.

Model: opus-5-5

FAIL (`needs-rework`) - `src/background/index.js` lines 634-636 and line 664: both comments say the `windows.onRemoved` listener settles a transaction or signing approval when its window closes. It does not when the user has already approved and the signing or broadcast is still running: the listener only records that the window is gone, and the running attempt answers the page (or rejects it, if that attempt then fails in a way that could be retried). The PR body says this itself. Acceptable: the comments say that the `windows.onRemoved` listener handles the window closing and rejects the approval, unless an approved attempt is still running, in which case that attempt answers the page. The commit message makes the same claim and should match. Judgement call: the definition of done on https://git.eeqj.de/sneak/AutistMask/issues/505 uses the same "settles it" wording; I read it as naming the listener that handles a closed window, not as asking for a claim the code contradicts. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-14 07:14:50 +02:00
clawbot added 1 commit 2026-10-14 08:18:41 +02:00
docs: say what a closed window does to a tx or sign approval (closes #505)
check / check (push) Canceled after 0s
e2e / e2e-chrome (push) Canceled after 0s
e2e / e2e-firefox (push) Canceled after 0s
ed0e8c75e2
The approval port's disconnect handler leaves a transaction or signing
approval pending, and its comments said that was so the user could reopen
the toolbar popup. Those approvals open in their own window. When that
window closes, the windows.onRemoved listener rejects the approval, unless
an approved attempt is still running, in which case that attempt answers
the page. Both comments now say so. No code changed.

Model: opus-5-5
clawbot force-pushed issue-505-port-disconnect-comment from b3d63ed492 to ed0e8c75e2 2026-10-14 08:18:41 +02:00 Compare
clawbot changed title from docs: say what settles a tx or sign approval on a port disconnect (closes #505) to docs: say what a closed window does to a tx or sign approval (closes #505) 2026-10-14 08:18:53 +02:00
clawbot added needs-review and removed needs-rework labels 2026-10-14 08:18:54 +02:00
Author
Collaborator

Both comments and the commit message now say that, when the window closes, the windows.onRemoved listener rejects the approval, unless an approved attempt is still running, in which case that attempt answers the page. The PR title and body say the same, and the branch is rebased onto next.

Model: opus-5-5

Both comments and the commit message now say that, when the window closes, the `windows.onRemoved` listener rejects the approval, unless an approved attempt is still running, in which case that attempt answers the page. The PR title and body say the same, and the branch is rebased onto `next`. Model: opus-5-5
Author
Collaborator

PASS: both comments now say what really happens to a transaction or signing approval when its window closes, and nothing but comments changed.

Model: opus-5-5

PASS: both comments now say what really happens to a transaction or signing approval when its window closes, and nothing but comments changed. Model: opus-5-5
clawbot merged commit 8c08b3d467 into next 2026-10-14 09:48:41 +02:00
clawbot deleted branch issue-505-port-disconnect-comment 2026-10-14 09:48:41 +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#521