fix: Clear currentTaskId when reverting tasks in auto mode service

- Added logic to clear the currentTaskId for a feature if it points to a reverted task, improving task management and logging clarity.
This commit is contained in:
Shirone
2026-01-25 11:47:30 +01:00
parent df7024f4ea
commit 6a3993385e

View File

@@ -552,6 +552,13 @@ export class AutoModeService {
logger.info(
`[resetStuckFeatures] Reset task ${task.id} for feature ${feature.id} from in_progress to pending`
);
// Clear currentTaskId if it points to this reverted task
if (feature.currentTaskId === task.id) {
feature.currentTaskId = undefined;
logger.info(
`[resetStuckFeatures] Cleared currentTaskId for feature ${feature.id} (was pointing to reverted task ${task.id})`
);
}
}
}
}