You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(platform): a refused task-board drag leaves the card in the new column #4838
When the server refuses a task-board drag to another column, the card stays where it was dropped. mainacd5dbd10, paths under services/platform/app/:
The local move:features/tasks/hooks/use-task-board-dnd.ts:300 moves the card in local state on drop. The columns resync from props only when the task list itself changes (:230-232).
The write: a cross-column move runs moveTask.mutate(…) (:323-324, :335-337), with no onError of its own.
No refresh on refusal: the shared mutation hook invalidates reads on success. After a failure it invalidates only when the write declares refusalInvalidates (hooks/use-backend-mutation.ts:67-84), and tasks/mutations:moveTask doesn't (lib/backend/tasks.ts:961-964).
What the user sees: for example, dragging a parent with open subtasks to Done shows the generic "Couldn't finish that action" toast. The task modal maps the same refusal to "Finish all subtasks before closing this task." The card stays in Done while the server keeps the old status, until the list changes for another reason or the page reloads.
Expected
On a refused or failed move, restore the columns (setColumns(columnsFromProps), as the blocked choreography path already does at :338), or give moveTask a refusalInvalidates so the board refetches.
Map the known refusals (open subtasks, archived project) to the sentences the task modal already uses.
Regression: a board test where moveTask rejects. The card must return to its column and the mapped reason must show. On acd5dbd10 it stays moved.
Severity and owner
Severity: medium. The board shows a status the server didn't save.
Found by: Review A (TALE-358), 2026-10-12 08:15 Zurich occurrence, oldest-due projects.tasks.board slice. Static reading at acd5dbd10; I didn't run it.
Addendum (Review A, TALE-358, 2026-10-12 16:15 Zurich occurrence): two more ways the same status change goes unsaved or skips its automation, at main4cde0834a. Paths are under services/platform/app/features/tasks/.
A failed read inside the choreography drops the change without a word.
hooks/use-task-status-choreography.ts awaits three reads outside any try: the agent's latest run (:213), the automation's live run (:242) and the task detail (:264). If one fails, the promise rejects.
Board:hooks/use-task-board-dnd.ts:335-340 runs void choreograph(…).then(…).finally(…) with no catch. Neither the move ('move') nor the snap-back ('blocked') runs, and nothing is shown. The card stays in the dropped column with nothing saved, the same end state as the refused write above.
Task modal: the status picker (components/task-modal.tsx:2236-2242) awaits it inside void (async () => …)(), also without a catch. The pick does nothing and says nothing.
While the automation listings are loading or have failed, automation-owned tasks are treated as human-owned.
useTaskContractAutomations returns [...(projectQuery.data ?? []), ...(orgQuery.data ?? [])] (hooks/use-task-subject-contract.ts:84-87). resolveTaskOwnership (:225-258) then finds no contract and returns human, including for an app-assigned task.
The choreography doesn't check useTaskContractAutomationsPending; only the actor directory does (hooks/use-actor-directory.ts:94). So dragging an automation's card to In progress just moves it, and no run starts. Moving it out of In progress sends a plain move instead of the stop write (plan.kind === 'cancel'), so a live run is not cancelled by the move.
Expected:
Catch a failed choreography read, revert the optimistic move and say why (the blocked path plus a toast).
Hold automation-owned moves, or refuse them with a reason, while the listings are pending or failed. Don't classify them as human-owned.
Regression:
A board test where getLiveRunForTask rejects: the card returns to its column and a message shows.
A test where the automation listing fails, then an app-assigned card is dragged to In progress: no plain moveTask is sent.
On 4cde0834a the card stays moved in the first case, and a plain move is sent in the second.
Also, minor: the modal's status hints name the automation by its slug (task-modal.tsx:2231-2233, name: ownedBy.automationSlug), while the toasts for the same action use displayName.
This is static reading, verified at the cited lines. I didn't run it.
Addendum 2 (Review A, TALE-358, 2026-10-13 00:15 Zurich occurrence): the lane quick-add shows the server's English sentence. maindf7cd70f7.
services/platform/app/features/tasks/components/lane-quick-add.tsx:118-125 toasts common.errors.generic with failureDetail(error) as the description for any refused quick-add.
When a lane belongs to an assignee who can't see the project, for example a member removed from its team, the server refuses with ASSIGNEE_NO_PROJECT_ACCESS and the English sentence "Assignee lacks access" (backend/domains/tasks/service.ts:1022-1026, :1036-1040).
No catalog or client code maps that code, so German and French users get English under a generic title, and nobody is told how to fix it: pick another assignee, or give the person access.
Expected: map ASSIGNEE_NO_PROJECT_ACCESS, together with the refusals listed above, to localized sentences that name the next step, for the quick-add, the drag and the task modal alike.
This is static reading, verified at the cited lines. I didn't run it.
Activity
yannickmonney commentedon Oct 12, 2026
Addendum (Review A, TALE-358, 2026-10-12 16:15 Zurich occurrence): two more ways the same status change goes unsaved or skips its automation, at
main4cde0834a. Paths are underservices/platform/app/features/tasks/.hooks/use-task-status-choreography.tsawaits three reads outside anytry: the agent's latest run (:213), the automation's live run (:242) and the task detail (:264). If one fails, the promise rejects.hooks/use-task-board-dnd.ts:335-340runsvoid choreograph(…).then(…).finally(…)with nocatch. Neither the move ('move') nor the snap-back ('blocked') runs, and nothing is shown. The card stays in the dropped column with nothing saved, the same end state as the refused write above.components/task-modal.tsx:2236-2242) awaits it insidevoid (async () => …)(), also without acatch. The pick does nothing and says nothing.useTaskContractAutomationsreturns[...(projectQuery.data ?? []), ...(orgQuery.data ?? [])](hooks/use-task-subject-contract.ts:84-87).resolveTaskOwnership(:225-258) then finds no contract and returnshuman, including for an app-assigned task.useTaskContractAutomationsPending; only the actor directory does (hooks/use-actor-directory.ts:94). So dragging an automation's card to In progress just moves it, and no run starts. Moving it out of In progress sends a plain move instead of the stop write (plan.kind === 'cancel'), so a live run is not cancelled by the move.Expected:
blockedpath plus a toast).Regression:
getLiveRunForTaskrejects: the card returns to its column and a message shows.moveTaskis sent.4cde0834athe card stays moved in the first case, and a plain move is sent in the second.Also, minor: the modal's status hints name the automation by its slug (
task-modal.tsx:2231-2233,name: ownedBy.automationSlug), while the toasts for the same action usedisplayName.This is static reading, verified at the cited lines. I didn't run it.
yannickmonney commentedon Oct 12, 2026
Addendum 2 (Review A, TALE-358, 2026-10-13 00:15 Zurich occurrence): the lane quick-add shows the server's English sentence.
maindf7cd70f7.services/platform/app/features/tasks/components/lane-quick-add.tsx:118-125toastscommon.errors.genericwithfailureDetail(error)as the description for any refused quick-add.ASSIGNEE_NO_PROJECT_ACCESSand the English sentence "Assignee lacks access" (backend/domains/tasks/service.ts:1022-1026,:1036-1040).Expected: map
ASSIGNEE_NO_PROJECT_ACCESS, together with the refusals listed above, to localized sentences that name the next step, for the quick-add, the drag and the task modal alike.This is static reading, verified at the cited lines. I didn't run it.
fix(platform): put a refused board drag back in its column