Batch multi-selection actions into single requests#2125
Open
frankrousseau wants to merge 8 commits into
Open
Conversation
The action panel and the task list fired one clear-assignation request per selected task. The route accepts a task id list, so send a single request for the whole selection. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The schedule distribution fired one unassign and one assign request per task, defeating the batch routes. Accumulate task ids during the distribution loop, then send one clear-assignation request plus one assign request per assignee. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Creating a shot, asset, sequence, episode or edit fired one create-task request per production task type. Use the entity tasks route, which accepts the task type id list, to create them all in one request. As a side effect, episode and sequence creation no longer sweeps every entity of the project through the id-less create-tasks route. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
runPromiseAsSeries received already-created promises, so the underlying requests fired in parallel and only completion was chained. Convert its call sites to runPromiseMapAsSeries, which creates each promise after the previous one resolves, and drop the misleading helper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adding a selection, an episode or a whole movie to a playlist fired two requests per entity (preview files fetch plus a full playlist rewrite), racing against concurrent edits. Use the new add-entities action route: one request for the batch, then one playlist reload to refresh the player. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deleting a selection of assets, shots, edits or concepts fired one DELETE request per entity, in series. Use the new delete-entities action route: one request for the whole selection, then the same cancel-or-remove store updates as before. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adding an asset to a selection, removing it from the selection and pasting a casting fired one full-replace request per selected entity. Apply the local casting changes first, then persist them all through the new batch entities casting route in a single request. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
changeSelectedPriorities issued one update request per selected task, in series. Use the new set-priority action route to update the whole selection in a single request, then apply the returned tasks to the store. 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.
Problem
runPromiseAsSeriesreceived already-created promises, so its call sites fired in parallel despite reading as serialized; the "add movie" playlist path also rewrote the whole playlist once per shot, racing against concurrent edits.Solution
runPromiseAsSerieswith real serialization (runPromiseMapAsSeries), which creates each promise only after the previous resolves, and drop the misleading helper.