Repository navigation
[Fix] Automation schedules revert after edits during save - #3701
Open
roomote-roomote[bot] wants to merge 1 commit into
Open
roomote-roomote[bot] wants to merge 1 commit into
roomote-roomote[bot] wants to merge 1 commit into
Conversation
Contributor
|
No code issues found. See session Reviewed all five changed files, per-automation pending-state wiring, shared control compatibility, save/error handling, and the deferred-save regressions. Current-head CI: lint, types, docs, and app build passed; tests and JavaScript/TypeScript analysis are still running. Repository validation suites were not rerun locally. Reviewed 19b4d7f |
roomote-roomote
Bot
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
November 12, 2026 06:42
This was referenced Nov 12, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Internal built-in automation settings correctness work; no separate issue.
Why this PR exists
What changed
Built-in schedule controls accepted a newer selection while an earlier Save was pending, then silently replaced it with the saved response. The schedule Edit action and frequency selector now pause during that automation's save, including an editor already open when saving starts. A failed save restores editing with the submitted draft intact.
This wires existing per-automation pending state into the schedule-only controls and adds an optional disabled prop to the shared summary action. Event-style enable switches using the same component honor the same pending boundary. Normal choices, separate automation drafts and the existing layout remain; destination and additional-rules editing are outside this narrow lock. Eight added/three replaced production lines across existing controls, docs and two deferred-save regressions; no new state machine, API, schema, dependency or option. The independent contextual-label work in #3652 is not adopted.
How it was tested
73fc55cc7: actual Automations → Security Auditor → On-demand → Save, held by a real PostgreSQL row lock. Selecting Weekly while Saving is accepted, then the genuine response restores On-demand and removes the dirty footer. Database confirms On-demand.19b4d7f157329969e11c53927c3e239cdcd753c8: same pending-save path disables schedule Edit; committed-head replay confirms the guard and actual On-demand persistence. Separate Code Quality draft remains editable/unsaved after that save. Mobile already-open Weekly selector disables while pending; a temporary PostgreSQL trigger causes a real save failure, Weekly remains editable, removing the cause and clicking actual Save persists Weekly. The capture patch byte-matches the committed diff after hooks.Screenshots
Actual isolated runtime: collapsed desktop schedule Edit and already-open mobile selector while Save is pending:


After controlled DB failure, the same Weekly draft and Save are available. After removing the cause and retrying, the footer is clean; persistence was checked separately in PostgreSQL. No error toast is claimed from these frames:


Related PRs
Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locally (normal broad fast equivalents passed)pnpm changeset(bounded schedule-control fix)