feat(FN-3954): restore scoped mission interview persistence and resume
Scoped mission interview persistence is restored, enabling resume functionality within mission interview flows, with corresponding test coverage and documentation. The implementation touches MissionManager, mission-interview routing, and plugin view registration, with the bulk of changes in tests an Fusion-Task-Id: FN-3954
This commit is contained in:
@@ -2752,6 +2752,7 @@ describe("Mission API", () => {
|
||||
{ "mission-interview-system": "Scoped mission interview prompt" },
|
||||
undefined,
|
||||
undefined,
|
||||
projectId,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -2839,6 +2840,7 @@ describe("Mission API", () => {
|
||||
{},
|
||||
undefined,
|
||||
undefined,
|
||||
null,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -2914,6 +2916,7 @@ describe("Mission API", () => {
|
||||
{},
|
||||
"zai",
|
||||
"glm-5.1",
|
||||
projectId,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -2954,6 +2957,7 @@ describe("Mission API", () => {
|
||||
{},
|
||||
"anthropic",
|
||||
"claude-sonnet-4-5",
|
||||
projectId,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -2997,6 +3001,7 @@ describe("Mission API", () => {
|
||||
{},
|
||||
"openai",
|
||||
"gpt-4o",
|
||||
projectId,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -3033,6 +3038,7 @@ describe("Mission API", () => {
|
||||
{},
|
||||
undefined,
|
||||
undefined,
|
||||
projectId,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -288,13 +288,22 @@ describe("session persistence round-trip", () => {
|
||||
]),
|
||||
);
|
||||
|
||||
const sessionId = await createMissionInterviewSession("127.0.0.44", "Mission persistence", "/tmp/project");
|
||||
const sessionId = await createMissionInterviewSession(
|
||||
"127.0.0.44",
|
||||
"Mission persistence",
|
||||
"/tmp/project",
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
"project-mission",
|
||||
);
|
||||
await waitFor(() => Boolean(getMissionInterviewSession(sessionId)?.currentQuestion));
|
||||
|
||||
await submitMissionInterviewResponse(sessionId, { "q-m-1": "A mission" }, "/tmp/project");
|
||||
|
||||
const persisted = aiSessionStore.get(sessionId);
|
||||
expect(persisted?.status).toBe("complete");
|
||||
expect(persisted?.projectId).toBe("project-mission");
|
||||
|
||||
const history = JSON.parse(persisted?.conversationHistory ?? "[]") as Array<{ question: { id: string } }>;
|
||||
expect(history).toHaveLength(1);
|
||||
|
||||
@@ -182,7 +182,7 @@ describe("session resume + history restore", () => {
|
||||
result: null,
|
||||
thinkingOutput: "mission-latest-thinking",
|
||||
error: null,
|
||||
projectId: null,
|
||||
projectId: "project-resume",
|
||||
createdAt: now,
|
||||
updatedAt: now,
|
||||
lockedByTab: null,
|
||||
@@ -203,6 +203,7 @@ describe("session resume + history restore", () => {
|
||||
const restored = getMissionInterviewSession(row.id);
|
||||
expect(restored).toBeDefined();
|
||||
expect(restored?.history).toHaveLength(1);
|
||||
expect(restored?.projectId).toBe("project-resume");
|
||||
expect(restored?.history[0]?.thinkingOutput).toBe("mission-turn-1-thinking");
|
||||
expect(restored?.thinkingOutput).toBe("mission-latest-thinking");
|
||||
expect(restored?.lastGeneratedThinking).toBe("mission-latest-thinking");
|
||||
|
||||
Reference in New Issue
Block a user