Conversation
…ation Prevents duplicate Agreements and Actions from being created when the Save button is clicked multiple times during backend latency. Wires existing isLoading state from useAgreementMutation and useActionMutation hooks through CoachingTabsContainer to both AgreementsList and ActionsList components. The Save/Update button is now disabled with a spinner while the mutation is in flight, and Enter key submission is also guarded. Fixes #281
…lete Replace silent throw-and-forget error handling with user-facing toast notifications via sonner. Covers all mutation paths: create, update, delete for both Agreements and Actions, plus the completion toggle checkbox on Actions. Add 7 new tests verifying toast.error is called with the correct message on each failure path.
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.
Description
Prevents duplicate Agreements and Actions from being created or updated when the Save/Update button is clicked multiple times during backend latency. The Save/Update button is now disabled with a spinner while the mutation is in flight. Failed operations now display a user-facing error toast via sonner.
GitHub Issue: Fixes #281
Changes
isLoadingstate fromuseAgreementMutationanduseActionMutationhooks throughCoachingTabsContainerto both list components asisSavingpropLoader2spinner icon anddisabledstate to Save/Update buttons in bothAgreementsListandActionsListtoast.error()notifications for failed save, update, and delete operations on both Agreements and Actions (including the completion toggle checkbox)throw errre-throws with user-facing toast messagesisSavingprop in mockPropsScreenshots / Videos Showing UI Changes (if applicable)
None, trivial chanages
Testing Strategy
Concerns
isLoadingfromuseEntityMutation) that was already being tracked but not surfaced to the UI. The toast uses the same sonner pattern already established across the codebase.