From 6911e37c187eafa70643dbb3c70e1a5f571ec19d Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Mon, 13 Jul 2026 15:33:05 +0200 Subject: [PATCH] refactor(automation): improve automation UX --- .../automations-panel/AutomationForm.tsx | 17 +- .../automations-panel/OntimeActionForm.tsx | 30 +- .../panel/automations-panel/TriggersList.tsx | 2 +- .../template-input/TemplateInput.module.scss | 72 +++-- .../template-input/TemplateInput.tsx | 283 +++++++++++++++--- .../__tests__/templateInput.utils.test.ts | 53 +++- .../template-input/templateInput.utils.ts | 62 +++- .../template-input/useTemplateAutocomplete.ts | 72 +++++ .../__tests__/automation.validation.test.ts | 19 ++ .../__tests__/ontime.client.test.ts | 113 +++++++ .../api-data/automation/automation.service.ts | 2 +- .../automation/automation.validation.ts | 10 +- .../automation/clients/ontime.client.ts | 26 +- .../src/definitions/core/Automation.type.ts | 2 +- 14 files changed, 664 insertions(+), 99 deletions(-) create mode 100644 apps/client/src/features/app-settings/panel/automations-panel/template-input/useTemplateAutocomplete.ts create mode 100644 apps/server/src/api-data/automation/__tests__/ontime.client.test.ts diff --git a/apps/client/src/features/app-settings/panel/automations-panel/AutomationForm.tsx b/apps/client/src/features/app-settings/panel/automations-panel/AutomationForm.tsx index 1ce3da620..545a0e94d 100644 --- a/apps/client/src/features/app-settings/panel/automations-panel/AutomationForm.tsx +++ b/apps/client/src/features/app-settings/panel/automations-panel/AutomationForm.tsx @@ -293,8 +293,9 @@ export default function AutomationForm({ automation, onClose }: AutomationFormPr

Outputs

Automation outputs can be used to send data from Ontime to external software
- or to change properties of Ontime itself. - See the documentation for templates + or to change properties of Ontime itself.

+ Use Ontime runtime data in these fields with template strings. Type {'{{'} to see autocomplete, or{' '} + read the docs
{fieldOutputs.map((output, index) => { @@ -341,12 +342,17 @@ export default function AutomationForm({ automation, onClose }: AutomationFormPr
@@ -376,7 +382,7 @@ export default function AutomationForm({ automation, onClose }: AutomationFormPr