#7767·superset

[bug] Workspaces board: remote-host cards blink on relay-socket flaps — offline remote hosts dropped from PR/agent query targets

Author: pdolegaCreated Sep 23, 2026Updated Sep 25, 2026

Context

Remote-host cards on the Workspaces board blink: gone (or jumped to Idle) for ~5–30 s, then back. Sidebar PR chips and agent dots for that host blink with them.

Cause: any relay-socket blip flips the host's presence to offline, and offline remote hosts are dropped from the PR/agent/diff-stats query targets. Every card on the host loses pr and agentStatus until the socket reopens — column collapses to Idle; with a PR/agent filter on, the card is hidden. The rows themselves never go away.

Expected: presence only flips the host's online indicator; cards keep column and chips from cache, as the local host already does.

ImageImageImage

References

Source Who Link Date
Dogfooding @pdolega — 2026-09-23

Approach

Keep offline remote hosts as targets with hostUrl: null, like the local host. The queries already gate on enabled: hostUrl !== null and key on host identity, so cached data renders through the blip and refetches on reopen. Flip the test. Fixes board and sidebar.

Gotchas

  • Blip length: 1–5 s client backoff + relay upgrade waiting for the host's dial-back; a 503 probe waits HOST_OFFLINE_RETRY_MS (30 s). The relay closes every client socket when the host tunnel drops or is replaced (apps/relay/src/host-tunnel.ts:350-357); the host re-dials itself after 75 s of inbound silence (packages/host-service/src/tunnel/tunnel-client.ts:167).
  • Repro: board on "All devices" + Open-PR filter, Wi‑Fi off ~5 s. Deterministic: CDP Network.emulateNetworkConditions({ offline: true }) on the renderer — kills the relay socket, spares the local host.