From 457068f2e21a0d6faa565f950d0106bfd41d79cb Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 16 Nov 2026 17:25:53 +0100 Subject: [PATCH] fix: editing an automation the model created can move its runs to other dates (#34443) * fix: a repeating automation the model created opens with a Save button although nothing changed Opening a daily, weekly or monthly automation the model created in a chat showed Save right away, as if something had been edited, because the page took the start date such a schedule is saved with for a change of its own. Save now only shows once a field is edited. Fixes #34427 * fix: editing an automation the model created can move its runs to other dates An automation the model creates from a chat stores its repeating schedule with a start date. Editing only its name or another field on the automation's page dropped that start date. A schedule meant to start later then began running right away, and one that repeats every other week could move by a week. Editing other fields now leaves the schedule as it was, and changing the schedule itself saves the new one as before. Fixes #34430 --- src/lib/components/automations/AutomationEditor.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/components/automations/AutomationEditor.svelte b/src/lib/components/automations/AutomationEditor.svelte index 71dbecd0ed..41fb869fd0 100644 --- a/src/lib/components/automations/AutomationEditor.svelte +++ b/src/lib/components/automations/AutomationEditor.svelte @@ -144,13 +144,15 @@ } saving = true; try { + const rrule = scheduleDropdown.buildRrule(); const form: AutomationForm = { name: name.trim(), folder_id: target_type === 'channel' ? null : folder_id || null, data: { prompt: prompt.trim(), model_id: model_id.trim(), - rrule: scheduleDropdown.buildRrule(), + // An untouched schedule keeps its stored start date. + rrule: rrule === savedRrule ? automation.data.rrule : rrule, terminal: terminalServerId ? { server_id: terminalServerId, cwd: terminalCwd.trim() || undefined } : undefined,