feat(webui): show forked history boundary

This commit is contained in:
Xubin Ren
2026-06-10 04:26:06 +08:00
parent 73d4b1cb2f
commit 26a58282d4
21 changed files with 242 additions and 121 deletions
+4 -4
View File
@@ -758,7 +758,7 @@ describe("ThreadShell", () => {
const targetText = await screen.findByText("answer 100");
fireEvent.click(within(targetText.closest(".w-full") as HTMLElement).getByRole("button", {
name: "Fork from here",
name: "Fork",
}));
await waitFor(() =>
@@ -804,7 +804,7 @@ describe("ThreadShell", () => {
target: { value: "keep my current draft" },
});
fireEvent.click(within(targetText.closest(".w-full") as HTMLElement).getByRole("button", {
name: "Fork from here",
name: "Fork",
}));
await waitFor(() => expect(onForkChat).toHaveBeenCalledWith("chat-a", 1));
@@ -864,7 +864,7 @@ describe("ThreadShell", () => {
const targetText = await screen.findByText("answer2");
fireEvent.click(within(targetText.closest(".w-full") as HTMLElement).getByRole("button", {
name: "Fork from here",
name: "Fork",
}));
await waitFor(() => expect(onForkChat).toHaveBeenCalledWith("chat-a", 2));
@@ -962,7 +962,7 @@ describe("ThreadShell", () => {
);
await screen.findByText("answer1");
fireEvent.click(screen.getAllByRole("button", { name: "Fork from here" }).at(-1)!);
fireEvent.click(screen.getAllByRole("button", { name: "Fork" }).at(-1)!);
await waitFor(() => expect(onForkChat).toHaveBeenCalledWith("chat-a", 1));
await act(async () => {