feat(FN-1132): support resuming completed planning sessions
- Include complete planning sessions in active session queries and background tracking - Add create-task fallback to recover completed planning data from persisted ai session records - Validate and reconstruct summary/initial plan data from stored JSON before creating tasks - Expand tests for modal resume flow, session-store filtering, and route fallback behavior
This commit is contained in:
@@ -41,7 +41,11 @@ export function useBackgroundSessions(projectId?: string): UseBackgroundSessions
|
||||
return next;
|
||||
}
|
||||
// New session — only add if active
|
||||
if (updated.status === "generating" || updated.status === "awaiting_input") {
|
||||
if (
|
||||
updated.status === "generating" ||
|
||||
updated.status === "awaiting_input" ||
|
||||
updated.status === "complete"
|
||||
) {
|
||||
return [updated, ...prev];
|
||||
}
|
||||
return prev;
|
||||
@@ -73,7 +77,7 @@ export function useBackgroundSessions(projectId?: string): UseBackgroundSessions
|
||||
|
||||
// Filter to only active sessions
|
||||
const active = sessions.filter(
|
||||
(s) => s.status === "generating" || s.status === "awaiting_input"
|
||||
(s) => s.status === "generating" || s.status === "awaiting_input" || s.status === "complete"
|
||||
);
|
||||
|
||||
const planningSessions = active.filter((s) => s.type === "planning");
|
||||
|
||||
Reference in New Issue
Block a user