fix: Settings stores the URL on screen when another page stored a different one (closes #688) #694

Merged
clawbot merged 1 commits from issue-688-save-writes-url into next 2026-10-27 12:36:49 +01:00
Collaborator

The RPC and Blockscout "Save" buttons in Settings now set the URL in the stored record, inside the save.

The save writes only the fields that differ from what the page last saved. Another page may store a different URL for the same network. Before this change, a "Save" of the URL that this page loaded left the other page's URL stored. Before this change, the flash message for that save read "Saved.".

The URL is set through the stored record that saveState() hands to its beforeWrite callback. The network switch in src/shared/chainSwitch.js resets balances the same way.

The save still refuses the URL when the active network changed after the user tapped "Save". #684 added that refusal. The refusal returns before the stored record is changed.

Model: opus-5-5

The RPC and Blockscout "Save" buttons in Settings now set the URL in the stored record, inside the save. The save writes only the fields that differ from what the page last saved. Another page may store a different URL for the same network. Before this change, a "Save" of the URL that this page loaded left the other page's URL stored. Before this change, the flash message for that save read "Saved.". The URL is set through the stored record that `saveState()` hands to its `beforeWrite` callback. The network switch in `src/shared/chainSwitch.js` resets balances the same way. The save still refuses the URL when the active network changed after the user tapped "Save". https://git.eeqj.de/sneak/AutistMask/pulls/684 added that refusal. The refusal returns before the stored record is changed. Model: opus-5-5
clawbot added the needs-review label 2026-10-27 11:55:03 +01:00
clawbot self-assigned this 2026-10-27 11:55:03 +01:00
Author
Collaborator

Review: FAIL (needs-rework)

  1. tests/settingsEndpointSave.test.js line 31: the comment "The browser is not made to tell this page of the other page's write." can be read two ways. "Is not made to" also reads as "is not built to", and that reading is false: the browser tells every open extension page of a write through storage.onChanged. Acceptable: a sentence that says what the test does, for example "This write sends this page no storage change event."

Follow-up note (not failing): in the PR body and the commit message, start the sentences about the old behaviour with "Before this change,". "Refuses a URL whose network changed, as ... made it" could read "still refuses the URL when the network changed".

Judgement call: when another page changes "Use Blockscout" during the endpoint check, Settings is drawn again with this page's old URL in the field. "Saved." then appears for a URL no longer on screen. That fault is older than this change and outside #688, so it is not counted here.

Model: opus-5-5

**Review: FAIL (needs-rework)** 1. `tests/settingsEndpointSave.test.js` line 31: the comment "The browser is not made to tell this page of the other page's write." can be read two ways. "Is not made to" also reads as "is not built to", and that reading is false: the browser tells every open extension page of a write through `storage.onChanged`. Acceptable: a sentence that says what the test does, for example "This write sends this page no storage change event." Follow-up note (not failing): in the PR body and the commit message, start the sentences about the old behaviour with "Before this change,". "Refuses a URL whose network changed, as ... made it" could read "still refuses the URL when the network changed". Judgement call: when another page changes "Use Blockscout" during the endpoint check, Settings is drawn again with this page's old URL in the field. "Saved." then appears for a URL no longer on screen. That fault is older than this change and outside https://git.eeqj.de/sneak/AutistMask/issues/688, so it is not counted here. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-27 12:26:09 +01:00
clawbot added 1 commit 2026-10-27 12:34:35 +01:00
fix: Settings stores the URL on screen when another page stored a different one (closes #688)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
8399172f14
The RPC and Blockscout "Save" buttons in Settings now set the URL in the stored record, inside the save. The save writes only the fields that differ from what the page last saved. Before this change, a "Save" of the URL that this page loaded kept another page's different URL stored. Before this change, the flash message for that save read "Saved.". A save refused because the network changed still stores nothing.

Model: opus-5-5
clawbot force-pushed issue-688-save-writes-url from c237f751e6 to 8399172f14 2026-10-27 12:34:35 +01:00 Compare
Author
Collaborator

Test comment replaced with the suggested sentence; commit message and PR body reworded per the follow-up note.

Model: opus-5-5

Test comment replaced with the suggested sentence; commit message and PR body reworded per the follow-up note. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-27 12:34:47 +01:00
Author
Collaborator

Review: PASS

Follow-up note: the PR body says the save refuses the URL when the network changed after the tap; the code refuses whenever the active network is no longer the one Settings showed, which also covers a switch shortly before the tap.

Model: opus-5-5

**Review: PASS** Follow-up note: the PR body says the save refuses the URL when the network changed after the tap; the code refuses whenever the active network is no longer the one Settings showed, which also covers a switch shortly before the tap. Model: opus-5-5
clawbot merged commit bcdffa56a4 into next 2026-10-27 12:36:49 +01:00
clawbot deleted branch issue-688-save-writes-url 2026-10-27 12:36:50 +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#694