The Devices page's Pending Device Registrations section (Approve/Reject cards broadcast to every account) is replaced by an always-visible Pair a Device field: type the 6-digit code shown on the registering e-reader, a templ-rendered confirm card shows what will be bound, and confirming claims the device to the signed-in account. Rendering ownership (AGENTS.md): the confirm card and every lookup outcome are templ partials (PairingLookupResult) swapped by htmx from a new SSR route POST /devices/pairing/lookup — the server decides what UI looks like, no JSON-built HTML. Errors render as content because htmx only swaps 2xx bodies (the route is web-only; the JSON API keeps real status codes), and one delegated htmx:responseError listener in device-management.ts toasts the non-swap failure path. The claim confirm button posts straight to /api/devices/claim; success comes back as HX-Refresh (same pattern as token regeneration), so the page reloads into the paired state. No new TS module is needed — plain htmx attributes drive the whole flow. Ride-alongs: the Add New Device modal loses the device-type select and the kobo manual form (its post-register UX depended on the broadcast list and silently produced an unclaimable registration; native Kobo sync is still server-side-only and will get its own pairing UX when it lands) — the modal is now a single Connect-a-KOReader-Device guide with the pairing steps. PendingRegistrationData, convertPending, and the pending plumbing in the page handler are gone with the section. ui-controls.md glossary and tests/ui COVERAGE.md updated in the same commit as the control rename, per the drift gates.
tests/ui — Playwright sweep (plan §7.5)
Real-browser sweep of the SSR/HTMX frontend. Dev server must be up on localhost:8765. Run inside the official image (no host browsers needed):
cd tests/ui
docker run --rm --network host \
-v "$PWD":/work -w /work \
mcr.microsoft.com/playwright:v1.49.0 \
bash -c "npm install --no-audit --no-fund && npx playwright test"
Personas (see rls_sweep.spec.ts): testuser (admin) and rls-phone
(restricted — Audiobooks hidden from them).
Coverage: COVERAGE.md enumerates every swept page/control per the
plan; new pages/controls get a line when added.