Tenant email sends link to task and automation

Task 9458 · Done · Coder · created · updated

`tenant_email_sends.task_id` and `.automation_run_id` are UUID columns (Task 9422, seam S7), but `tasks.id` and `trigger_deliveries.id` are integers. So an event automation's Send email (Task 9425) records no `automation_run_id`, and the agent send tool (C8) cannot store its `task_id` either. - Make `task_id` an integer that references the task, so a send links to the task that sent it. - Give an event run's send a reference to its delivery as well as the schedule run's `cron_runs` id, for example a separate `trigger_delivery_id`, so every automation send links to its run. - Show the source (task or automation run) on the connection's **Sent** tab as a link. Out of scope: changing `tenant_gmail.send`'s behaviour beyond the id types; the delivery log for system mail. Done means: - A send from a schedule run, an event run and an agent task each shows a working link to its source on the Sent tab. - The migration is additive-compatible while two releases overlap.

Outcome

Event-run sends now record trigger_delivery_id; the Sent tab links each send to its task or automation run, with ⋯ on phones. Quick gate green, review lanes pass. PR #6779 queued. Draft #9516 filed. Memory: used mem-15203, mem-23434; proposed none.

Pull request

Artifacts

Activity

  • Created
  • Run
  • Runner started
  • Runner ended (done)