fix: Clear planSpec.currentTaskId instead of feature.currentTaskId in resetStuckFeatures

Address CodeRabbit review comment: The reset logic was incorrectly
clearing feature.currentTaskId (which doesn't exist on Feature type)
instead of feature.planSpec.currentTaskId. This left planSpec.currentTaskId
stale, causing UI/recovery to still point at reverted tasks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Shirone
2026-01-25 13:42:07 +01:00
parent 895e4c28ba
commit 2a24377870

View File

@@ -553,10 +553,10 @@ export class AutoModeService {
`[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;
if (feature.planSpec?.currentTaskId === task.id) {
feature.planSpec.currentTaskId = undefined;
logger.info(
`[resetStuckFeatures] Cleared currentTaskId for feature ${feature.id} (was pointing to reverted task ${task.id})`
`[resetStuckFeatures] Cleared planSpec.currentTaskId for feature ${feature.id} (was pointing to reverted task ${task.id})`
);
}
}