From 55ffecc2b2333c0e6f977a2d9d62d0ac8f360093 Mon Sep 17 00:00:00 2001 From: dev Date: Wed, 25 Nov 2026 10:50:12 +0800 Subject: [PATCH 1/4] [fix] canvas: one interface language switch, not three Settings -> General already has the interface language, and the welcome screen offers it before a project exists. The model setup panel repeated the same control in its top-right corner, so the same setting appeared in two places depending on which panel happened to be open, with nothing indicating they were the same value. The setup panel now opens on the thing it is for: which models are missing. The key it used stays, because the welcome screen still labels its switch with it. --- src/canvas/ModelSetup.tsx | 10 +++------- src/canvas/model-setup.css | 2 -- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/canvas/ModelSetup.tsx b/src/canvas/ModelSetup.tsx index efa67ec2c..9c4e24c17 100644 --- a/src/canvas/ModelSetup.tsx +++ b/src/canvas/ModelSetup.tsx @@ -25,16 +25,12 @@ export function ModelSetup({ catalog, onClose, onConfigure }: { onClose: () => void; onConfigure: (kind: SetupKind) => void; }) { - const { t, locale, setLocale } = useI18n(); + // The interface language lives in Settings -> General and on the welcome + // screen; repeating the switch here duplicated one setting across two panels. + const { t } = useI18n(); const missing = modelSetupMissing(catalog.models); const next = missing[0]; return
-
- - -

{t("modelSetup.hint")}

diff --git a/src/canvas/model-setup.css b/src/canvas/model-setup.css index 18cbfe58e..2ae8f8869 100644 --- a/src/canvas/model-setup.css +++ b/src/canvas/model-setup.css @@ -1,6 +1,4 @@ .cw-model-setup { width: 100%; display: flex; flex-direction: column; position: relative; } -.cw-model-setup-language { display: flex; justify-content: flex-end; align-items: center; gap: 8px; color: var(--settings-muted); font-size: 12px; } -.cw-model-setup-language select { width: auto; min-height: 30px; } .cw-model-setup-intro { padding: 12px 0 16px; } .cw-model-setup-intro p { margin: 0; color: var(--settings-muted); line-height: 1.6; font-size: 13px; } .cw-model-setup-progress { font-size: 12px; color: var(--settings-muted); margin: 0 0 12px; } From 18c5840ff5b5ce28001aeefc9681b4c92fcf34b3 Mon Sep 17 00:00:00 2001 From: Zhangbo-cn <60600082+Zhangbo-cn@users.noreply.github.com> Date: Wed, 2 Dec 2026 23:23:28 +0800 Subject: [PATCH 2/4] test(first-run): assert the single language switch on the General tab Removing the duplicated select from the model setup panel left the workflow reading #model-setup-language and switching the locale through it. The workflow now asserts the panel keeps no second switch and uses #settings-language. --- tests/browser/first_run.mjs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/browser/first_run.mjs b/tests/browser/first_run.mjs index b69f06545..f57171914 100644 --- a/tests/browser/first_run.mjs +++ b/tests/browser/first_run.mjs @@ -405,7 +405,17 @@ try { await audio.click(); assert.equal(await audio.getAttribute("aria-pressed"), "true"); await categories.getByRole("button", { name: zh ? "概览" : "Overview", exact: true }).click(); - const language = settings.locator("#model-setup-language"); + // One interface switch only: the model setup panel no longer renders its + // own language select. The settings control lives on the General tab. + assert.equal( + await settings.locator("#model-setup-language").count(), + 0, + "the model setup panel keeps no second language switch", + ); + await settings + .getByRole("button", { name: zh ? "通用" : "General", exact: true }) + .click(); + const language = settings.locator("#settings-language"); assert.equal(await language.inputValue(), locale); if (width === 1440) await language.selectOption(zh ? "en-US" : "zh-CN"); await page.keyboard.press("Escape"); From c986ee6d29b53be56c35e657ad2a9b20b30bf4a0 Mon Sep 17 00:00:00 2001 From: dev Date: Fri, 4 Dec 2026 19:34:23 +0800 Subject: [PATCH 3/4] [cleanup] canvas: keep the test assertion free of explanatory comments Co-Authored-By: Claude Code --- src/canvas/ModelSetup.tsx | 2 -- tests/browser/first_run.mjs | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/canvas/ModelSetup.tsx b/src/canvas/ModelSetup.tsx index afbb24d6a..bf0524b2e 100644 --- a/src/canvas/ModelSetup.tsx +++ b/src/canvas/ModelSetup.tsx @@ -28,8 +28,6 @@ export function ModelSetup({ catalog, onClose, onConfigure }: { onClose: () => void; onConfigure: (kind: SetupKind) => void; }) { - // The interface language lives in Settings -> General and on the welcome - // screen; repeating the switch here duplicated one setting across two panels. const { t } = useI18n(); const missing = modelSetupMissing(catalog.models); const next = missing[0]; diff --git a/tests/browser/first_run.mjs b/tests/browser/first_run.mjs index f57171914..4ea2776f8 100644 --- a/tests/browser/first_run.mjs +++ b/tests/browser/first_run.mjs @@ -405,8 +405,6 @@ try { await audio.click(); assert.equal(await audio.getAttribute("aria-pressed"), "true"); await categories.getByRole("button", { name: zh ? "概览" : "Overview", exact: true }).click(); - // One interface switch only: the model setup panel no longer renders its - // own language select. The settings control lives on the General tab. assert.equal( await settings.locator("#model-setup-language").count(), 0, From e2bce233031f0ad83d2ed7da380708baea91e1bb Mon Sep 17 00:00:00 2001 From: dev Date: Fri, 4 Dec 2026 20:13:21 +0800 Subject: [PATCH 4/4] [ci] rerun after an unrelated created-node focus failure Co-Authored-By: Claude Code