Repository navigation
fix(wework): roll back cloud automations - #2327
Conversation
📝 WalkthroughWalkthroughCloud 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. ChangesRuntime automation removal
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
wework/src/features/automations/AutomationDetailWorkspace.tsx (1)
326-326: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDead
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.sourcecan never be'cloud'. Thesedisabled={draft.source === 'cloud'}conditions on the model/reasoning selects are now unreachable dead code.As per coding guidelines: "Delete dead code. Do not add compatibility shims or fallback paths without agreement; correct the primary path."♻️ Proposed cleanup
- disabled={draft.source === 'cloud'} + disabled={false}(repeated for both occurrences, or remove the
disabledprop entirely if the underlying component defaults to enabled)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
📒 Files selected for processing (21)
backend/alembic/versions/20260729_d9e4f5a6b7c8_add_runtime_automation_execution_fields.pybackend/app/api/api.pybackend/app/api/endpoints/runtime_automations.pybackend/app/api/ws/device_namespace.pybackend/app/models/subscription.pybackend/app/schemas/runtime_automation.pybackend/app/schemas/subscription.pybackend/app/services/subscription/service.pybackend/app/services/subscription/state_machine.pybackend/app/tasks/subscription_tasks.pybackend/tests/api/endpoints/test_runtime_automations.pydocs/en/user-guide/wework-automations.mddocs/zh/user-guide/wework-automations.mdwework/e2e/desktop/task-flow.e2e.mjswework/src/api/automations.test.tswework/src/api/automations.tswework/src/api/backend/backendServices.tswework/src/api/hybrid/hybridServices.tswework/src/features/automations/AutomationDetailWorkspace.tsxwework/src/features/workbench/workbenchServices.tswework/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
What changed
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
Verification
Summary by CodeRabbit
New Features
Bug Fixes
Documentation