screentinker/server
ScreenTinker 8f2195a6e3 Recover an unpaired player without needing a keyboard
A display panel usually has no keyboard and no pointer, so a recovery path that
waits for input is not a recovery path. When the server stopped recognising a
device, the player revealed the server-URL form — typing that cannot happen on a
screen-only panel — and hid the pairing section, which was the one thing that
would have rescued it. The screen then sat on "Device was removed from server"
until someone physically reloaded it, even though the player was still connected
to the right server and could have asked for a new code itself.

Both handlers now drop the stale credentials and reconnect on a short countdown.
Reconnecting re-registers with no device_id, so the server issues a fresh pairing
code and the existing registered handler puts it on screen. config.serverUrl is
known-good by construction — we are talking to that server at the moment we are
rejected — so there is nothing for a human to re-enter.

The URL field stays editable throughout, and typing cancels the countdown, so
someone who does have a remote and wants to repoint the player is not yanked
mid-edit. The countdown is the same helper the first-boot path already used,
lifted out and shared rather than duplicated; its input listener is bound once
at setup instead of per countdown, which would have stacked a listener each time.

The Android player already behaved this way (ProvisioningActivity repair mode);
this brings the web player in line.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uaeo9MvzKoyXuN6ZsbhtkL
2026-07-28 13:17:22 -05:00
..
config fix(logging): gate CF-Connecting-IP on a Cloudflare peer, not any trusted proxy 2026-07-26 10:23:04 -05:00
db Alert once per outage instead of once per dedup window 2026-07-28 12:50:14 -05:00
lib Store a schedule in the timezone its screen runs in 2026-07-28 09:43:46 -05:00
middleware Merge branch 'fix/recovery-grants' into release/auth-campaign 2026-07-26 16:22:59 -05:00
player Recover an unpaired player without needing a keyboard 2026-07-28 13:17:22 -05:00
routes Show every screen's schedule on one calendar 2026-07-28 12:16:19 -05:00
scripts fix(content+android): rotation-aware media — portrait upright on dashboard AND player (#170) (#172) 2026-07-12 22:05:11 -05:00
services Alert once per outage instead of once per dedup window 2026-07-28 12:50:14 -05:00
test Recover an unpaired player without needing a keyboard 2026-07-28 13:17:22 -05:00
ws Store a schedule in the timezone its screen runs in 2026-07-28 09:43:46 -05:00
.gitignore feat(email): Microsoft Graph send + alert spam protection + preferences UI 2026-05-12 18:16:40 -05:00
config.js feat(email): SMTP transport as an alternative to Microsoft Graph [#173] (#179) 2026-07-13 15:56:22 -05:00
package-lock.json chore(release): v1.9.20-beta1 2026-07-28 12:53:08 -05:00
package.json chore(release): v1.9.20-beta1 2026-07-28 12:53:08 -05:00
server.js Merge branch 'feat/self-service-password-reset' 2026-07-27 11:21:36 -05:00
version.js chore(version): single-source VERSION, env-configurable data paths, bump tooling 2026-06-10 12:56:03 -05:00