fix(webui): settle completed turns across reconnect paths

Separate named completion facts from history adoption, preserve newer and anonymous activity, and keep one mounted whole-snapshot adopter. Unify explicit-ID lifecycle/content closure without discarding uncovered content.

Cover the real client/hooks reconnect and selection races, await asynchronous browser fixture startup, and retain current-policy bounded TLC models and missing-evidence limits. Archive historical/candidate verification separately.
This commit is contained in:
chengyongru authored and chengyongru committed 2026-11-17 17:59:01 +08:00
1 parent 9e499ad539
commit 53a556585e
34 files changed
+1891 -46

No files matched your search

+2
View File
@@ -35,6 +35,8 @@ async function openThread(page: Page, events: ThreadProjectionEvent[] = [], loca
});
});
await page.goto(`/browser/fixture.html?case=answer-order${reconnect ? "&reconnect=1" : ""}`);
// The load event does not await the fixture module's asynchronous startup.
await page.evaluate(async (entry) => { await import(entry); }, "/browser/fixture.tsx");
await expect.poll(() => attached.has(chatId)).toBe(true);
await expect(page.getByRole("status", { name: "Loading conversation…" })).toHaveCount(0);
return {