Skip to content

feat: support cloud device - #1573

Merged
qdaxb merged 2 commits into
mainfrom
wework_support_cloud_device
Jun 26, 2026
Merged

qdaxb merged 2 commits into
mainfrom
wework_support_cloud_device

Conversation

@qdaxb

@qdaxb qdaxb commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added cloud connection support, including connect/disconnect actions, cloud status visibility, and cloud device management in settings and sidebar.
    • Added new startup command previews for remote devices, with multiple command options and copy/retry support.
    • Added shared login and admin password setup forms, plus local runtime auth status display.
  • Bug Fixes

    • Improved device handling for app devices and remote/local distinctions.
    • Updated runtime and chat behavior to better reflect connection state, scroll restoration, and startup readiness.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@qdaxb, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 8 minutes and 8 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6888ade6-2c7b-4cb8-a0eb-57b48bc26aa9

📥 Commits

Reviewing files that changed from the base of the PR and between aed1a00 and 8396a07.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (27)
  • frontend/.husky/pre-commit
  • frontend/.husky/pre-push
  • wework/.husky/_/applypatch-msg
  • wework/.husky/_/commit-msg
  • wework/.husky/_/h
  • wework/.husky/_/husky.sh
  • wework/.husky/_/post-applypatch
  • wework/.husky/_/post-checkout
  • wework/.husky/_/post-commit
  • wework/.husky/_/post-merge
  • wework/.husky/_/post-rewrite
  • wework/.husky/_/pre-applypatch
  • wework/.husky/_/pre-auto-gc
  • wework/.husky/_/pre-commit
  • wework/.husky/_/pre-merge-commit
  • wework/.husky/_/pre-push
  • wework/.husky/_/pre-rebase
  • wework/.husky/_/prepare-commit-msg
  • wework/.husky/commit-msg
  • wework/.husky/pre-commit
  • wework/.husky/pre-push
  • wework/package.json
  • wework/src/api/hybrid/hybridServices.test.ts
  • wework/src/components/layout/DesktopSidebar.test.tsx
  • wework/src/components/layout/DesktopWorkbenchLayout.test.tsx
  • wework/src/features/cloud-connection/CloudConnectionSidebarButton.tsx
  • wework/src/features/workbench/WorkbenchProvider.tsx
📝 Walkthrough

Walkthrough

Adds app-device support across shared types and backend registration, introduces cloud connection state and UI, returns Docker/process remote startup commands, and updates executor, workbench, settings, page wiring, tests, and docs for cloud-aware local-first operation.

Changes

WeWork Local-First Cloud Connection

Layer / File(s) Summary
Device contracts and helpers
backend/app/schemas/device.py, backend/app/api/endpoints/admin/device_monitor.py, wework/src/types/*, wework/src/lib/*
Adds the app device type, app_device_id, remote startup command shapes, cloud work status types, and updated device monitor descriptions and predicates.
App-device backend flow
backend/app/services/device_service.py, backend/app/api/ws/device_namespace.py, backend/app/services/device/local_provider.py, backend/app/services/device/provider_factory.py, backend/app/services/device/runtime_rpc_service.py, backend/app/services/execution/request_builder.py, backend/app/services/runtime_work_service.py, backend/tests/*
Threads app_device_id through registration, provider filtering, runtime routing, and device status responses, with backend tests covering the app-device path.
Remote startup commands
backend/app/api/endpoints/remote_devices.py, backend/tests/api/endpoints/test_remote_devices_api.py
Returns Docker/process remote startup commands instead of pre-registering a CRD, and updates tests for the new response payload.
Executor bridge and runtime IPC
executor/src/local/*, executor/tests/*, wework/src-tauri/src/*, wework/src/tauri/*
Adds backend connection env injection, runtime_auth_status, compression opt-out, heartbeat/reconnect changes, and Tauri connect/disconnect commands for the local executor bridge and IPC path.
Cloud connection core
wework/src/features/cloud-connection/*
Adds persisted cloud connection state, hooks, login/admin setup flows, model execution overrides, and cloud connection lifecycle handling.
Workbench services and cloud sync
wework/src/api/backend/*, wework/src/api/hybrid/*, wework/src/api/local/*, wework/src/features/workbench/*
Builds backend and hybrid workbench service factories, adds cloud background sync status and merged device/runtime handling, and updates workbench state routing for cloud-aware data flow.
App shell and cloud UI
wework/src/App.tsx, wework/src/components/layout/*, wework/src/components/auth/*, wework/src/components/projects/*, wework/src/features/cloud-connection/CloudConnectionDialog.tsx, wework/src/features/cloud-connection/CloudConnectionSidebarButton.tsx, wework/src/features/cloud-connection/LocalExecutorCloudBridge.tsx, wework/src/features/local-runtime/*, wework/src/tauri/capabilities/default.json, wework/src/App.*.test.tsx
Wraps the shell with cloud connection providers, adds the sidebar/dialog/startup UI, and threads cloud device selection and startup-command retrieval through the desktop app.
Settings, pages, and chat UI
wework/src/api/local/runtimeAuthStatus.ts, wework/src/components/settings/*, wework/src/components/chat/*, wework/src/pages/*
Routes cloud-aware settings and page-level actions through optional cloud connection state, updates chat scrolling and workspace detection, and refreshes page-level device and model wiring.
Docs and locale copy
AGENTS.md, docs/*, wework/src/i18n/locales/*
Adds the cloud-connection developer guide and updates English and Chinese locale strings for cloud devices, cloud work, settings labels, and runtime copy.

Sequence Diagram(s)

sequenceDiagram
  participant CloudConnectionDialog
  participant CloudConnectionProvider
  participant HttpClient as createHttpClient
  participant LocalExecutorCloudBridge
  participant LocalExecutorRs as local_executor.rs
  CloudConnectionDialog->>CloudConnectionProvider: connectWithPassword() / setupAdminPassword()
  CloudConnectionProvider->>HttpClient: GET /health
  CloudConnectionProvider->>HttpClient: POST /auth/login
  CloudConnectionProvider->>HttpClient: GET /users/me
  CloudConnectionProvider-->>CloudConnectionDialog: connected snapshot
  CloudConnectionProvider->>LocalExecutorCloudBridge: cloud connection snapshot
  LocalExecutorCloudBridge->>LocalExecutorRs: connectBackend / disconnectBackend
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~90+ minutes

Possibly related PRs

  • wecode-ai/Wegent#1455: Adds the remote-device startup-command flow that this PR extends with multiple startup variants.
  • wecode-ai/Wegent#1384: Touches the same websocket device-registration path that now carries app_device_id.
  • wecode-ai/Wegent#1549: Changes the same local runtime initializer flow and startup-screen behavior updated here.

Poem

🐰 I hop through sockets, code, and cloud,
with local paws and tail held proud.
App and executor dance in sync,
remote scripts go clickety-clink.
Carrot cache is warm and loud.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 23.68% 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the main theme of the changes: adding cloud device support.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wework_support_cloud_device

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.

@qdaxb
qdaxb force-pushed the wework_support_cloud_device branch from c0819c9 to 0aeb2d2 Compare June 26, 2026 16:20
@qdaxb
qdaxb force-pushed the wework_support_cloud_device branch from 0aeb2d2 to aed1a00 Compare June 26, 2026 16:23
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

@qdaxb
qdaxb merged commit 203c5de into main Jun 26, 2026
21 of 22 checks passed
@qdaxb
qdaxb deleted the wework_support_cloud_device branch June 26, 2026 16:56
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