Skip to content

Automations module (WIP)#88

Draft
paulocastellano wants to merge 7 commits into
mainfrom
feat/automations-module
Draft

Automations module (WIP)#88
paulocastellano wants to merge 7 commits into
mainfrom
feat/automations-module

Conversation

@paulocastellano

Copy link
Copy Markdown
Contributor

Draft / work in progress — opening early so the team can follow along and review direction. Not ready to merge yet.

What

Adds an Automations module — visual, node-based automations that generate and publish posts on triggers.

Includes (so far):

  • Triggers (e.g. schedule, RSS/HTTP watermark-based).
  • Nodes: Generate (AI post generation), Condition (routing), HTTP Request, Publish.
  • Dry runs — run the flow (incl. real AI generation) without persisting a Post.
  • Automation CRUD + run history UI, expression resolver, encrypted node secrets.

Status

Branch is up to date with main (merged). Resolutions/integration notes are in the merge commit — notably the ContentType::InstagramCarousel removal from main (#80): an Instagram carousel is now a multi-image instagram_feed, so the carousel-capable detection uses InstagramFeed.

Full test suite green (1796 passed); automations suite green (82).

Not done yet

Still WIP — feedback on the node model / UX welcome before final polish.

- Added new automation-related routes and controllers for managing automations.
- Introduced automation nodes in the UI with distinct styles and interactions.
- Updated sidebar to include navigation for automations.
- Enhanced post creation logic to support automation metadata.
- Refactored content type and platform enums into types for better type safety.
- Added localization for automation-related terms in English, Spanish, and Portuguese.
- Improved error handling in various components to accommodate new features.
Conflict resolutions + integration fixes:
- CreatePost: kept the branch's merge-into-existing meta persistence (equivalent
  to main's #86 replace on create, and what the automations flow was built on).
- FacebookSettings.vue: kept both new defaults (previewOnly + meta).
- RunGenerateNode + GenerateNodeConfig.vue: ContentType::InstagramCarousel was
  removed on main (#80); an IG carousel is now a multi-image instagram_feed, so
  the carousel-capable list uses InstagramFeed.
- GenerateNodeTest: fixtures use the ContentType enum and the new instagram_feed
  carousel signal.
… provider

Move PostObserver, AutomationRunObserver, and AutomationNodeRunObserver onto
their models with the #[ObservedBy] attribute (the Laravel-preferred way) and
drop AppServiceProvider::configureObservers() plus its now-unused imports.
…r UX

Generation
- Generate node now produces the full post (text + AI image + carousel)
  via a shared PostImagePipeline extracted from StreamPostCreation
- Generate config UI mirrors the /posts/create wizard (carousel slide
  count, include-image toggle); drop the decorative format/unsplash keys

Flow correctness
- RSS/HTTP nodes expose named has-items (default) and no-items output
  handles, labeled and colored like the Condition node
- AdvanceAutomationRun records a no_matching_edge terminal instead of
  completing silently; "0 new items" feedback in the test panel
- Manual/test runs no longer persist the production dedup watermark

Run reliability
- Pause truly halts in-flight runs (production only; manual test runs
  always run regardless of automation status)
- ProcessAutomationNode::failed() marks the run failed
- automation:recover-stuck-runs and automation:prune-dry-runs commands

Webhook / HTTP
- Branded User-Agent (config-driven) on outbound webhook + http_request
- Webhook fails on invalid JSON instead of silently sending {}
- HTTP custom headers editor; CodeMirror-based CodeEditor for JSON

Editor UX
- Header Test button only opens the panel; the panel has a Run button
  (saves first) and owns the with-real-data toggle
- Clicking a node closes the test panel and opens its config
- Node cards: max-width + truncate so long URLs don't grow the node
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