feat: session sharing over the relay (M12) — Share tab
release / release (push) Successful in 14s

Add a Share tab that hosts or joins a read-only live session through the
rigdoctor-relay over WebSocket (QtWebSockets), gated by the Gitea access token.

- gui/share_page.py: Start shared session (host: get a code, stream snapshot +
  health + inventory) and Enter share code (guest: view a host's data read-only)
- core/share.py: host_full_frame / host_snapshot_frame + guest_html renderer
- config: relay_url (default wss://rigdoctor.jesseyvanofferen.com)
- setup: token now powers updates AND sharing — hint asks for read:user +
  read:repository scopes (relay validates the account via Gitea)
- main_window: Share nav tab + socket cleanup on close
- tests for the relay frame builders and guest HTML

Verified end-to-end against the deployed relay (host code -> guest frame).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-21 20:03:17 +02:00
parent e33cc0ef3a
commit 67d4c1cb99
13 changed files with 551 additions and 9 deletions
+2 -2
View File
@@ -58,8 +58,8 @@ Ubuntu + NVIDIA first; `.deb` distribution (see `DECISIONS.md`).
Escalating ladder, built in order:
- [ ] Tier 1: `share export` — diagnostic bundle (inventory + recent log + report); B opens
it in RigDoctor. One-way, safest.
- [ ] Tier 2: live read-only view (local server + user-chosen tunnel: Tailscale/cloudflared/
SSH; no hosted relay), token-gated, A approves, revocable.
- [x] Tier 2: live read-only view `rigdoctor share serve` (stdlib HTTP, token-gated:
sensors + health + inventory). Remote = user-chosen tunnel; GUI controls still to add.
- [ ] Tier 3: gated interactive terminal (wrap tmate/sshx; read-only default, read-write on
explicit consent), with session audit log.