Batch multi-selection actions into single requests#2125
Merged
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>
The action panel subscribed, unsubscribed and set thumbnails one task at a time. Route each through the new batch endpoints: one request for the whole selection, then the matching store updates (subscription flag per task, main preview mapped back to each task through its entity id). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adding, editing, deleting or reordering an all-projects metadata column fanned out one request per production. Route each through the new all-projects endpoints: one request applies the operation server-side across every accessible project, then the returned descriptors (or removed ids) drive the local store updates. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The production settings pages saved task type and task status order one link request per row. Send the ordered id list to the new batch reorder routes instead, a single request per drag. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…uest The global task types page and the project template settings saved order one request per row. Send the ordered id list to the new batch reorder routes instead, a single request per drag. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The batched per-assignee assign requests were fired with Promise.all; run them sequentially instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The playlist stores (entity_id, preview_file_id) couples, so the same entity may appear several times. Send couples instead of a bare entity id list; with no preview_file_id the server resolves each entity's latest preview for the playlist task type. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The task-type-links and task-status-links batch routes were renamed to /reorder in zou for consistency with the other reorder routes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reorders are actions in zou now: task types, project links, templates and all-projects descriptors reorder routes moved from /data to /actions. 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.