Remove room code and token pairing #32

Merged
nezumi merged 2 commits from claude/remove-redundant-room-code-5b990d into dev 2026-11-22 08:46:10 +00:00
Owner

There is only ever one TV per network, so the 6-digit room code and the token behind it added a pairing step without real value. Any phone on the same Wi-Fi now opens http://<ip>:<port>/ (or scans the QR) and controls the TV right away. Optional Host mode (ADR 0006) remains the way to limit what phones can do.

Changes

  • TV: removed the room code row in Settings, the code and "Đổi mã" button in the QR dialog, and the code line on the splash. The QR now encodes just the address.
  • Server: removed /api/pair, its rate limit, and every token check (/api/*, /ws). Host key relay is kept (watchHostKeys).
  • Remote: removed the room code screen; the name screen is now first. On load, a leftover kara.token and a stale ?t= from old QR links are cleaned up.
  • Compat: old saved state with roomCode/token still decodes (ignoreUnknownKeys, covered by a test).
  • Docs: protocol, CONTEXT, ADR 0004/0006 (update notes), READMEs, dev-preview and the mock server.

Testing

  • ./gradlew :app:compileDebugKotlin :app:testDebugUnitTest: pass (new test: API and WebSocket work without a token).
  • remote: typecheck + build pass.
  • Not tried on a TV or emulator yet.

Follow-up

  • docs/images/pair.png still shows the old dialog with the room code; it needs a fresh screenshot.

Vi: Bỏ mã phòng, điện thoại cùng Wi-Fi mở địa chỉ TV là điều khiển được ngay

There is only ever one TV per network, so the 6-digit room code and the token behind it added a pairing step without real value. Any phone on the same Wi-Fi now opens `http://<ip>:<port>/` (or scans the QR) and controls the TV right away. Optional Host mode (ADR 0006) remains the way to limit what phones can do. ## Changes - **TV:** removed the room code row in Settings, the code and "Đổi mã" button in the QR dialog, and the code line on the splash. The QR now encodes just the address. - **Server:** removed `/api/pair`, its rate limit, and every token check (`/api/*`, `/ws`). Host key relay is kept (`watchHostKeys`). - **Remote:** removed the room code screen; the name screen is now first. On load, a leftover `kara.token` and a stale `?t=` from old QR links are cleaned up. - **Compat:** old saved state with `roomCode`/`token` still decodes (`ignoreUnknownKeys`, covered by a test). - **Docs:** protocol, CONTEXT, ADR 0004/0006 (update notes), READMEs, dev-preview and the mock server. ## Testing - `./gradlew :app:compileDebugKotlin :app:testDebugUnitTest`: pass (new test: API and WebSocket work without a token). - `remote`: typecheck + build pass. - Not tried on a TV or emulator yet. ## Follow-up - `docs/images/pair.png` still shows the old dialog with the room code; it needs a fresh screenshot. Vi: Bỏ mã phòng, điện thoại cùng Wi-Fi mở địa chỉ TV là điều khiển được ngay
Remove room code and token pairing
Some checks failed
CI / build (pull_request) Has been cancelled
b52f652b9e
There is only ever one TV per network, so the 6-digit room code and the
token behind it added a step without real value. Any phone on the same
Wi-Fi now opens http://<ip>:<port>/ (or scans the QR) and controls the
TV right away; optional Host mode remains the way to limit control.

- TV: room code row in Settings, code and "Đổi mã" in the QR dialog and
  the splash code line removed; the QR is now just the address.
- Server: /api/pair, its rate limit and all token checks removed.
- Remote: room code screen removed; leftover saved token and ?t= in old
  QR links are cleaned up on load.
- Docs: protocol, CONTEXT, ADR 0004/0006, READMEs, dev mock updated.

Vi: Bỏ mã phòng, điện thoại cùng Wi-Fi mở địa chỉ TV là điều khiển được ngay
Drop room code from the UI prototype
All checks were successful
CI / build (pull_request) Successful in 2m4s
50b12a7f05
Phone header, Settings, QR dialog, Player C mini QR and splash no longer show a room code; the QR dialog shows the TV's LAN address instead.
nezumi deleted branch claude/remove-redundant-room-code-5b990d 2026-11-22 08:46:10 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nezumi/kara-tv-app!32
No description provided.