#11386·windmill

[Bug] "Unsaved changes" alert falsely persists due to `enabled` field being excluded from saved-state comparison baseline

Author: YashKushalvardhanCreated Sep 27, 2026Updated Oct 1, 2026

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

  1. Create and save a Schedule
  2. Navigate away (e.g. to Runs) and back to Schedules
  3. Click Edit on the schedule
  4. Observe "You have unsaved changes" already showing, even with no manual edits made
  5. Click "Show diff" — note the enabled field differs between the two sides
  6. Click the enable/disable toggle in the panel header (triggers its own save + toast confirmation)
  7. Open "Show diff" again — the enabled field mismatch is still there, just flipped
  8. 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