Skip to content

Remove the automations module - #333

Merged
paulocastellano merged 7 commits into
mainfrom
remove-automations-module
Sep 5, 2026
Merged

Remove the automations module#333
paulocastellano merged 7 commits into
mainfrom
remove-automations-module

Conversation

@paulocastellano

@paulocastellano paulocastellano commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the Automations module end to end to clear the ground for the next feature.

  • Schema: new drop_automation_tables migration rewrites posts.created_via = 'automation' to 'web', then drops automation_node_states, automation_node_runs, automation_runs, automation_trigger_items and automations. Existing production data in those tables is discarded.
  • Backend: deletes actions, node runners, commands, jobs, models, observers, policy, resources, form requests, broadcast channel, DTO, enums, services and the ResolvableUrl rule. Trims PostObserver (no more trigger dispatch on status change), the morph map, routes/app.php (15 routes), routes/channels.php, routes/console.php (4 scheduled commands) and the Horizon automations supervisor.
  • CreatedVia::Automation enum case removed.
  • Frontend: deletes the automation pages, components, types, Echo composable, canvas undo/redo history, CodeEditor.vue, its expression/expanded-editor composables, useShortcut, the nav-item badge (only the Automations "Beta" pill used it), the ui/chart wrapper whose only consumer was the runs chart, and the previewOnly prop chain through ChannelConfigurator and the per-platform Settings components (only the Generate node set it). Sidebar entry and canManageAutomations gone.
  • i18n: lang/*/automations.php, sidebar.automations and common.beta removed in all 16 locales.
  • Tests: automation suites, the RSS feed fixtures and the feedFixture() Pest helper removed; cross-cutting tests trimmed.
  • Dependencies: simplepie/simplepie, @vue-flow/*, codemirror, @codemirror/*, @unovis/vue and @unovis/ts removed.
  • README: the two Automations feature rows removed. releases/* untouched.

Deploy notes

  • Run php artisan migrate before the new code serves traffic. The CreatedVia::Automation case is gone, so any posts row still holding created_via = 'automation' throws ValueError on hydration until the migration rewrites it. The Docker entrypoint already migrates on boot; a manual or rolling deploy must keep that order.
  • Drain the Redis automations queue once after deploy: php artisan horizon:clear --queue=automations. The old code keeps pushing DispatchPostTriggerAutomationsJob there until Horizon restarts, and no supervisor consumes it afterwards. Any entries in failed_jobs for the deleted job classes can be pruned with php artisan queue:prune-failed.
  • The migration's down() is intentionally irreversible, like the other data-destroying migrations in the repo.

Existing migrations untouched

2026_08_21_130941_add_workspace_platform_identity_unique_to_social_accounts_table reads the automations table while collapsing duplicate social accounts. It is byte-identical to main. Its only test, DuplicateIdentityRehearsalTest, re-ran that frozen migration after RefreshDatabase had already dropped the table, so it is removed rather than propped up with scaffolding: the migration already ran on Cloud, and a fresh install has no duplicates to collapse.

Out of scope

The orphan sweep also surfaced dead code that predates automations (starter-kit components, unused ui/* dirs, three PHP classes, axios). Tracked in #334 rather than mixed into this PR.

Test plan

  • php artisan test --compact --parallel: 4102 passed, 1 skipped
  • New DropAutomationTablesMigrationTest recreates the five tables with their FKs, then covers the created_via rewrite and the drop order on both engines
  • MorphMapTest and LocalizationParityTest green
  • php artisan route:list --name=automations returns nothing; schedule:list has no automation commands; Horizon supervisors are supervisor-1, social-publishing, ai-assistant, webhooks
  • No remaining reference to automation, vue-flow, codemirror, simplepie or unovis outside releases/*, the historical migrations and two keywords test fixtures
  • vendor/bin/pint --dirty clean; eslint reports only the 3 import/order errors that already exist on main (auto-fixed by CI's npm run lint)

Drops the visual workflow builder end to end: actions, node runners,
commands, jobs, models, observers, policy, resources, requests, routes,
broadcast channel, scheduler entries, Horizon supervisor, Vue pages and
components, canvas undo/redo history, CodeEditor, translations, factories
and tests.

A new migration rewrites posts.created_via = 'automation' to 'web' and
drops the five automation tables. The CreatedVia::Automation enum case is
removed. The 2026-08-21 social-account identity migration now skips its
automation node repointing when the automations table no longer exists,
so it stays re-runnable after the drop.

Orphaned dependencies removed: simplepie/simplepie, @vue-flow/*,
codemirror and @codemirror/*.
…reviewOnly chain

- Restore 2026_08_21 migration to exactly what production ran; the
  rehearsal test now recreates the automations table it expects instead.
- Mark the drop migration's down() irreversible like its siblings.
- Simplify DropAutomationTablesMigrationTest to the sibling shape.
- Remove previewOnly / aiGenerateVariants: the only caller that set the
  prop was the deleted automation Generate node.
- Run pint over lang/*/common.php after the beta key removal.
@paulocastellano
paulocastellano merged commit d8149ef into main Sep 5, 2026
5 checks passed
@paulocastellano
paulocastellano deleted the remove-automations-module branch September 5, 2026 14:03
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