Skip to content

[Dashboard] Minimal client with WebSocket #9

Description

@varev-dev

Goal

Deliver a minimal dashboard client that connects to the server via WebSocket and displays live metric updates for a selected agent.

Acceptance criteria

  • Client can open a WebSocket connection to configured backend URL and receive messages in real time.
  • Dashboard visibly shows current connection state and updates it after disconnect/reconnect.
  • For valid incoming metric messages, UI updates latest displayed values within 1 second from message arrival.
  • On temporary connection loss, client attempts reconnect automatically without page refresh.
  • On malformed message, client does not crash; error is logged and UI remains usable.
  • If no data is received for a configured timeout (e.g. 10s), UI shows stale data indicator.
  • Basic manual test scenario is documented (how to run client, connect, simulate disconnect, verify reconnect).

Sub-tasks & Scope of work

  • Dashboard UI: Create a basic SPA view with connection status, selected agent_id, and live list/cards for core metrics (CPU, memory, disk, network).
  • WebSocket Module: Implement client with configurable URL (from env), connect/disconnect lifecycle, payload validation, and automatic reconnect with backoff (1s → 2s → 5s, capped).
  • State Management: Add minimal state handling for latest metric values and last update timestamp.
  • Error Handling: Handle error states in UI gracefully (server unavailable, invalid payload, timeout).
  • Documentation: Add developer documentation note with test steps and known limitations for running/testing WS mode.

Metadata

Metadata

Labels

Fields

No fields configured for Feature.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions