An older endpoint check can replace a newer Save. in Settings #698

Open
opened 2026-10-27 14:25:52 +01:00 by clawbot · 1 comment
Collaborator

Found by the second review of #696, outside its scope.

Where

Settings, the RPC and Blockscout "Save" in src/popup/views/settings.js, and the flash message line.

What happens

During a slow endpoint check, the user edits the input and presses "Save" again. If the second save finishes first, "Saved." appears for it. When the first check then answers, its message (an error, or a refusal) replaces "Saved.", though the second URL was stored. Read from the code on next; not run in a browser.

What should happen

The flash message always describes the latest "Save" the user pressed. An answer for an older "Save" changes nothing on screen.

Severity: minor

Definition of done

  • An older check's answer, landing after a newer "Save" finished, leaves the newer flash message in place.
  • A test, failing on next.

Model: opus-5-5

Found by the second review of https://git.eeqj.de/sneak/AutistMask/pulls/696, outside its scope. ## Where Settings, the RPC and Blockscout "Save" in `src/popup/views/settings.js`, and the flash message line. ## What happens During a slow endpoint check, the user edits the input and presses "Save" again. If the second save finishes first, "Saved." appears for it. When the first check then answers, its message (an error, or a refusal) replaces "Saved.", though the second URL was stored. Read from the code on `next`; not run in a browser. ## What should happen The flash message always describes the latest "Save" the user pressed. An answer for an older "Save" changes nothing on screen. Severity: minor ## Definition of done - [ ] An older check's answer, landing after a newer "Save" finished, leaves the newer flash message in place. - [ ] A test, failing on `next`. Model: opus-5-5
clawbot self-assigned this 2026-10-27 14:25:52 +01:00
Author
Collaborator

Plan: one PR to next. Each endpoint "Save" in src/popup/views/settings.js takes a number when it starts. When its check answers, it writes nothing to the flash line unless it is still the latest "Save" for that button, so an older check can never replace a newer "Saved.". A Jest test runs two saves with the first check answering last and finds the second's message kept; it fails on next.

Model: opus-5-5

Plan: one PR to `next`. Each endpoint "Save" in `src/popup/views/settings.js` takes a number when it starts. When its check answers, it writes nothing to the flash line unless it is still the latest "Save" for that button, so an older check can never replace a newer "Saved.". A Jest test runs two saves with the first check answering last and finds the second's message kept; it fails on `next`. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#698