feat(FN-5618): handle deleted source issues in TaskCard

Implements source issue delete handling in the task dashboard, including prompt-based user interaction for source-linked issues, new GitHub tracking state logic in `packages/dashboard/src/github-tracking-state.ts`, and corresponding test coverage, with documentation added to `docs/task-management.md

Fusion-Task-Id: FN-5618

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5618
This commit is contained in:
gsxdsm
2026-05-28 08:57:01 -07:00
parent 9969b0779b
commit e84673c632
6 changed files with 407 additions and 7 deletions

View File

@@ -714,6 +714,8 @@ When tracked tasks later move to `in-progress` or `done`, Fusion also posts a sh
When a tracked task moves into `done`, Fusion closes the linked GitHub issue with `state_reason: completed`; when it leaves `done` for an active column, Fusion reopens the issue with `state_reason: reopened`; and when the Fusion task is permanently deleted from the dashboard, Fusion now prompts for issue handling (`close`, `delete`, or `leave`). If no explicit choice is provided by API callers, Fusion preserves the legacy default and closes the linked issue with `state_reason: not_planned`.
For source-imported GitHub issues (`task.sourceIssue` / `sourceType: "github_import"`) without tracking metadata, delete now follows the same close/delete/leave prompt. The prompt references the source issue (`owner/repo#number`) and forwards the selected `githubIssueAction` through the existing delete route. For non-interactive callers that omit `githubIssueAction` (or send `"auto"`), the source-imported delete default is `close`.
GitHub authentication/settings are configured in [Settings Reference](./settings-reference.md) via `githubAuthMode` (`gh-cli` or `token`) and `githubAuthToken`.
## Completion Modes (`mergeStrategy`)