feat(FN-3212): remove runtime memory-backend side-load, add regression test

Merged FN-3207, FN-3212, and FN-3242: removed runtime memory-backend side-loading in core, added comprehensive regression tests for QuickChat, chat routes, and SSE streams, and documented compact mobile chat dialogs in the dashboard guide. The refactor in `project-memory.ts` reduces complexity while

Fusion-Task-Id: FN-3212
This commit is contained in:
Fusion
2026-05-03 07:32:04 -07:00
committed by gsxdsm
parent a82c3dcac7
commit cc6c9abe61
6 changed files with 182 additions and 0 deletions

View File

@@ -713,6 +713,17 @@ describe("resume session flag", () => {
expect(args).not.toContain("--resume");
});
it("does not include --session-id when --resume is provided", () => {
spawnClaude("claude-sonnet-4-5-20250929", undefined, {
resumeSessionId: "session-abc",
newSessionId: "session-new",
});
const args = (spawn as any).mock.calls[0][1] as string[];
expect(args).toContain("--resume");
expect(args).not.toContain("--session-id");
});
it("includes both --resume and --effort when both are provided", () => {
spawnClaude("claude-sonnet-4-5-20250929", undefined, {
resumeSessionId: "session-abc",

View File

@@ -1512,6 +1512,31 @@ describe("streamViaCli", { timeout: 90_000 }, () => {
});
});
describe("resume behavior", () => {
it("uses --resume for follow-up quick-chat turns when sessionId is present", async () => {
const model = mockModels[0] as any;
const context = {
messages: [
{ role: "user", content: "Turn 1" },
{ role: "assistant", content: "Reply 1" },
{ role: "user", content: "Follow-up" },
],
};
streamViaCli(model, context, { sessionId: "session-follow-up" } as any);
await vi.advanceTimersByTimeAsync(0);
const args = (spawn as any).mock.calls[0][1] as string[];
expect(args).toContain("--resume");
expect(args).toContain("session-follow-up");
expect(args).not.toContain("--session-id");
const proc = (spawn as any).mock.results[0].value;
proc.stdout.end();
await vi.advanceTimersByTimeAsync(100);
});
});
describe("MCP config with custom tool results", () => {
it("keeps MCP config even when conversation ends with custom tool result", async () => {
const model = mockModels[0] as any;