fix(webui): preserve preset widths while switching

This commit is contained in:
Xubin Ren
2026-07-25 15:46:46 +08:00
parent 88cb22dd79
commit ac7b8cf4b4
2 changed files with 11 additions and 4 deletions
+9 -2
View File
@@ -479,9 +479,16 @@ describe("ThreadComposer", () => {
longPress(badge);
expect(badge).toHaveAttribute("data-switching", "true");
const viewport = screen.getByTestId("composer-model-pill-viewport");
expect(viewport).toHaveClass("overflow-hidden", "-left-2", "-top-3", "-bottom-3");
expect(viewport).toHaveClass(
"right-0",
"w-max",
"max-w-[calc(44vw+0.5rem)]",
"overflow-hidden",
"-top-3",
"-bottom-3",
);
const track = screen.getByTestId("composer-model-pill-track");
expect(track).toHaveClass("items-end", "gap-1");
expect(track).toHaveClass("w-max", "max-w-full", "items-end", "gap-1");
const activeTouchMove = new Event("touchmove", {
bubbles: true,
cancelable: true,