Skip to content

feat(desktop): implement cloud workspace type with UI and creation flow#918

Closed
Kitenite wants to merge 1 commit into
mainfrom
cloud-workspace-pt-1
Closed

feat(desktop): implement cloud workspace type with UI and creation flow#918
Kitenite wants to merge 1 commit into
mainfrom
cloud-workspace-pt-1

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Jan 23, 2026

Summary

  • Add "cloud" as a new workspace type alongside "worktree" and "branch"
  • Implement cloud workspace creation flow in NewWorkspaceModal
  • Add cloud badge indicator in TopBar when viewing a cloud workspace
  • Cloud workspaces use the project's main repo path (like branch workspaces)

Changes

  • Schema: Added "cloud" to WorkspaceType enum in packages/local-db
  • Backend: Added createCloudWorkspace tRPC procedure
  • UI:
    • Cloud tab in NewWorkspaceModal with creation form
    • Cloud badge in TopBar for cloud workspaces
    • Updated tooltips to identify cloud workspaces
    • Updated delete dialog to handle cloud type

Test plan

  • Create a cloud workspace from the Cloud tab in New Workspace modal
  • Verify cloud workspace appears in sidebar with correct icon
  • Verify cloud badge appears in top bar when viewing cloud workspace
  • Verify terminals work in cloud workspace
  • Verify closing cloud workspace works correctly

Summary by CodeRabbit

  • New Features
    • Added cloud workspace type alongside existing worktree and branch workspaces
    • New workspace creation modal with custom naming support for cloud workspaces
    • Cloud workspaces display with a visual indicator in the top bar
    • Dedicated disconnect option for cloud workspaces with updated messaging

✏️ Tip: You can customize this high-level summary in your review settings.

- Add "cloud" to WorkspaceType enum in local-db schema
- Add createCloudWorkspace tRPC procedure for creating cloud workspaces
- Update NewWorkspaceModal Cloud tab with creation form
- Add cloud badge indicator in TopBar when viewing cloud workspace
- Update workspace path resolution to handle cloud type (uses main repo path)
- Update tooltips and delete dialog to handle cloud workspaces
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

This PR introduces cloud workspace support by adding a createCloudWorkspace TRPC mutation to create cloud-type workspaces, extending workspace type unions from "worktree" | "branch" to include "cloud" across backend and frontend, updating workspace utilities to treat cloud workspaces similarly to branch workspaces, and implementing UI components for cloud workspace creation and display.

Changes

Cohort / File(s) Summary
Backend Workspace Creation
apps/desktop/src/lib/trpc/routers/workspaces/procedures/create.ts
New createCloudWorkspace procedure that validates project existence, computes tabOrder, inserts a cloud-type workspace with branch "cloud", updates last active workspace, and tracks a workspace_created event.
Workspace Type Definitions
packages/local-db/src/schema/zod.ts, apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectSection.tsx, apps/desktop/src/renderer/screens/main/components/WorkspacesListView/types.ts
Extended workspace type enum and type unions from "worktree" | "branch" to include "cloud" in schema definitions and component props.
Workspace Utilities & Query
apps/desktop/src/lib/trpc/routers/workspaces/utils/worktree.ts, apps/desktop/src/lib/trpc/routers/workspaces/procedures/query.ts
Updated getWorkspacePath to treat cloud workspaces like branch workspaces for main repo path resolution; extended query response type unions and casting to include "cloud".
Cloud Workspace Creation UI
apps/desktop/src/renderer/components/NewWorkspaceModal/NewWorkspaceModal.tsx
Added createCloudWorkspace mutation with pending state, cloud mode handling in keyboard/submission logic, and cloud panel UI with title input and Create button.
Workspace Display & Management UI
apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceListItem/WorkspaceListItem.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceListItem/components/DeleteWorkspaceDialog/DeleteWorkspaceDialog.tsx, apps/desktop/src/renderer/screens/main/components/WorkspacesListView/WorkspaceRow/WorkspaceRow.tsx
Extended workspace type props to include "cloud"; added cloud-specific UI rendering (tooltips, badges, action labels) and dialog handling; cloud workspaces treated similarly to branch workspaces in deletion flow.

Sequence Diagram

sequenceDiagram
    participant User as User / UI
    participant Modal as NewWorkspaceModal
    participant TRPC as createCloudWorkspace<br/>(Router)
    participant DB as Database
    participant Tracking as Event Tracking

    User->>Modal: Click "Create Cloud Workspace" with name
    Modal->>TRPC: Mutate with projectId & name
    TRPC->>DB: Query project existence
    DB-->>TRPC: Project found
    TRPC->>DB: Query max tabOrder for project
    DB-->>TRPC: maxTabOrder result
    TRPC->>DB: Insert workspace (type=cloud, branch=cloud)
    DB-->>TRPC: Workspace created
    TRPC->>DB: Update last active workspace
    TRPC->>DB: Activate project
    TRPC->>Tracking: Track workspace_created event
    TRPC-->>Modal: Return { workspace, projectId }
    Modal->>Modal: Invalidate workspace queries
    Modal->>Modal: Close modal & show success toast
    Modal-->>User: Display new cloud workspace
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 A cloud workspace takes flight,
No branches, no worktrees in sight,
Type "cloud" joins the crew,
Creation and UI both new,
Hopping through tabs, what a delight! ☁️

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description covers key changes but omits required template sections like Type of Change checkboxes and Testing steps (only checklist items without details). Complete the description by adding checked Type of Change boxes and detailed testing steps beyond the checklist items.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: implementing cloud workspace type with both UI components and creation flow.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) View Branch
Fly.io Electric (Fly.io) View App
Vercel API (Vercel) Open Preview
Vercel Web (Vercel) Open Preview
Vercel Marketing (Vercel) Open Preview
Vercel Admin (Vercel) Open Preview
Vercel Docs (Vercel) Open Preview

Preview updates automatically with new commits

@Kitenite
Copy link
Copy Markdown
Collaborator Author

Closing — stale and conflicting, will restart fresh if needed.

@Kitenite Kitenite closed this Feb 17, 2026
@Kitenite Kitenite deleted the cloud-workspace-pt-1 branch March 15, 2026 16:07
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