fix(studio): surface save failures when deleting all animations for an element#1411
Closed
calcarazgre646 wants to merge 1 commit into
Closed
Conversation
…n element `deleteAllForSelector` fired its mutation with `void commitMutation(...)`, so a failed "Delete all animations for element" was swallowed: no error toast and no `trackGsapSaveFailure` telemetry, leaving the user believing it worked. Every sibling mutation in the hook (`deleteGsapAnimation`, `removeGsapProperty`, `removeAllKeyframes`, etc.) routes through `commitMutationSafely`, which catches the rejection and surfaces it. Route this one through the same wrapper. It is a single user action (one context-menu invocation per element), so the failure toast fires at most once, with no spam.
Collaborator
|
Closing — the function this PR claims to fix ( Happy to reopen if evidence of the issue is provided. |
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
deleteAllForSelectorinuseGsapScriptCommitsfired its mutation withvoid commitMutation(...):A failed "Delete all animations for element" was therefore swallowed — no error toast and no
trackGsapSaveFailuretelemetry — leaving the user believing the operation succeeded. Every sibling mutation in the hook (deleteGsapAnimation,removeGsapProperty,removeAllKeyframes,updateGsapProperty, …) routes throughcommitMutationSafely, which.catches the rejection, recordstrackGsapSaveFailure, and shows an error toast. This one handler was the only mutation that did not.Fix
Route
deleteAllForSelectorthroughcommitMutationSafely, matching its siblings. It is a single user action (one context-menu invocation per element), so the failure toast fires at most once — no spam.Notes
studio/srcfor the same fire-and-forget pattern: this was the only user-facing mutation that surfaced nothing. The remaining barecommitMutationcalls either return the promise for the caller to handle or have their own.catch(trackGsapSaveFailure).commitMutationSafelywrapper that ~10 sibling handlers rely on.