revert: drop host-offline workspace gate from #4672#4727
Conversation
Reverts the layout wiring and useRemoteHostStatus offline branch from 7ec5ee1. Keeps WorkspaceHostOfflineState component on disk (unused) for later use.
|
Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews. |
|
Ready to review this PR? Stage has broken it down into 2 individual chapters for you:
Chapters generated by Stage for commit a25834f on May 19, 2026 8:14pm UTC. |
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe PR removes offline status from the remote host state machine. The ChangesRemove remote host offline status
Possibly related PRs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR reverts the host-offline gate added in #4672: the
Confidence Score: 5/5Safe to merge — the revert cleanly removes the offline gate without introducing new logic. Both changed files are straightforward deletions of the offline-status variant and its render branch. The widened infoQuery enabled condition causes the host-info fetch to start slightly earlier, but the existing !isReady early-return in the hook still prevents the workspace from rendering before collections settle. No new state, no new network paths, and the remaining RemoteHostStatus union variants are all handled in the layout. No files require special attention.
|
| Filename | Overview |
|---|---|
| apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/hooks/useRemoteHostStatus/useRemoteHostStatus.ts | Removes the "offline" status variant and its associated guard; drops isOnline from the DB select; widens infoQuery's enabled condition to fire as soon as workspace is non-null and remote. Logic is correct and consistent with the optimistic-render intent. |
| apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/layout.tsx | Removes the WorkspaceHostOfflineState import and the "offline" branch from the render guard sequence. Remaining guards are in correct order and cover all remaining RemoteHostStatus variants. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[V2WorkspaceLayout mounts] --> B{workspaceId & isReady & workspaces?}
B -- No --> C[Render empty div]
B -- Yes --> D{workspace exists?}
D -- No, creating --> E[WorkspaceCreatingState]
D -- No, error --> F[WorkspaceCreateErrorState]
D -- No --> G[WorkspaceNotFoundState]
D -- Yes --> H[useRemoteHostStatus]
H --> I{isLocal?}
I -- Yes --> J[status: skip]
I -- No --> K{isReady?}
K -- No --> L[status: loading]
K -- Yes --> M{infoQuery success?}
M -- Yes, version OK --> N[status: ready]
M -- Yes, version mismatch --> O[status: incompatible]
M -- No / pending / failed --> N
J --> P{hostStatus}
N --> P
O --> P
L --> P
P -- incompatible --> Q[WorkspaceHostIncompatibleState]
P -- loading --> R[Render empty div]
P -- ready or skip --> S[WorkspaceProvider + Outlet]
Reviews (1): Last reviewed commit: "Revert layout gate from "gate offline ho..." | Re-trigger Greptile
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
useRemoteHostStatusoffline branch added in [codex] gate offline host workspaces #4672, so v2 workspaces no longer render a full-screen gate when the paired host is marked offline.WorkspaceHostOfflineStateon disk (unused) so we can reuse it once we have a less aggressive treatment.Why
hosts.isOnline.Test plan
bun run typecheckcleanSummary by cubic
Reverts the offline host gate for v2 workspaces so the UI renders normally even when the paired host is offline. Drops the
offlinebranch andhosts.isOnlinecheck inuseRemoteHostStatus; keepsWorkspaceHostOfflineStatein the codebase for future use.Written for commit a25834f. Summary will update on new commits. Review in cubic
Summary by CodeRabbit