Repository navigation
fix(mcp): send the task-position API the fields it reads - #629
Conversation
move_task and bulk_move_tasks sent target_view_id/target_status_id/target_position, which the task-positions endpoint ignores, so it set the source view's position to 0 and the tools still reported success. Option 1 from the issue: move_task now PUTs {position, group_key} to the single-task route, bulk_move_tasks PUTs {items:[{task_id,position,group_key}]} to the bulk route, and both schemas/descriptions say they set a task's order within a view. Sprint/status moves stay with update_task.
There was a problem hiding this comment.
ℹ️ No critical issues — one small consolidation suggestion inline, plus a docs note below. The fix matches the API contract and is well covered by tests.
Reviewed changes
move_taskandbulk_move_tasksnow match the API wire contract —move_tasktakes{projectId, viewId, taskId, position, groupKey?}and PUTs{position, group_key}to/views/{viewId}/task-positions/{taskId};bulk_move_taskstakesitems: [{taskId, position, groupKey?}]and PUTs{items}to/views/{viewId}/task-positions. Descriptions now state these set a task's order within one view (sprint/status stay withupdate_task), and both replies report what changed.PacaAPIViewsClientupdated — newmoveTaskPosition;bulkMoveTasksrewritten to hit the bulk route with anitemsbody.- Type changes — removed the duplicated
MoveTaskInput;BulkMoveTasksInputis now theitemsarray; addedMoveTaskPositionInput. - Tests — both routes asserted by URL and body, plus tool-level schema/mapping/reply assertions (including that
move_taskno longer calls the bulk method).
I verified the contract against services/api/internal/transport/http/dto/view_dto.go (MoveTaskRequest{position, group_key}, BulkMoveTasksRequest{items}), the routes in router.go:622-624, and the 204 responses the client already handles. The two touched suites pass (83 tests), npm run lint is clean, and the npx tsc --noEmit errors are confined to the unrelated member-tools.ts.
ℹ️ Tool reference docs still describe the pre-fix behavior
The tool descriptions in view-tools.ts were updated to make clear these tools only set an order within a view, but the tool documentation was not. docs/guides/mcp-server-setup.md:197 still tells users bulk_move_tasks "Moves all tasks to the new sprint" — the exact misunderstanding behind #610 — and apps/mcp/README.md:329 / apps/mcp/ALL_TOOLS.md:75-76 still describe them as generic moves. Updating the setup example is worth doing while the semantics are fresh.
Technical details
# Stale tool docs after the semantic fix
## Affected sites
- `docs/guides/mcp-server-setup.md:197` — "`bulk_move_tasks` - Moves all tasks to the new sprint" (never true, and contradicts the new description)
- `apps/mcp/README.md:329` — "`bulk_move_tasks` - Bulk move tasks in a view"
- `apps/mcp/ALL_TOOLS.md:75-76` — generic "move" wording for both tools
## Required outcome
- Docs reflect that both tools set a task's manual position within a single view, and that sprint/status changes use `update_task`.deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
bulkMoveTasks now delegates to bulkMoveViewTaskPositions so the items contract lives in one place, and the setup guide, README and ALL_TOOLS stop calling these tools sprint moves: they set a task's manual position in one view, and sprint/status changes use update_task.
|
Done in db7d522: |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run re-reviewed the delta since the prior pullfrog review (commit db7d522). Both prior concerns are addressed.
bulkMoveTasksnow delegates —PacaAPIViewsClient.bulkMoveTaskscallsbulkMoveViewTaskPositions(projectId, viewId, input.items)instead of duplicating the{ items }PUT, so the bulk contract lives in one place.- Tool docs reworded —
apps/mcp/README.md,apps/mcp/ALL_TOOLS.md, anddocs/guides/mcp-server-setup.mdnow describemove_task/bulk_move_tasksas setting a task's manual position within a view, with sprint/status changes handled byupdate_task.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
pikann
left a comment
There was a problem hiding this comment.
LGTM! Thank you for the contribution! 🚀

Fixes #610, option 1 from the issue.
Problem
move_taskandbulk_move_tasksPUT{ target_view_id, target_status_id, target_position }to the task-positions routes. The API reads{ position, group_key }(and{ items: [...] }for the bulk route), so it boundposition: 0and ignored the rest, while the tools replied "Task moved successfully".Fix
move_tasknow takesprojectId,viewId,taskId,position, optionalgroupKey, and PUTs{ position, group_key }to/views/{viewId}/task-positions/{taskId}.bulk_move_taskstakesprojectId,viewId,items: [{ taskId, position, groupKey? }]and PUTs{ items }to/views/{viewId}/task-positions.update_task.PacaAPIViewsClientgainsmoveTaskPosition;bulkMoveTasksnow calls the bulk route. The duplicatedMoveTaskInputtype is replaced accordingly.Testing
npx vitest runinapps/mcp: 631 passed.src/__tests__/api/views-client.test.tsasserts both request URLs and bodies;src/__tests__/tools/view-tools.test.tsasserts the new schemas, mapping and replies (including thatmove_taskno longer calls the bulk method).npx tsc --noEmitreports four errors in unrelated files (zodinference in other tool schemas), none in the files this PR touches.