Skip to content

fix(wework): roll back cloud automations - #2327

Merged
qdaxb merged 1 commit into
mainfrom
fix/rollback-cloud-automations
Jul 30, 2026
Merged

qdaxb merged 1 commit into
mainfrom
fix/rollback-cloud-automations

Conversation

@qdaxb

@qdaxb qdaxb commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • Remove the backend runtime automation API, migration, execution dispatch, and status callback introduced for cloud automation.
  • Route Wework automation operations exclusively through the local Executor.
  • Keep the Cloud source visible in the automation UI, but disable selection for now.
  • Update the Chinese and English automation guides and add an E2E assertion for the disabled Cloud option.

Why

The cloud automation execution path introduced database schema and backend persistence requirements that are not ready to ship. This rolls back that path while preserving the existing local automation workflow.

Impact

  • Local automations continue to work.
  • Cloud automations cannot be selected, created, loaded, or executed.
  • No new database migration or runtime automation execution fields are required.

Verification

  • Wework pre-push checks: ESLint, TypeScript, and unit tests passed.
  • Backend pre-push checks: Black, isort, syntax, settings configuration, and Alembic multi-head checks passed.
  • Focused backend tests: 15 passed.
  • Full Wework unit test run: 245 files and 2417 tests passed.
  • Isolated Tauri verification confirmed that the Cloud source is visible and disabled.

Summary by CodeRabbit

  • New Features

    • Automation creation and execution are now limited to the local device.
    • Cloud automation selection is disabled in the interface.
  • Bug Fixes

    • Simplified automation handling removes unavailable cloud synchronization and execution paths.
    • Background execution statuses and scheduling now reflect supported local workflows.
  • Documentation

    • Updated English and Chinese guides to clarify that cloud automations are currently unavailable.
    • Clarified that automation data and run history are handled by the local Executor.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Cloud runtime automations are removed across backend APIs, execution paths, persistence models, frontend services, and schemas. The desktop UI now keeps cloud automation visible but disabled, while local automation behavior and documentation are updated accordingly.

Changes

Runtime automation removal

Layer / File(s) Summary
Backend execution contracts
backend/app/models/subscription.py, backend/app/schemas/subscription.py, backend/app/services/subscription/*, backend/app/tasks/subscription_tasks.py
Removes runtime execution fields, statuses, scheduling overlap handling, skipped transitions, and the dedicated runtime automation task.
Backend API and event handling
backend/app/api/api.py, backend/app/api/ws/device_namespace.py, backend/app/api/endpoints/runtime_automations.py, backend/app/schemas/runtime_automation.py
Removes runtime automation routes and schemas, and forwards runtime events without updating background execution records.
Local-only frontend automation flow
wework/src/api/*, wework/src/features/automations/*, wework/src/features/workbench/*, wework/src/pages/AutomationsPage.tsx
Removes cloud automation API loading and wiring, delegates hybrid automation services locally, and disables cloud source selection.
Documentation and validation
docs/{en,zh}/user-guide/wework-automations.md, wework/e2e/desktop/task-flow.e2e.mjs
Documents unavailable cloud automations and verifies the cloud source selector is disabled.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: micro66

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: rolling back cloud automation support to local-only behavior.
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 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/rollback-cloud-automations

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 marked this pull request as ready for review July 30, 2026 06:53
@qdaxb
qdaxb enabled auto-merge July 30, 2026 06:53

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
wework/src/features/automations/AutomationDetailWorkspace.tsx (1)

326-326: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Dead draft.source === 'cloud' checks remain.

Since the cloud option is now permanently disabled: true (Line 268) and cloud automations can no longer be created or loaded, draft.source can never be 'cloud'. These disabled={draft.source === 'cloud'} conditions on the model/reasoning selects are now unreachable dead code.

♻️ Proposed cleanup
-                  disabled={draft.source === 'cloud'}
+                  disabled={false}

(repeated for both occurrences, or remove the disabled prop entirely if the underlying component defaults to enabled)

As per coding guidelines: "Delete dead code. Do not add compatibility shims or fallback paths without agreement; correct the primary path."

Also applies to: 348-348

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@wework/src/features/automations/AutomationDetailWorkspace.tsx` at line 326,
Remove the unreachable disabled={draft.source === 'cloud'} conditions from both
model/reasoning select components in AutomationDetailWorkspace, or remove the
disabled props entirely if those components are enabled by default. Do not add
replacement compatibility logic.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@wework/src/features/automations/AutomationDetailWorkspace.tsx`:
- Line 326: Remove the unreachable disabled={draft.source === 'cloud'}
conditions from both model/reasoning select components in
AutomationDetailWorkspace, or remove the disabled props entirely if those
components are enabled by default. Do not add replacement compatibility logic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3fdc32a7-b036-468f-8501-fb02ceac74fd

📥 Commits

Reviewing files that changed from the base of the PR and between eda8ca3 and 3362776.

📒 Files selected for processing (21)
  • backend/alembic/versions/20260729_d9e4f5a6b7c8_add_runtime_automation_execution_fields.py
  • backend/app/api/api.py
  • backend/app/api/endpoints/runtime_automations.py
  • backend/app/api/ws/device_namespace.py
  • backend/app/models/subscription.py
  • backend/app/schemas/runtime_automation.py
  • backend/app/schemas/subscription.py
  • backend/app/services/subscription/service.py
  • backend/app/services/subscription/state_machine.py
  • backend/app/tasks/subscription_tasks.py
  • backend/tests/api/endpoints/test_runtime_automations.py
  • docs/en/user-guide/wework-automations.md
  • docs/zh/user-guide/wework-automations.md
  • wework/e2e/desktop/task-flow.e2e.mjs
  • wework/src/api/automations.test.ts
  • wework/src/api/automations.ts
  • wework/src/api/backend/backendServices.ts
  • wework/src/api/hybrid/hybridServices.ts
  • wework/src/features/automations/AutomationDetailWorkspace.tsx
  • wework/src/features/workbench/workbenchServices.ts
  • wework/src/pages/AutomationsPage.tsx
💤 Files with no reviewable changes (14)
  • backend/alembic/versions/20260729_d9e4f5a6b7c8_add_runtime_automation_execution_fields.py
  • wework/src/api/automations.ts
  • backend/tests/api/endpoints/test_runtime_automations.py
  • backend/app/schemas/runtime_automation.py
  • backend/app/api/endpoints/runtime_automations.py
  • backend/app/services/subscription/service.py
  • backend/app/api/api.py
  • backend/app/schemas/subscription.py
  • backend/app/models/subscription.py
  • backend/app/api/ws/device_namespace.py
  • backend/app/services/subscription/state_machine.py
  • wework/src/api/backend/backendServices.ts
  • backend/app/tasks/subscription_tasks.py
  • wework/src/api/automations.test.ts

@qdaxb
qdaxb added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit 659a3e1 Jul 30, 2026
38 of 62 checks passed
@qdaxb
qdaxb deleted the fix/rollback-cloud-automations branch July 30, 2026 07:53
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