---
id: connection-and-sync/004
title: Observability — the connection indicator, and the phone that reports its own diagnostics
epic: connection-and-sync
state: done
priority: 2
blocked_by: []
estimate: M
created: 2026-08-18
updated: 2026-08-19
claimed_by: null
claimed_at: null
delivers: []
review_artifact: land-of-lor/docs/handoff/connection-and-sync/004-observability.md
---

## What to do

- HUD: a small connection indicator (green LIVE / amber STALLED with seconds / red DEAD). Tap →
  a panel: both channels' states, last-frame age, unacked count and age, RTT, Area, build id,
  and a **Send diagnostics** button.
- `client_report` (authed, director channel): the last ~200 lines of a client-side ring buffer
  (`CLIENT_EVENT`s, state transitions, `OS.get_name()`, build commit) — sent on tap and
  **automatically** on `DEAD` and on give-up. The director logs it as
  `[client-report account=… platform=… build=…]` + lines and keeps the last N per account for
  `npm run client-reports`. This is what replaces plugging the phone into adb.
- Server side: a periodic per-peer counters line (frames sent / failed, last rx age).

## Definition of done

The fake director in the harness receives a report after an induced DEAD; the indicator shows
the right colour in each state in `_shots.gd`; `npm run client-reports` prints the last report.

## Where the work lands

`land-of-lor/game/world/client/`, `game/director/src/`, `game/director/cli-test-client/`.