Files
ontime/tasks/automation-composer-todo.md
T
2026-09-13 20:12:55 +02:00

5.4 KiB

Automation UI Foundation and Global Composer Tasks

PR 1 — automation UI foundation

Completed implementation

  • Start from clean master and retain the mixed branch as reference only.
  • Keep automation create/edit payloads definition-only.
  • Preserve global and event trigger references when definitions are edited.
  • Refuse deletion of definitions referenced by global triggers or rundown events.
  • Reject trigger bindings submitted to definition CRUD.
  • Persist normalized output values returned by server validation.
  • Support the full filter-operator contract, including not_contains.
  • Extract focused OSC, HTTP, Ontime, and output-card form components.
  • Add honest per-output test success/error feedback and failed-save retry behavior.
  • Add shared lifecycle labels and output summaries.
  • Clarify global trigger scope, duplicate behavior, and missing references.
  • Improve event trigger lifecycle labels and output visibility.
  • Keep recipes, composer code, and lifecycle-on-definition state out of the PR.
  • Cover shared lifecycle labels, the full filter-operator contract, controller rejection of trigger fields, and definition output replacement with focused regression tests.

Required before merge

  • Accept IPv6 OSC targets as well as IPv4 and hostnames.
    • Add a parser regression test using an IPv6 target such as ::1.
    • Keep runtime-template hostname support and normalized persistence intact.
  • Remove stale output-form styles that no rendered component references.
    • oscSection
    • httpSection
    • actionSection
    • outputCard
    • nested test
  • Run the browser smoke check:
    • create and edit a definition;
    • add, remove, and test OSC, HTTP, and Ontime outputs;
    • retry a save after a server error;
    • create/edit a global trigger;
    • attach the same definition to an event;
    • verify missing and duplicate states;
    • verify narrow-panel horizontal scrolling and sticky headers.
  • Show the concise server validation message after a failed save instead of the full raw 422 response and submitted definition; keep the form open and retryable.
  • Re-run final verification and inspect the final diff for temporary code, stale comments, generated files, and recipe/composer leakage.

Verification already observed

  • Server test pipeline: 51 files passed; 778 tests passed; 6 todo.
  • Client test pipeline: 34 files passed; 276 tests passed.
  • Client and server type checks passed.
  • Client and server lint passed.
  • Format check passed.
  • Client and server builds passed with only existing Vite warnings.
  • git diff --check master...HEAD passed.

PR 1 checkpoint

  • IPv6 compatibility and stale-style cleanup are committed to their owning commits.
  • Added PR 1 regression coverage is committed separately from production behavior.
  • Browser smoke check is recorded.
  • PR 1 is self-sufficient and ready for human review.

PR 2 — global automation composer and recipes

Task 1: Define the composition contract

  • Add a create-only command containing a definition plus zero or more global lifecycles.
  • Return the created definition and trigger bindings.
  • Keep persisted Automation and Trigger entities and ordinary CRUD unchanged.
  • Document that zero lifecycles saves a reusable definition only.

Task 2: Add atomic global composition creation

  • Validate the definition and every lifecycle before writing.
  • Normalize or reject duplicate lifecycle inputs consistently.
  • Assign IDs and persist the definition and bindings in one settings write.
  • Test success, invalid input, duplicate inputs, and no-partial-write failure behavior.

Task 3: Build the manual composer

  • Present separate Global trigger, Conditions, and Actions sections.
  • Reuse the PR 1 output editor components where their contracts fit.
  • Support multiple global lifecycles and definition-only save.
  • Test failed-save retry and refresh of both definitions and triggers.

Task 4: Move recipes onto the composer

  • Restore the recipe catalog and parameter setup without restoring trigger ownership to definitions.
  • Make every recipe declare global lifecycle defaults explicitly.
  • Submit manual and recipe flows through the same composition command.
  • Test representative OSC, HTTP, and Ontime recipes.

Task 5: Evaluate complete usage counts

  • Implement a pure aggregation over global triggers and all project rundowns.
  • Test zero usage, both scopes, multiple rundowns, duplicates, and missing references.
  • Confirm the read path performs no repeated per-definition scans or persisted counting.
  • Ship the UI count only if both global and event usage are complete and cheap; otherwise record the decision to defer it.

Task 6: Integrate and verify

  • Keep event-scoped recipes and event-composer navigation absent.
  • Verify disabled automations, errors, modal keyboard behavior, and narrow layouts.
  • Run full tests, type checks, lint, formatting, and builds.
  • Review the final diff for stale compatibility code and scope leakage.

PR 2 checkpoint

  • Manual and recipe flows create global compositions atomically.
  • Reusable definitions remain independently editable and attachable in both scopes.
  • Usage information is complete or intentionally omitted.
  • PR 2 is ready for human review.