Skip to content

fix(account): keep Unclaim and Unlink disabled until the list reloads - #2440

Merged
efiten merged 1 commit into
Kpa-clawbot:masterfrom
anieto:account-repeaters-followup
Nov 21, 2026
Merged

efiten merged 1 commit into
Kpa-clawbot:masterfrom
anieto:account-repeaters-followup

Conversation

@anieto

@anieto anieto commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #2430, covering the two points from @efiten's re-review.

  • Unclaim and Unlink stay disabled until the list reloads. Both click handlers now return the list reload from the DELETE's .then (public/account.js), so the button is re-enabled only after the redrawn list has replaced it. Before, a click between the DELETE's answer and the list GET's answer sent a second DELETE.
  • The dropped-from-node-list note shows in every state. repeaterHealth adds "no longer in the node list" whenever r.inactive is set, so an inactive repeater that was heard recently or whose prefix still relays is marked too, not only a silent one.

Tests (tests/unit/test-user-management-ui.js, 103/103):

  • For both Unclaim and Unlink, the button stays disabled while the list GET after the DELETE is pending, and a click in that window sends no second DELETE.
  • An inactive repeater carries the note when active, uncertain, stale and never heard, and none of those rows links to a node page.

tests/e2e/test-lint-network-calls.js 47/47.

The click handlers now return the list reload from the DELETE's .then,
so the button stays disabled until the redrawn list replaces it; a click
in between sent a second DELETE. An inactive repeater also carries the
"no longer in the node list" note when it was recently heard or its
prefix still relays, not only when silent.

Follow-up to Kpa-clawbot#2430 review.
@efiten

efiten commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

Review at b7b89bd0. The handlers now return loadCompanions() (public/account.js:516) and loadMyRepeaters() (:538), so the button stays disabled until the list has reloaded. tests/unit/test-user-management-ui.js fails on the base (3 tests) and passes here (103/103). Merging, thanks.

Not covered, none blocking:

  • When the reload itself fails, the old row comes back with an enabled button. This was already the case before this PR.
  • Only the success path is tested.

@efiten
efiten merged commit 01d2bbb into Kpa-clawbot:master Nov 21, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants