feat(FN-3975): keep interview-stage missions visible in mission list
Made interview-stage missions visible in the mission list (MissionManager) and documented the behavior in the missions reference. Tests added for the new visibility logic. Fusion-Task-Id: FN-3975
This commit is contained in:
@@ -76,6 +76,7 @@ const mockMissions = [
|
||||
title: "Build Auth System",
|
||||
description: "Complete authentication flow",
|
||||
status: "planning",
|
||||
interviewState: "not_started",
|
||||
milestones: [],
|
||||
createdAt: "2026-01-01T00:00:00.000Z",
|
||||
updatedAt: "2026-01-01T00:00:00.000Z",
|
||||
@@ -85,6 +86,7 @@ const mockMissions = [
|
||||
title: "API Redesign",
|
||||
description: "Redesign the REST API",
|
||||
status: "active",
|
||||
interviewState: "not_started",
|
||||
autopilotEnabled: true,
|
||||
autopilotState: "watching",
|
||||
milestones: [],
|
||||
@@ -1651,6 +1653,59 @@ describe("MissionManager", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps persisted interview-stage missions visible with interview styling and mission selection behavior", async () => {
|
||||
const missionsWithInterview = [
|
||||
{
|
||||
id: "M-INTERVIEW",
|
||||
title: "Reliability planning draft",
|
||||
description: "Should remain visible while interview planning is in progress",
|
||||
status: "planning",
|
||||
interviewState: "in_progress",
|
||||
milestones: [],
|
||||
createdAt: "2026-01-06T00:00:00.000Z",
|
||||
updatedAt: "2026-01-06T00:00:00.000Z",
|
||||
},
|
||||
...mockMissions,
|
||||
];
|
||||
|
||||
mockFetchAiSessions.mockResolvedValueOnce([]);
|
||||
|
||||
globalThis.fetch = createFetchMockWithHealth(missionsWithInterview as Array<Record<string, unknown>>, {
|
||||
...mockMissionHealthById,
|
||||
"M-INTERVIEW": {
|
||||
missionId: "M-INTERVIEW",
|
||||
status: "planning",
|
||||
tasksCompleted: 0,
|
||||
tasksFailed: 0,
|
||||
tasksInFlight: 0,
|
||||
totalTasks: 0,
|
||||
estimatedCompletionPercent: 0,
|
||||
autopilotState: "inactive",
|
||||
autopilotEnabled: false,
|
||||
},
|
||||
});
|
||||
|
||||
render(<MissionManager isOpen={true} onClose={vi.fn()} addToast={vi.fn()} />);
|
||||
|
||||
const interviewMissionTitle = await screen.findByText("Reliability planning draft");
|
||||
const interviewMissionRow = interviewMissionTitle.closest(".mission-list__item");
|
||||
expect(interviewMissionRow).toBeTruthy();
|
||||
expect(interviewMissionRow).toHaveClass("mission-list__item--interview");
|
||||
|
||||
expect(within(interviewMissionRow as HTMLElement).getByText("Interview in progress")).toBeInTheDocument();
|
||||
expect(
|
||||
within(interviewMissionRow as HTMLElement).getByText(
|
||||
"Mission interview is still in progress. Open this mission to continue planning.",
|
||||
),
|
||||
).toBeInTheDocument();
|
||||
|
||||
fireEvent.click(interviewMissionTitle);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText("Database Schema")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
it("shows in-progress interview sessions in the main mission list without footer resume duplication", async () => {
|
||||
mockFetchAiSessions.mockResolvedValueOnce([
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user