Follow-up to #2415, see #2414.
## Situation
A user can claim repeaters, but no page lists the ones they claimed.
Claims show on each node page ("Maintained by"), in the admin user
detail and in the "Download my data" export. A maintainer of several
repeaters has to remember them and open each node page to see whether
one went quiet.
## Change
**`GET /api/account/repeaters`** (browser session; device tokens answer
403) returns the caller's claims. For each one:
- `pubkey` and `name`.
- `known`: false once the node left the analyzer database. The claim
stays.
- `role` and `claimedAt`.
- `lastHeard`: the newer of the last advert and the last transmission
certainly from the node, the same sources as the node page's Last Heard.
- `lastRelayed`: when its hop prefix last relayed. Only used to mark a
silent repeater as uncertain, since the prefix can be shared.
- `status`: the saved repeater status, or null.
- `comaintainers`: the other active claimers' display names.
The list is sorted by name, with unnamed repeaters after, by pubkey.
It's built on the existing `RepeaterClaimsByUser`, `NotifyNodes` and
`LastHeardMap`.
**My account, My repeaters**, a new section after Companions:
- Silent repeaters come first. Health uses `getNodeStatus`, so the
threshold matches the node pages and map (`infraSilentMs`):
- green "heard 2h ago";
- yellow "last heard …, its prefix still relays";
- red "silent, last heard 184d ago" or "never heard";
- grey "no longer in the database".
- Each row links to the node page and shows the saved status ("no
details yet" without one), the claim date and "also maintained by …".
- *Unclaim* asks for confirmation, then uses the existing `DELETE
/api/repeaters/{pubkey}/claim`.
- The empty state says how to claim.
- `#/account?section=repeaters` deep-links to the section, like
`section=notifications`.
Editing stays on the node page, so there's only one editor. The admin
user detail and the export are unchanged.
Docs: `openapi.go` and the Repeater info section of
`docs/user-guide/accounts.md`.
## Notes
- A mobile client will want the same list. #2429 proposes device-token
scopes for repeater claims. If it lands, letting a `repeater:claim`
token read this route is a one-line addition to the bearer route table,
and I'd rather do that there than here.
- The two PRs touch nearby lines in `openapi.go`, `repeater_handlers.go`
(route registration) and `public/account.js`. Whichever merges second
needs a small rebase.
## Tests
- `cmd/server/my_repeaters_test.go`:
- empty list;
- ordering (named first, case-insensitive);
- unheard, heard and departed nodes;
- saved status;
- co-maintainers, excluding the caller and disabled users;
- another user's view;
- unclaim removes the row;
- anonymous gets 401 and a device token 403;
- no analyzer DB.
- `tests/unit/test-user-management-ui.js`: health sort and chips,
escaping, the short-pubkey fallback, status and co-maintainer lines,
Unclaim on every row, and the empty state.
- `tests/e2e/test-user-management-e2e.js`:
- the claimed repeater appears with its status and node link;
- axe on the section;
- Unclaim: dismissing the confirm keeps the claim, accepting empties the
list.
Run locally:
- `make test`: all 16 modules OK.
- `sh test-all.sh` and `node tests/e2e/test-lint-network-calls.js`:
pass, run in `node:24-bookworm`.
- `npx eslint public/*.js`: 0 errors, the same 87 warnings as master.
- `test-user-management-e2e.js` against local e2etest servers with the
CI config: 46/46.
- Manually in Chrome, light and dark: heard, silent and co-maintained
rows, and the deep link.
Not run: the full Playwright shard matrix from CI.
---------
Co-authored-by: Adam <196335+anieto@users.noreply.github.com>