Skip to content

Prevent duplicate goal invocations from repeated Update clicks in Manage Scheduling Goals modal - #1975

Open
ttanveerRA231 wants to merge 1 commit into
NASA-AMMOS:developfrom
ttanveerRA231:fix/manage-goals-duplicate-invocations
Open

Prevent duplicate goal invocations from repeated Update clicks in Manage Scheduling Goals modal#1975
ttanveerRA231 wants to merge 1 commit into
NASA-AMMOS:developfrom
ttanveerRA231:fix/manage-goals-duplicate-invocations

Conversation

@ttanveerRA231

Copy link
Copy Markdown

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.

…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>
@ttanveerRA231
ttanveerRA231 requested a review from a team as a code owner July 20, 2026 17:59
@ttanveerRA231 ttanveerRA231 changed the title Prevent duplicate goal invocations when Update is clicked while an up… Prevent duplicate goal invocations from repeated Update clicks in Manage Scheduling Goals modal Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Double-clicking "Update" in the Manage Scheduling Goals modal creates duplicate goal invocations

1 participant