apply_changes: unified mutation tool — estimate/priority/assign/milestone, in-app + agent (#24) #53
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/apply-changes-assign-milestone"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Completes #24 — the propose-approve write path goes from label-only (est/p) to a unified mutation tool covering estimate, priority, assignee, and milestone, wired end-to-end: pure model → gitea client → bridge → in-app dialog + Reginald's tool. Assignee/milestone are exactly the gaps the dogfood run surfaced.
Engine (commit 1)
IssueChangegainsassign+remilestone;planIssueChangetyped to label kinds;isLabelChangenarrows; puresummarizeChangegives one confirm line for any kind.setIssueAssignees/setIssueMilestone;gitea:applyChangebranches label-swap vs field-write;ApplyChangeResult.planoptional.In-app + agent (commit 2)
propose_changetool + system prompt acceptassignee/milestone;proposalsFor+ newProposalContextskip no-ops and label the milestone;ChangeProposal.summary(always present) drives the chat proposal cards.listCollaborators()prepends the repo owner (/collaboratorsomits them — a solo-owner repo would otherwise have nobody assignable). Newgitea:collaboratorsbridge.Tests / verification
Base
Off
main; touchesissue-screen.tsx+global.d.ts, which PR #52 also edits in different regions — small rebase expected once #52 lands.🤖 Generated with Claude Code
The write path handled only the est/* and p/* label axes. Extend it to the two mutations dogfooding proved were missing — assignee and milestone — behind one unified change model: - IssueChange gains `assign` and `remilestone` kinds. `planIssueChange` is now typed to LabelChange (the label kinds only); `isLabelChange` narrows, and a new pure `summarizeChange(change, currentLabels?)` gives one confirm line for ANY kind (label kinds delegate to describeChange; field writes describe directly). - GiteaClient gains `setIssueAssignees` / `setIssueMilestone` (PATCH /issues/{n}, returning the updated issue; milestone 0 clears). - The main `gitea:applyChange` handler branches: label swaps resolve ids + setIssueLabels as before; field writes call the new client methods. Snapshot invalidated either way so board + forecast catch up. ApplyChangeResult.plan is now optional (absent for field writes). - issue-screen uses summarizeChange for its diff preview. Tests: +5 covering isLabelChange, and summarizeChange for assign/unassign, milestone set-by-title / by-id / removal, and label delegation. Full core suite 132 green; core + desktop typecheck clean. Follow-up (rest of #24): surface assignee/milestone pickers in the Adjust dialog and extend the agent's propose_change tool so Reginald can propose them too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>apply_changes: unify the mutation tool with assign + milestone (#24)to apply_changes: unified mutation tool — estimate/priority/assign/milestone, in-app + agent (#24)