[Bug] "Unsaved changes" alert falsely persists due to `enabled` field being excluded from saved-state comparison baseline
Describe the bug
The Schedule edit panel shows a persistent "You have unsaved changes"
alert even immediately after a successful save, and "Discard" has no
effect. Inspecting the diff (via "Show diff") reveals the root cause:
the enabled field is missing from one side of the comparison,
causing a constant mismatch between the saved schedule state and the
form's tracked state.
This happens because the "enable/disable" quick-toggle (in the Edit
panel header) performs its own immediate save (confirmed via a toast:
"enabled schedule "), but this change is not synced into the
baseline used for the "unsaved changes" diff. As a result, the diff
permanently shows enabled: true/missing enabled as a phantom
difference, even though nothing is actually unsaved.
Steps to reproduce
- Create and save a Schedule
- Navigate away (e.g. to Runs) and back to Schedules
- Click Edit on the schedule
- Observe "You have unsaved changes" already showing, even with no manual edits made
- Click "Show diff" — note the
enabledfield differs between the two sides - Click the enable/disable toggle in the panel header (triggers its own save + toast confirmation)
- Open "Show diff" again — the
enabledfield mismatch is still there, just flipped - Click "Discard" — observe no visible effect; the alert remains
Expected behavior
- The enable/disable toggle's save should update the baseline used for unsaved-changes comparison, so it doesn't cause a permanent phantom diff
- "Discard" should either resolve the alert or have a clear, visible effect
Actual behavior
The enabled field is inconsistently tracked between the saved state
and the form state, causing a false "unsaved changes" alert that
persists indefinitely and that "Discard" cannot clear.
Environment
- Windmill version: CE v1.818.0-7-g47525b211a
- Deployment: Docker Compose (local)
- OS: Windows
- Browser: Chrome
Screen recording
https://github.com/user-attachments/assets/acfefc0f-b098-46d3-846d-00f111d5f517
Source: windmill-labs/windmill