Repository navigation
fix(ui): save recipes that have warnings - #244
Merged
Merged
Conversation
RecipeCoordinator.SaveRecipeAsync rejected every recipe whose session IsValid was false, and IsValid is false on any warning. A half-built loop, a loop start without its end or an end without a start, blocked Save, so the exit, New and Open prompts in practice offered only "Не сохранять". Save no longer checks validity. Since a failed load leaves the session unchanged, the session always holds an analyzed recipe, so warnings save and the file opens again with the same warnings. Writes to the PLC keep their own gate on IsValid. The hard-coded English rejection text goes with the old gate. The exit, New, Open and Save failure tests used an unclosed loop to make the save fail; they now fail on a real file system error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
A recipe with any analysis warning could not be saved.
RecipeCoordinator.SaveRecipeAsyncrejected the save whenRecipeSession.IsValidwas false, andIsValidis false on any warning. A half-built loop, a loop start without its end or an end without its start, therefore blocked Save, so the exit, New and Open prompts in practice offered only "Не сохранять". The rejection text was also hard-coded English.What changed
PlcSyncCoordinator.NotifyRecipeChanged).docs/readme.mdsection 3.5 says a recipe with warnings can be saved.This is Task 2 of
docs/plans/20261130-recipe-replace-save-exit-safety.md.Verification
dotnet format --verify-no-changesclean.IsValid=falsefor such a recipe.🤖 Generated with Claude Code