[codex] gate offline host workspaces

Merged
KI
6mo ago
+134-1

Summary

  • Gate remote V2 workspace routes when the owning host is marked offline.
  • Add a dedicated offline-host state instead of mounting workspace children against an unreachable host service.
  • Include a responsive Host ID row plus links to host settings and the V2 workspaces list.

Why

Remote workspaces already depend on host availability. When a host is offline, the workspace detail route should behave like the existing missing-worktree gate: explain why terminals and file actions are unavailable and avoid downstream host-service queries.

Validation

  • bunx biome check --write --unsafe apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/layout.tsx apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/hooks/useRemoteHostStatus/useRemoteHostStatus.ts apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/components/WorkspaceHostOfflineState/WorkspaceHostOfflineState.tsx apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/components/WorkspaceHostOfflineState/index.ts
  • bun run --cwd apps/desktop typecheck
  • bun run lint -- apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/layout.tsx apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/hooks/useRemoteHostStatus/useRemoteHostStatus.ts apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/components/WorkspaceHostOfflineState/WorkspaceHostOfflineState.tsx apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/components/WorkspaceHostOfflineState/index.ts
  • git diff --check

Open in Stage

Summary by cubic

Gates V2 workspace routes when the host is offline and shows a clear offline state. This avoids unreachable host calls and explains why terminals and file actions are unavailable.

  • New Features
    • Detect offline hosts via isOnline and return an offline status; skip remote host.info queries when offline.
    • Render a dedicated offline state with host name, Host ID, and links to host settings and the V2 workspaces list.
    • Prevent terminals and file actions from mounting when the host is offline, matching the missing-worktree gate.

Summary by CodeRabbit

Release Notes

  • New Features
    • Added offline host state display for workspaces. When a host is unavailable, users now see a dedicated interface showing the host information with options to navigate to host settings or browse other workspaces.

Review Change Stack