Skip to content

2.28.0

Choose a tag to compare

@goldnead goldnead released this 18 Oct 12:03
· 105 commits to main since this release

Added: a picture of the mail on the send_email node

After a save, a queued job photographs each send_email node's mail (sample data, never a real contact)
and the canvas draws it as a tile above the node's title, through the thumbnail field that
statamic-flow-canvas already knows. Needs spatie/browsershot (a suggest) and a Chromium
(automations.thumbnails.chrome_path or one on PATH); without them nothing is drawn and nothing fails.
Pictures live on the public disk under automations/thumbs/{uuid}/, named with an HMAC and a fingerprint of the
mail (template, subject, body), so an edited mail has no tile until it is rendered again. New contract
MailThumbnailRenderer; config automations.thumbnails.{enabled,disk,width,height,chrome_path}.
Known gaps: editing the content of an email template does not refresh the tile until the node changes;
pictures of a deleted automation stay under automations/thumbs/{uuid}/; the browser runs without its
sandbox and loads whatever the mail's HTML references, so use it on mails your editors write, and use a real
queue driver (on sync the save waits for the browser). No migration.

Added: Automations::cancelRunsOnMissingNodes()

A public way to close the passes that a graph edit has stranded. A run asleep in a delay waits on a
scheduled job that names the node it resumes on; once that node is gone, the call and the run are
cancelled together, with the given reason in the run's error message.

Automations::cancelRunsOnMissingNodes(Automation $automation, array $survivingNodeKeys, string $reason): int
  • Only wake-up calls that are still pending or queued are considered, and only runs that are
    waiting, queued or running are closed. Finished runs keep their outcome.
  • Returns the number of wake-up calls cancelled.
  • It decides nothing about subjects or re-entry policies; that stays with the enrollment gate.
  • No migration, no change to the saved graph or the export format.

Until now a sibling addon had to write into automation_scheduled_jobs and automation_runs directly
to do this.