From f95bacdfba45f783c9d7982d0a1ac298e21391b0 Mon Sep 17 00:00:00 2001 From: yetone Date: Mon, 2 Nov 2026 18:38:11 +0800 Subject: [PATCH] gui tests: agent-panel-name-width's lists tick two models, as menuSaid names them (#4203) The fixture gave WorkBuddy's and Claude Desktop's lists `shown`/`total`, but /api/state counts them as `listed`, and since 6915c8cde menuSaid names a list's models only while one or two are ticked. So the rows read "Showing 3 / undefined models", words too short to cut, and every case failed at "workbuddy's words not cut" on macOS and Linux alike. The reporter's two long names were never drawn, so the test no longer checked #2447. Each list now ticks two of its `listed` 3 and 9. Cause and patch by R1cK-ChaN on #4203 (c99d001 on their fork), ported as written. Run at origin/main ea51526b6 on mote (macOS 27, Playwright 1.62.0): - agent-panel-name-width.test.cjs alone, chromium and webkit: 0/32 before, 32/32 after. - Broken by hand: #2447's grid put back (20px minmax(0, 1fr) auto) with this change, chromium: 0/16, "en 550: workbuddy's name cut to 26.5px of 76", "en 440: ... 0px of 76". Not run: the whole GUI suite (another session's full GUI suite was on mote); a test fixture only, no app code changed. Co-authored-by: Rick Chan --- internal/gui/tests/agent-panel-name-width.test.cjs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/gui/tests/agent-panel-name-width.test.cjs b/internal/gui/tests/agent-panel-name-width.test.cjs index d9ee16a02..9b99d4e62 100644 --- a/internal/gui/tests/agent-panel-name-width.test.cjs +++ b/internal/gui/tests/agent-panel-name-width.test.cjs @@ -16,14 +16,17 @@ const { chromium, webkit } = require("playwright"); const assets = path.resolve(__dirname, "../assets"); const magpie = [{ value: "magpie", label: "magpie", icon: "magpie" }]; const LONG = "claude-opus-5-5 · Microsoft Foundry"; +// A list's words name its models only while one or two are ticked; more read +// "Showing x / N models", all of them "All N models" (menuSaid, 6915c8cde). +// So each list here has two of its models ticked, to be said by name. const AGENTS = [ - // the reporter's row, as /api/state had it + // the reporter's row: their two models, as menuSaid words them now { id: "workbuddy", name: "WorkBuddy", icon: "workbuddy-color", path: "/fixture/models.json", wired: true, menu: true, - models: { shown: 3, total: 3, names: ["gpt-6.1-sol · Microsoft Foundry", LONG] }, + models: { shown: 2, listed: 3, names: ["gpt-6.1-sol · Microsoft Foundry", LONG] }, fields: [{ key: "provider", label: "provider", value: "magpie", options: magpie }] }, // another agent whose own menu lists the models, a longer name { id: "claude-desktop", name: "Claude Desktop", path: "/fixture/claude-desktop.json", wired: true, menu: true, - models: { shown: 5, total: 9, names: [LONG, "gpt-6.1-sol · Microsoft Foundry"] }, + models: { shown: 2, listed: 9, names: [LONG, "gpt-6.1-sol · Microsoft Foundry"] }, fields: [{ key: "provider", label: "provider", value: "magpie", options: magpie }] }, // one model, said by a long label, with its logo and effort { id: "codex", name: "Codex", path: "~/.codex/config.toml",