feat(FN-1152): add retry flows for failed AI planning sessions

- Keep errored AI sessions retryable in the session store and add backend retry handlers for planning, subtask breakdown, and mission interview flows
- Add retry API routes and dashboard API client helpers for planning, subtask, and mission interview session retries
- Update PlanningModeModal, SubtaskBreakdownModal, MissionInterviewModal, and background session handling to show error states with retry/cancel UX
- Expand unit and integration tests across store, services, routes, and modal components to cover retry success and failure paths
This commit is contained in:
gsxdsm
2026-04-08 15:10:46 -07:00
parent 5f53949e2a
commit e80fb448d4
20 changed files with 1368 additions and 234 deletions

View File

@@ -40,11 +40,12 @@ export function useBackgroundSessions(projectId?: string): UseBackgroundSessions
next[idx] = updated;
return next;
}
// New session — only add if active
// New session — include in-progress, complete, and retryable error sessions
if (
updated.status === "generating" ||
updated.status === "awaiting_input" ||
updated.status === "complete"
updated.status === "complete" ||
updated.status === "error"
) {
return [updated, ...prev];
}
@@ -77,7 +78,11 @@ export function useBackgroundSessions(projectId?: string): UseBackgroundSessions
// Filter to only active sessions
const active = sessions.filter(
(s) => s.status === "generating" || s.status === "awaiting_input" || s.status === "complete"
(s) =>
s.status === "generating" ||
s.status === "awaiting_input" ||
s.status === "complete" ||
s.status === "error",
);
const planningSessions = active.filter((s) => s.type === "planning");