fix(desktop): stop gating v2 workspace on flaky host online status

Merged
SA
6mo ago
+11-106

Summary

Removes the full-screen "Host is offline" state from the v2 workspace details page.

The screen was gated on `v2Hosts.isOnline` (a DB flag written by the relay) and a `host.info` probe. Both drift from reality:

  • `isOnline` can be stuck `true` after a relay crash/redeploy, or stuck `false` if the relay's `setOnline` write blipped
  • The probe is enabled only when `isOnline === true`, so a stuck-false flag means we show offline immediately without ever asking the host

End result: users see "Host is offline" on hosts that are actually reachable.

What changes

  • `useRemoteHostStatus` no longer returns an `offline` variant; the `enabled` gate on the version probe drops the `isOnline` dependency
  • `layout.tsx` drops the offline branch
  • `WorkspaceHostOfflineState` component deleted (no other consumers)
  • The "incompatible" version-mismatch gate stays — that fires only on a successful probe with a too-old version, so it's not affected by reachability flakiness

Downstream queries (load branches, files, terminals) already surface their own errors when the host is genuinely unreachable. They're the correct place to communicate that, not a pre-emptive layout gate.

Test plan

  • Open a v2 workspace whose host has `isOnline=false` in the DB but is actually reachable → workspace renders (previously: offline screen)
  • Open a v2 workspace on a genuinely-offline host → workspace shell renders; individual queries surface their own errors
  • Open a v2 workspace on a host running an incompatible host-service version → "incompatible" screen still appears
  • `bun run lint` + `bun --bun turbo run typecheck --filter=@superset/desktop` pass

Summary by cubic

Remove the flaky “Host is offline” gate on the v2 workspace page so the workspace renders by default; only a confirmed version mismatch still blocks with the “incompatible” screen. This prevents false offline screens caused by stale v2Hosts.isOnline or transient probe failures.

  • Bug Fixes
    • Dropped offline status from useRemoteHostStatus and removed the isOnline-gated host.info probe.
    • Removed the offline branch from layout and deleted WorkspaceHostOfflineState.
    • Kept the version check: shows “incompatible” only when host.info succeeds and the version is too old.

Summary by CodeRabbit

  • Refactor
    • Removed offline status handling from workspace host monitoring. The system no longer tracks or displays offline states for workspace hosts.

Review Change Stack