Repository navigation
fix(mcp): make move_task/bulk_move_tasks match the task-positions API - #632
Closed
DreamchaserLG wants to merge 3 commits into
Closed
DreamchaserLG wants to merge 3 commits into
DreamchaserLG wants to merge 3 commits into
Conversation
…closes Paca-AI#610) move_task and bulk_move_tasks sent target_view_id/target_status_id/ target_position, which the API's MoveTaskRequest (position, group_key) ignores entirely — so the endpoint upserted position 0 in the source view and the tools reported 'Task moved successfully' without anything moving (see Paca-AI#610). Align both tools with the task-positions API (reorder-only, as agreed in the issue): move_task takes {viewId, taskId, position, groupKey?}, bulk_move_tasks takes an items array and calls the bulk route. Cross- view/sprint/status moves now point to update_task. Tool descriptions and the mcp-server-setup guide example updated accordingly. Co-authored-by: ZCode Scout <noreply@zcode.local>
Flagged by biome lint/correctness/noUnusedImports; the type is exported from types/index.ts for external consumers, the client method takes primitives.
Contributor
|
Fixed in #629. Thanks a lot for your contribution, we really appreciate it! |
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.
Summary
move_taskandbulk_move_taskssenttarget_view_id/target_status_id/target_position— none of which the task-positions API recognizes (MoveTaskRequestbinds onlyposition+group_key). Every call bound asposition: 0, upserted position 0 in the source view, returned 200, and the tools reported "Task moved successfully" while the task never moved.This PR implements option 1 (reorder-only) as agreed in #610. Closes #610.
Type of Change
Root cause & changes
PacaAPIViewsClient.bulkMoveTaskshit the single-task route (PUT .../task-positions/{taskId}) with fields the API'sMoveTaskRequestdoesn't know;bulk_move_tasksalso called the single-task route instead of the bulk route (PUT .../task-positionswith{ items }).moveTaskPosition(projectId, viewId, taskId, position, groupKey?)with the correct body;bulk_move_tasksnow mapsitems: [{ taskId, position, groupKey? }]through the existingbulkMoveViewTaskPositionsbulk-route helper.update_taskfor that"); success replies now state what actually changed.BulkMoveTasksInput/MoveTaskInputwithMoveTaskPositionItem, mirroring the backend'sBulkMoveTaskItemDTO.mcp-server-setupexample claimingbulk_move_tasks"Moves all tasks to the new sprint" — the exact misconception reported in the issue.Breaking change
Both tools' input schemas change:
targetViewId/targetStatusId/targetPositionare removed,positionis required, andbulk_move_taskstakesitems. As noted in #610, callers passingtargetViewIdwere already getting a silent no-op (position reset to 0), so there is no working behavior to preserve.Testing
biome lintandtsc --noEmit(deps aligned tobun.lock): clean.vitest run: 635 passed (baseline 630; +5 covering client route/body shapes — including omitted vs explicit-nullgroup_key— tool argument mapping, empty-itemsand missing-positionrejection, and reply wording).views-client.ts92.3→92.52% stmts / 73.91→74.64% branch;view-tools.ts100% stmts.apps/e2e,apps/web,services/agent-runnerhave zero references to the old schema; audited all 67 MCP client endpoints against the Go route table — no remaining route/field mismatches after this fix.Checklist