feat(ui): improved canvas/queue error handling #7451
Merged
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.
Summary
Improve error handling and logging for:
Minor additional changes:
enqueueRequested
graph building RTK Q listenerRelated Issues / Discussions
offline discussion
QA Instructions
These improvements should prevent canvas from getting stuck in a various processing states when an operation fails.
To test this, you could try this diff, which makes most uploads from within the app fail. This (hopefully) replicates a spotty/dropped network connection. There are other ways that canvas operations could fail, but this is the easiest way to induce this class of error.
Then try a transform & apply, filter, select object or crop to bbox.
Before this PR: the canvas will get stuck with a grey-ed out Invoke button. The Invoke button tooltip will show a message like
Canvas is busy (rasterizing)
(maybe others if you were filtering or select-objecting).After this PR: you should see a toast saying which operation failed, then the canvas recovers gracefully, leaving you back in the state you were in before you started the failed operation.
So for example, if it was applying a transform that failed, you should get a toast saying
Failed to apply transform
and the layer you were transforming should revert to the state it was in before you started the transform.Merge Plan
Checklist