feat(FN-1010): add mission start endpoint and UI button

- Add POST /api/missions/:missionId/start backend endpoint to start planning missions
- Add startMission() frontend API function in dashboard api.ts
- Add Start button in MissionManager component for planning missions
- Add integration tests for the startMission endpoint covering success, error, and edge cases
This commit is contained in:
gsxdsm
2026-04-06 00:08:39 -07:00
parent 1c76e25aa8
commit 2eae2834f4
4 changed files with 238 additions and 0 deletions

View File

@@ -2654,6 +2654,13 @@ export function stopMission(missionId: string, projectId?: string): Promise<Miss
});
}
/** Start a planning mission: sets status to "active" and activates the first pending slice */
export function startMission(missionId: string, projectId?: string): Promise<MissionWithHierarchy> {
return api<MissionWithHierarchy>(withProjectId(`/missions/${encodeURIComponent(missionId)}/start`, projectId), {
method: "POST",
});
}
// ── Mission Autopilot API ────────────────────────────────────────────────
/** Fetch autopilot status for a mission */