Prevent duplicate goal invocations from repeated Update clicks in Manage Scheduling Goals modal - #1975
Open
ttanveerRA231 wants to merge 1 commit into
Conversation
…date request is in flight Adds an in-flight guard to the Manage Scheduling Goals modal's Update button, mirroring the inFlight pattern in ChangePlanBoundsModal. Includes a unit test that holds the first request open and asserts a second click is a no-op (fails on unpatched code with 2 requests). Fixes NASA-AMMOS#1974 Co-Authored-By: Claude Fable 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.
Fixes #1974
Adds an in-flight guard to the Manage Scheduling Goals modal: an updatingGoals flag disables the Update button and short-circuits onUpdateGoals while effects.updateSchedulingGoalPlanSpecifications is in flight, so repeated clicks can no longer insert duplicate goal invocations. Follows the existing inFlight pattern in ChangePlanBoundsModal.
Includes a component test that holds the first update request open and clicks Update twice: on unpatched code it fails with two requests sent; with the guard it passes with one. svelte-check, ESLint, Prettier, and the full unit suite (871 tests) are clean.
Scoped deliberately to this modal per the issue — ManagePlanSchedulingConditionsModal and ManagePlanConstraintsModal share the same pattern and would make a good follow-up.