fix(webui): stabilize earlier-history loading and reclaim space (#6349)

* fix(webui): retain smoothly revealed history loading headers

* refactor(webui): simplify history loading feedback

* fix(webui): keep retained history headers clear of preceding text

* fix(webui): reclaim completed history loading space

* refactor(webui): group history projection handoff with navigation

* test(webui): synchronize history motion observations

* fix(webui): collapse history completion geometry handoff
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-21 13:10:05 +08:00
1 parent 73a55e0b2f
commit 743c51e81f
24 files changed
+1658 -356

No files matched your search

+8 -1
View File
@@ -381,7 +381,7 @@ describe("session-owned task UI", () => {
expect(screen.getByText("Check more").compareDocumentPosition(group) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
});
it("keeps legacy work with an unknown origin separate from the latest request after refresh", async () => {
it("keeps legacy work separate after refresh and preserves its disclosure through local history prepends", async () => {
vi.mocked(fetch).mockImplementation(async () => response([
task({ task_id: "legacy", revision: 0, label: "Nanjing weather", state: "done", completed_at: 102,
origin_turn_id: "websocket:a:1791046873588004336", result: "## Nanjing\n\n- **Rain**" }),
@@ -402,6 +402,13 @@ describe("session-owned task UI", () => {
expect(within(detail).getByRole("heading", { name: "Nanjing" })).toBeVisible();
expect(within(detail).getByRole("list")).toHaveTextContent("Rain");
await user.keyboard("{Escape}");
view.rerender(layout({ threadMessages: [
{ id: "cached-prompt", role: "user", content: "Earlier cached prompt", createdAt: 99_000 },
...messages,
] }));
const expanded = screen.getByRole("region", { name: "Other tasks" });
expect(within(expanded).getByRole("button", { name: /Other tasks/ })).toHaveAttribute("aria-expanded", "true");
expect(within(expanded).getByRole("button", { name: /Nanjing weather Completed/ })).toBeVisible();
view.unmount();
render(layout());
const restored = await screen.findByRole("region", { name: "Other tasks" });