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
On some workspaces there's no automation linking the merged PR → issue, so the issue doesn't auto-close on merge and has to be closed by hand in the provider UI. A one-click "mark done" on the Crow session row removes that manual round-trip.
Current state / where it plugs in
Context menu: the session-row .contextMenu { … } is in Packages/CrowUI/Sources/CrowUI/SessionListView.swift. Add the new item there (gated on the session having a linked ticket).
Important distinction:TaskBackend.setTaskStatus(url:status:) is not the right call for GitHub here — for GitHub it runs a Projects-v2 board-column mutation (capability .projectBoardStatus), which sets a board status but does not close the issue. The user wants the issue closed. So add a dedicated close operation rather than overloading setTaskStatus(.done).
Proposed implementation
New TaskBackend method — func closeTask(url: String) async throws (name TBD), implemented per provider:
GitHubTaskBackend → gh issue close <url> (consider also moving the Projects-v2 card to Done if the repo has a board, but closing is the required behavior).
Jira backend → transition the work item to the mapped completed status: consult this workspace's jiraStatusMap (Settings UI to map Crow ticket states ↔ Jira workflow statuses #523) for the name mapped to Done/completed; fall back to "Done" when unmapped. Use the same transition path the backend already uses (transitionJiraIssue / jiraStatusName(for:)).
GitLabTaskBackend → glab issue close <url>.
StubCorveilTaskBackend → ProviderError.unimplemented (or no-op), consistent with the other optional ops.
Context-menu item in SessionListView.swift — e.g. "Mark Issue Done" (GitHub label could read "Close Issue", Jira "Mark Done") on the session row, calling closeTask(url:) for the session's linked ticket via the resolved backend. Show only when the session has a ticket link.
Session reflection (optional, decide in impl): after a successful close, optionally also set the Crow session status to completed (crow set-status … completed) so the row reflects the new state — or leave session status untouched and only act on the issue. Recommend in the PR.
Errors: surface failures (auth, transition not allowed, already closed) without crashing; best-effort, log + non-fatal toast/notice consistent with existing backend error handling.
Acceptance criteria
Right-clicking a session row with a GitHub ticket shows a "Close Issue" (done) item that closes the issue on GitHub.
Summary
Add a right-click context-menu item on a session row that moves the linked issue into its done/closed state:
gh issue close).jiraStatusMapfrom Settings UI to map Crow ticket states ↔ Jira workflow statuses #523; default "Done").Why
On some workspaces there's no automation linking the merged PR → issue, so the issue doesn't auto-close on merge and has to be closed by hand in the provider UI. A one-click "mark done" on the Crow session row removes that manual round-trip.
Current state / where it plugs in
.contextMenu { … }is inPackages/CrowUI/Sources/CrowUI/SessionListView.swift. Add the new item there (gated on the session having a linked ticket).TaskBackend(Packages/CrowProvider/Sources/CrowProvider/TaskBackend.swift), obtained viaProviderManager.taskBackend(for:host:)→GitHubTaskBackend/GitLabTaskBackend/ Jira backend.TaskBackend.setTaskStatus(url:status:)is not the right call for GitHub here — for GitHub it runs a Projects-v2 board-column mutation (capability.projectBoardStatus), which sets a board status but does not close the issue. The user wants the issue closed. So add a dedicated close operation rather than overloadingsetTaskStatus(.done).Proposed implementation
TaskBackendmethod —func closeTask(url: String) async throws(name TBD), implemented per provider:GitHubTaskBackend→gh issue close <url>(consider also moving the Projects-v2 card to Done if the repo has a board, but closing is the required behavior).jiraStatusMap(Settings UI to map Crow ticket states ↔ Jira workflow statuses #523) for the name mapped toDone/completed; fall back to "Done" when unmapped. Use the same transition path the backend already uses (transitionJiraIssue/jiraStatusName(for:)).GitLabTaskBackend→glab issue close <url>.StubCorveilTaskBackend→ProviderError.unimplemented(or no-op), consistent with the other optional ops.SessionListView.swift— e.g. "Mark Issue Done" (GitHub label could read "Close Issue", Jira "Mark Done") on the session row, callingcloseTask(url:)for the session's linked ticket via the resolved backend. Show only when the session has a ticket link.completed(crow set-status … completed) so the row reflects the new state — or leave session status untouched and only act on the issue. Recommend in the PR.Acceptance criteria
jiraStatusMap; "Done" fallback).Dependencies / notes
jiraStatusMap) supplies the Crow→Jira status-name mapping the Jira path should consult; until it lands, default the Jira target to "Done". Coordinate ordering with Settings UI to map Crow ticket states ↔ Jira workflow statuses #523 / Replace acli with the official Atlassian Remote MCP Server for Jira (fixes assignment + headless automation) #522 (PR Replace acli with the official Atlassian Remote MCP Server for Jira (#522) #524).TaskCapabilitypattern (ADR 0005) — branch on capability/backend, notif provider == .github.