fix(FN-985): clear transient fields when archiving and moving tasks to done

- Clear prInfo, issueInfo, and modelPresetId in unarchiveTask to avoid stale badge/model data
- Clear prInfo, issueInfo, and modelPresetId in moveToDone after successful merge
- Add regression tests for transient field clearing in both code paths
- Fix existing tests to use public API instead of private methods
This commit is contained in:
gsxdsm
2026-04-05 15:53:48 -07:00
parent f4012fc5f2
commit 18c8fd9858
3 changed files with 74 additions and 0 deletions

View File

@@ -1610,6 +1610,7 @@ async function completeTask(
taskId: string,
result: MergeResult,
): Promise<void> {
mergerLog.log(`${taskId}: completeTask — clearing status, moving to done`);
// Clear transient status before moving to done
await store.updateTask(taskId, { status: null });
// Use moveTask for proper event emission