Skip to content

revert: drop host-offline workspace gate from #4672#4727

Merged
Kitenite merged 1 commit into
mainfrom
revert-hard-block-remote
May 19, 2026
Merged

revert: drop host-offline workspace gate from #4672#4727
Kitenite merged 1 commit into
mainfrom
revert-hard-block-remote

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented May 19, 2026

Summary

  • Reverts the layout wiring and useRemoteHostStatus offline 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.
  • Keeps WorkspaceHostOfflineState on disk (unused) so we can reuse it once we have a less aggressive treatment.

Why

  • The hard block was too aggressive — workspaces should render optimistically and let individual operations degrade rather than blocking the whole page on hosts.isOnline.

Test plan

  • Open a v2 workspace whose paired host is offline → workspace UI renders normally (no full-screen offline state)
  • Open a v2 workspace on a reachable host → unchanged
  • bun run typecheck clean

Open in Stage

Summary by cubic

Reverts the offline host gate for v2 workspaces so the UI renders normally even when the paired host is offline. Drops the offline branch and hosts.isOnline check in useRemoteHostStatus; keeps WorkspaceHostOfflineState in the codebase for future use.

Written for commit a25834f. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • Refactor
    • Removed the remote host offline status state and its associated UI component. Remote hosts now transition through alternative status flows instead of displaying a dedicated offline indicator.

Review Change Stack

Reverts the layout wiring and useRemoteHostStatus offline branch from
7ec5ee1. Keeps WorkspaceHostOfflineState
component on disk (unused) for later use.
@capy-ai
Copy link
Copy Markdown

capy-ai Bot commented May 19, 2026

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.

@stage-review
Copy link
Copy Markdown

stage-review Bot commented May 19, 2026

Ready to review this PR? Stage has broken it down into 2 individual chapters for you:

Title
1 Remove offline status from useRemoteHostStatus hook
2 Unwire offline gate from workspace layout
Open in Stage

Chapters generated by Stage for commit a25834f on May 19, 2026 8:14pm UTC.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ce4efdc2-7d9e-4421-a271-b57d12827b74

📥 Commits

Reviewing files that changed from the base of the PR and between ca8213d and a25834f.

📒 Files selected for processing (2)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/hooks/useRemoteHostStatus/useRemoteHostStatus.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/layout.tsx
💤 Files with no reviewable changes (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/layout.tsx

📝 Walkthrough

Walkthrough

The PR removes offline status from the remote host state machine. The RemoteHostStatus type drops the offline variant, the hook no longer queries the database isOnline flag, and the layout stops rendering offline UI. Early-return logic is simplified to only check workspace and local status.

Changes

Remove remote host offline status

Layer / File(s) Summary
Hook type and implementation updates
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/hooks/useRemoteHostStatus/useRemoteHostStatus.ts
RemoteHostStatus union removes the "offline" variant, leaving only "skip", "loading", "incompatible", and "ready". The useLiveQuery projection stops selecting hosts.isOnline, and the remote host useQuery enabled condition simplifies from requiring isReady && hostRow?.isOnline !== false to only workspace != null && !isLocal. Early-return logic removes the offline branch and returns "loading" or "skip" based on workspace and local status.
Layout offline rendering removal
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/layout.tsx
The WorkspaceHostOfflineState import is removed and the hostStatus.status === "offline" conditional rendering branch is deleted, so offline state is no longer handled explicitly in the layout.

Possibly related PRs

  • superset-sh/superset#4672: This PR adds the offline status and WorkspaceHostOfflineState rendering that the current PR removes.
  • superset-sh/superset#4581: Adjacent changes to the v2 workspace remote-host status derivation and layout rendering for host availability.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 The offline state hops away with cheer,
No more "offline" whispers in the code here,
The hook bounds forward, light and lean,
The layout renders what it's seen—
A simpler flow, crisp and clean! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'revert: drop host-offline workspace gate from #4672' clearly and specifically describes the main change: reverting a previous commit to remove the offline host gate mechanism.
Description check ✅ Passed The description includes a clear Summary, rationale (Why), and detailed Test plan, though it does not follow the provided template structure with explicit sections like 'Related Issues', 'Type of Change', etc.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-hard-block-remote

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 19, 2026

Greptile Summary

This PR reverts the host-offline gate added in #4672: the "offline" status variant is removed from RemoteHostStatus, the isOnline column is dropped from the host live-query select, and the full-screen WorkspaceHostOfflineState render block is removed from the layout. The WorkspaceHostOfflineState component itself is intentionally left on disk for future reuse.

  • useRemoteHostStatus.ts: infoQuery enabled condition is widened from workspace != null && !isLocal && isReady && hostRow?.isOnline !== false to workspace != null && !isLocal, so the host-info fetch now starts as soon as a remote workspace is identified rather than waiting for the collections live-query to settle and the online flag to be true.
  • layout.tsx: The "offline" render branch and its import are deleted; remaining guard order (incompatibleloading → render) remains correct and exhaustive over the new RemoteHostStatus union.

Confidence Score: 5/5

Safe 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.

Important Files Changed

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]
Loading

Reviews (1): Last reviewed commit: "Revert layout gate from "gate offline ho..." | Re-trigger Greptile

@Kitenite Kitenite merged commit bd0cb14 into main May 19, 2026
9 of 10 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

sazabi Bot pushed a commit that referenced this pull request May 20, 2026
Reverts the layout wiring and useRemoteHostStatus offline branch from
7ec5ee1. Keeps WorkspaceHostOfflineState
component on disk (unused) for later use.
MocA-Love added a commit to MocA-Love/superset that referenced this pull request May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant