refactor(FN-1353): simplify mission autopilot to single toggle

- Deprecate autoAdvance field in favor of autopilotEnabled as the sole control
- Remove autoAdvance guard logic from MissionAutopilot engine class
- Simplify MissionManager UI to use single autopilot toggle with visual state indicator
- Update MissionAutopilot tests to use autopilotEnabled instead of autoAdvance
- Update MissionManager component tests for simplified UI
- Update AGENTS.md documentation to reflect the simplified autopilot model
This commit is contained in:
gsxdsm
2026-04-09 13:45:19 -07:00
parent 4ef5d73ba1
commit e26321790c
7 changed files with 76 additions and 244 deletions

View File

@@ -1844,8 +1844,13 @@ export function createMissionRouter(
throw badRequest("No pending slices found");
}
// Set autoAdvance: true so activateSlice() will auto-triage features
missionStore.updateMission(missionId, { autoAdvance: true, status: "active" });
// Enable autopilot (and autoAdvance for backward compat) so the mission
// will auto-advance slices when autopilot is watching
missionStore.updateMission(missionId, {
autopilotEnabled: true,
autoAdvance: true, // kept for backward compat with existing mission data
status: "active",
});
// Activate the first pending slice (triggers auto-triage via activateSlice)
await missionStore.activateSlice(nextSlice.id);