Skip to content

Server Health #1037

Closed
Closed

Description

@ivanfenenko

See how stable the active server connection is: current ping and recent trend on the Servers page, and a Server Health screen with uptime, reconnects, error rate and latency over time.

Behavior

Measured on the phone, only while the app is in the foreground, for the active Connection Profile. Kept on the device for 7 days per profile. Removed with the profile and by Clear All Data.

What gets recorded

  • Ping: a timed health request every 30 s (GET /global/health on v1, GET /api/health on v2).
  • Connection state changes of the live event stream (live, reconnecting, offline, auth failed), plus when measuring stops (app backgrounded).
  • Stream failures by category: network, timeout, heartbeat stall (45 s watchdog), server 5xx, auth (401/403).
  • Server restarts: the v2 pid changes between pings. A changed version marks the restart as an update.

Quick view on the Servers page (active profile card only)

  • Status chip and current ping.
  • 30-minute ping sparkline.
  • "Uptime · reconnects today" line, tap opens Server Health.

Server Health screen

  • Header: status, current ping, 30-minute sparkline, p95.
  • Range picker: 1 h / 24 h / 7 d.
  • Tiles: uptime (share of observed time with the stream live), reconnects (with median time to recover), error rate (failed health checks), average time between drops.
  • Charts: latency (median line, p95 band), connection timeline strip, reconnects per slot.
  • Error breakdown by category.
  • Server info: version, protocol, process uptime (v2), restarts seen, event streams live.
  • Time the app was closed shows as "not measured", never as downtime.

Design: variant A ("Dashboard") of the server-health prototype.

Remaining:

  • Shared contract: recorded signals, aggregation rules (uptime, drops, recovery, error rate, percentiles), copy
  • Design-system: sparkline, latency band chart, status strip, bar chart, stat tile, list item footer slot (iOS + Android, with gallery pages)
  • Recorder: ping loop gated on foreground, connection state, stream failure categories, restart detection, 7-day pruning, purge on profile removal and Clear All Data (iOS + Android)
  • Persistence: SwiftData store on iOS, Room table + migration on Android
  • Quick view on the Servers page (iOS + Android)
  • Server Health screen and navigation (iOS + Android)
  • Unit tests for aggregation, recorder, and Screen Models on both platforms

Implementation: #1041 (draft).

Activity

  1. added
    enhancement
    ios
    android
    shared
    priority: medium
    in-progress
    on Nov 14, 2026
  2. added a commit that references this issue on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidenhancementin-progressiospriority: mediumshared

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions