fix(web-shell): remove duplicate language declaration in ChatEditor.test.tsx - #10729
Conversation
…est.tsx
The standalone-chats and session-workflow-cockpit merges both added a 'language' member, leaving it declared twice in the ChatEditorRenderProps interface and twice in the renderChatEditorInto destructuring. esbuild rejects the redeclaration ("The symbol 'language' has already been declared"), which fails the web-shell suite and reds main CI.
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Thanks for the PR, @yiliang114 — the fix itself looks correct (the duplicate language declarations are indeed present on main, and removing one of each is the minimal fix). Before it can move to review, though, the PR body needs to follow the PR template.
Currently missing required headings:
## Why it's needed## Reviewer Test Plan(with### How to verify,### Evidence (Before & After),### Tested on)## Risk & Scope## Linked Issues
For a CI-fix PR like this the additions are small: "Why it's needed" is the broken-CI context already in your description, "How to verify" can point at the failing run (CI green after the fix), and "Evidence" can be N/A since nothing user-visible changed. Please update the PR body to match the template, then re-trigger triage with @qwen-code /triage.
中文说明
感谢贡献,@yiliang114 ——修复本身看起来是对的(main 上确实存在重复的 language 声明,各删掉一处是最小修复)。但在进入审查之前,PR 正文需要先按 PR 模板 填写。
目前缺少以下必需标题:
## Why it's needed## Reviewer Test Plan(含### How to verify、### Evidence (Before & After)、### Tested on)## Risk & Scope## Linked Issues
对于这类修 CI 的 PR,补充内容很少:"Why it's needed" 即你描述中 CI 失败的情况,"How to verify" 可以引用失败的 CI run(修复后 CI 变绿),"Evidence" 可以写 N/A(无用户可见变化)。请把 PR 正文补全为模板格式,然后用 @qwen-code /triage 重新触发 triage。
— Qwen Code · qwen3.8-max
chiga0
left a comment
There was a problem hiding this comment.
No blocking findings. Approval blockers: none.
Tier: Standard — mechanical test-only fix; all five risk questions answered "no".
Checked:
- Diff matches the stated claim exactly: one duplicate
language?: WebShellLanguage;interface member and one duplicatelanguage = 'en',destructure binding removed. The kept copies are identical to the removed ones, so no semantic difference. - No other leftovers from the merge that introduced this: all 41 top-level members of
ChatEditorRenderPropsare unique, andrenderChatEditorInto's destructure pattern has no repeated identifiers. - The remaining
languageis still required and used: passed to<I18nProvider language={language}>(ChatEditor.test.tsx:446) and supplied via props by tests (lines 1724, 1847, 1851).
Ran (linux, node v24.20.0, vitest 3.2.7):
- head
a2a2cc5:vitest run client/components/ChatEditor.test.tsx→ 107/107 pass; full web-shell suite → 248 files / 5575 tests pass. - base
d6c0390(A/B): same command fails at transform — esbuildERROR: The symbol "language" has already been declared(ChatEditor.test.tsx:425), 0 tests collected. Reproduces the reported CI failure; the fix resolves it. - head: web-shell
tsc -p tsconfig.json --noEmit→ clean (first pass showed two errors from a stale local@qwen-code/sdkdist; rebuilding the workspace SDK from this head cleared them — the method exists atpackages/sdk-typescript/src/daemon/DaemonClient.ts:3045).
Not covered: nothing material — the change is two deletions in a single test file; no production code, persisted format, or public API is touched.
Reviewed with AI assistance.
🖼️ web-shell visual previewRendered against a mock daemon (no real backend): the PR base vs this PR head Screenshots · before / after✅ No screenshot changes against the PR base. Full-resolution recordings (.webm) are attached to the workflow run. — Qwen Code · web-shell visuals |
qwen-code-dev-bot
left a comment
There was a problem hiding this comment.
Reviewed at head a2a2cc5c.
- Confirmed the fix matches its claim and is the minimal change: the merged
#10514+#8583left a duplicatelanguagein both the interface and the destructure pattern, so the kept copies are byte-identical to the removed ones and the remaining singlelanguageis still consumed (<I18nProvider language={language}>atChatEditor.test.tsx:446, fed by tests). No other merge leftovers in the file. - The base A/B pins it down: the base copy fails the suite's transform on current main (
The symbol "language" has already been declared), and this head is what makes it compile and collect again — matching chiga0's run (107/107, full web-shell suite green). - The lone CI failure is
Integration Tests (no-AK)failing atgit clonewithFailed to connect to github.com port 443— a runner network blip with no causal link to a test-file edit; everything else on this head is green. - The standing CHANGES_REQUESTED is the triage bot's PR-body-template note (missing section headings), not a code finding — flagging that so it isn't read as a correctness blocker.
- No new Critical issues found; per the channel convention the call is on the review itself.
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Not reviewed: reverse audit — stopped before round 1 by the review time budget.
— qwen3.8-max via Qwen Code /review (v0.22.3)
|
PR body updated to follow the PR template per the stage-1a note: added |
|
@qwen-code /triage |
|
Sandboxed verification: ✅ passed — merge-ready (agent verdict) - workflow run Ran the PR in an isolated, token-free container: A/B against the base build, mock-free harness assertions, targeted gates. Advisory evidence for human reviewers — not a review, an approval, or a CI check. Scripted assertions: 19 passed · 0 failed · 19 total Flakiness gate: ✅ 1 changed test file(s) x 5 identical rounds, no divergence 中文 — 判定:✅ 通过 · 可合入(agent 判定)沙箱验证在隔离、无凭证的容器中执行了该 PR 的代码(与 base 构建 A/B 对照、无 mock harness 断言、定向门禁)。仅作为评审证据,不构成评审、批准或 CI 检查。 脚本断言:19 通过 · 0 失败 · 19 总计 抖动门:✅ 1 changed test file(s) x 5 identical rounds, no divergence Verification reportPR 10729 verification —
|
| Cell | File version | Tree | Oracle | Result |
|---|---|---|---|---|
| A | base (dups) | base | vitest exit + stderr | exit 1; The symbol "language" has already been declared at :425:4; Test Files 1 failed (1); Tests no tests (expected red — assertion PASS) |
| B | head (fixed) | head | vitest exit + counts | exit 0; 107 passed (107) |
| C | head (fixed) | base | vitest exit + counts | exit 0; 107 passed (107) — failure follows the file, not the tree |
| D | base (dups) | head | vitest exit + stderr | exit 1; same redeclaration error; Tests no tests (expected red — assertion PASS) |
Base full suite (dist built, --coverage) |
base | base | vitest summary | exit 1; Test Files 1 failed | 247 passed (248); Tests 5468 passed (5468); the sole FAIL is ChatEditor.test.tsx (expected red — assertion PASS) |
Head full suite (test:ci, --coverage) |
head | head | vitest summary | exit 0; Test Files 248 passed (248); Tests 5575 passed (5575); zero FAIL lines |
Witnesses: evidence/01-ab-base-transform-fails.png (cell A live), evidence/02-ab-head-107-pass.png (cell B live), evidence/03-base-sole-blocker.png (base full-suite summary), evidence/04-assertion-matrix.png (the 19-assertion harness as printed). The test-count delta 5575 − 5468 = 107 is exactly the unblocked file's test count, so this PR removed the sole blocker of the web-shell suite at base.
Targeted gates at head, all green and live-proven: full web-shell test:ci (5575/5575), tsc -p tsconfig.json --noEmit (exit 0), eslint on the changed file (exit 0; a planted unused-var/any file was caught with exit 1, proving the gate collects files).
Corrections
- The PR body says esbuild rejects both the duplicated interface member and the duplicated destructure. Measured: the esbuild error points only at the destructure binding (
ChatEditor.test.tsx:425:4) — a JS-level binding redeclaration. The duplicated interface member is type-only syntax that esbuild strips, and it is invisible totsc -p tsconfig.jsontoo, because that tsconfig'sexcludelist coversclient/**/*.test.tsx(verified: typecheck is green on both arms). So the CI red was caused solely by the duplicate destructure binding; removing the interface duplicate is correct hygiene but was not load-bearing for any compiler gate. This is a note about the description's mechanism, not a request to change the code — the fix as shipped is complete and correct.
Findings
None. No blocking, no advisory code findings. (The mechanism note above is filed under Corrections.)
Not covered
- The CI run
33515371387cited in the PR body could not be fetched (no GitHub token in this environment); the local base reproduction (cells A/D and the base full suite) stands in for it. - Playwright e2e suites (
test:e2e*) — require a browser; the change is a compile-time test-file fix with no runtime surface. - Test suites of other workspaces — the diff is confined to one web-shell test file that no other package imports; web-shell's own full suite is the affected surface and was run on both arms.
- Repo-wide lint/typecheck beyond the affected workspace and the changed file.
- Two early base cells were environmentally confounded and are superseded (kept in
logs/for transparency):05-base-typecheck.log(base worktree lacked web-shell's nestednode_modules, e.g.shiki; repaired via symlink in05b) and10-base-full-suite.log(base worktree lackeddist/, sobuild-artifact.test.tsfailed 12× with ENOENT, and the ChatEditor copy was still my cell-C overwrite; repaired by building dist and restoring the base file in12). Both confounds are worktree artifacts, not PR signals — the repaired cells are the cited evidence.
Methodology
Environment: node v22.23.2, merge-ref checkout at depth 2 (HEAD = a9b7a277, HEAD^1 = base d6c03908, HEAD^2 = PR head a2a2cc5c, single reachable commit matching the metadata snapshot). Base arm ran in a scratch worktree under tmp/ (removed after capture) reusing the root node_modules — clean because the PR leaves package.json/lockfile untouched; readlink -f node_modules/@qwen-code/sdk resolves into the head tree's packages/sdk-typescript, which the PR does not modify, and the base-cell failure occurs at esbuild parse time, before any module resolution, so workspace symlinks cannot confound it. Cells C/D cross-graft the file between trees to attribute the failure to file content. Every number above is re-checked by assertions.mjs (19 scripted assertions, expected base-arm reds encoded as passing expectations) against the raw logs in logs/; evidence PNGs rendered with scripts/verify-capture.mjs.
Flakiness gate log
rounds=5 files=1 skipped=0
file packages/web-shell/client/components/ChatEditor.test.tsx: (cd packages/web-shell) npx --no-install vitest run ./client/components/ChatEditor.test.tsx
per-file results (P=pass F=fail I=infra-exit, one letter per run):
packages/web-shell/client/components/ChatEditor.test.tsx: PPPPP
verdict: pass
summary: 1 changed test file(s) x 5 identical rounds, no divergence
--- per-invocation detail (full copy in the artifact) ---
round 1 · packages/web-shell/client/components/ChatEditor.test.tsx: P (exit 0)
round 2 · packages/web-shell/client/components/ChatEditor.test.tsx: P (exit 0)
round 3 · packages/web-shell/client/components/ChatEditor.test.tsx: P (exit 0)
round 4 · packages/web-shell/client/components/ChatEditor.test.tsx: P (exit 0)
round 5 · packages/web-shell/client/components/ChatEditor.test.tsx: P (exit 0)
Evidence images
Harness scripts and raw logs are in the workflow run artifacts (7-day retention).
— Qwen Code · sandboxed verification
|
@qwen-code /triage |
|
Thanks for the PR! Template looks good ✓ — the earlier request-changes was about the template, and all required sections are present now. Problem: observed, not theoretical. Direction: this unblocks the web-shell suite for every PR stacked on Size: not applicable — test file only, 0 production lines. Approach: removing one copy of each duplicate is exactly the minimal fix. The remaining Risk: no elevated risk signals — single test-file change, no high-risk paths. Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ —— 之前的 request-changes 是针对模板问题,现在各必需部分都已补齐。 问题:已观测到,不是理论问题。main 的 CI 是红的——run 33515371387 中 方向:此修复能为所有基于 main 的 PR 解开 web-shell 套件的 CI 阻塞,方向明确合理。 规模:不适用——仅测试文件,0 生产行。 方案:各删除一处重复正是最小修复。保留的 风险:无升级风险信号——单测试文件改动,未命中高风险路径。 进入代码审查 🔍 — Qwen Code · qwen3.8-max Reviewed at |
|
Code review — clean. Independent proposal before reading the diff: a duplicate declaration from the #10514 / #8583 merge overlap can only be fixed by deleting one copy of each duplicate and confirming the survivor is still used. That is exactly what this PR does — removes the second Testing — this run is unattended CI, so per the workflow I quote the PR's own CI results via the API rather than running PR code; there is nothing user-visible to exercise manually (N/A for real-scenario testing). The evidence that matters here is direct: on Final CI results for
One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。 中文说明代码审查:干净。在读 diff 之前我的独立方案是:合并重叠留下的重复声明,只能各删除一份重复、并确认保留的声明仍被使用——本 PR 正是这么做的:删除 测试:本次为无人值守 CI 运行,按流程通过 API 引用本 PR 自己的 CI 结果,不运行 PR 代码;无用户可见行为,真机场景测试不适用(N/A)。关键证据是直接的:main 上 run 33515371387 的 — Qwen Code · qwen3.8-max Reviewed at |
|
Confidence: 5/5 — verified compile error on This is what a good small PR looks like. The problem is real and reproduced — I read the esbuild failure out of the failing One note on process: the standing request-changes review from an earlier run of this bot was template-only (Stage 1a); the template is fixed and that concern no longer applies — it is superseded by this run's verdict. Approval deferred until CI lands green on 中文说明置信度:5/5 —— main 上的编译错误已验证,2 行最小修复,恰好失败的那个 job 已变绿。 这是一个小而好的 PR 该有的样子。问题真实且可复现——我从 main 失败 job 的日志中读到了 esbuild 报错,并在源码中确认了两处重复声明。修复就是解决问题所需的最小改动:各删除一份重复、保留 流程上的一点说明:此前一次运行留下的 request-changes 仅针对模板问题(Stage 1a);模板已补齐,该问题不再适用,被本次运行的结论取代。 批准暂缓,等待 CI 在 — Qwen Code · qwen3.8-max Reviewed at |
|
Re-run landed after the PR was already merged — nothing left to gate or approve.
中文说明本次重跑时 PR 已合并,无需再评审或批准。
|
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
中文说明
— qwen3.8-max via Qwen Code /review (v0.22.3)
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship — CI landed green after the review. ✅
|
Sandboxed verification: Skipped because the PR is not open for verification (state=MERGED, draft=false). 中文 — 判定:
|
Picks up #10729 (fix duplicate language declaration in ChatEditor.test.tsx) so the web-shell suite can compile and the Test ubuntu leg goes green. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Patrol-Run: qwen-pr-closeout/jmtivohvtai




What this PR does
Removes the duplicate
languagedeclarations inpackages/web-shell/client/components/ChatEditor.test.tsx. TheAdd standalone chats(#10514) andsession workflow cockpit(#8583) merges each added alanguagemember, and the second merge kept both copies: theChatEditorRenderPropsinterface declaredlanguage?: WebShellLanguage;twice andrenderChatEditorIntodestructuredlanguage = 'en',twice. esbuild rejects the redeclaration (The symbol "language" has already been declared), so the web-shell suite fails at transform time. This PR removes one duplicate from each location (2 lines total); the remaining single declaration is still used at<I18nProvider language={language}>.Why it's needed
The redeclaration is a deterministic esbuild compile failure that reds the
Test (ubuntu-latest, Node 22.x)job onmainCI (see run https://github.com/QwenLM/qwen-code/actions/runs/33515371387). Removing the duplicate is the minimal complete fix and unblocks CI for every PR that runs the web-shell suite.Reviewer Test Plan
How to verify
main, run the web-shell suite (ornpm run buildinsidepackages/web-shell) and observe the esbuild transform errorThe symbol "language" has already been declaredinChatEditor.test.tsx.Evidence (Before & After)
N/A — test-file compile fix, no user-visible output change; CI status of the web-shell suite is the evidence.
Tested on
Verification is delegated to CI (
Test (ubuntu-latest, Node 22.x)) since the failure and fix are deterministic compile-time behavior.Environment (optional)
N/A (unit test compile fix).
Risk & Scope
Linked Issues
No tracking issue; repairs
mainCI red introduced by the #10514 / #8583 merge overlap.中文说明
本 PR 删除
packages/web-shell/client/components/ChatEditor.test.tsx中重复的language声明。Add standalone chats(#10514)与session workflow cockpit(#8583)两次合并各自添加了language成员,第二次合并保留了两份拷贝:ChatEditorRenderProps接口重复声明了language?: WebShellLanguage;,renderChatEditorInto重复解构了language = 'en',。esbuild 拒绝重复声明(The symbol "language" has already been declared),导致 web-shell 套件在 transform 阶段失败、Test (ubuntu-latest, Node 22.x)变红。本 PR 各删除一处重复(共 2 行),保留的单个声明仍被<I18nProvider language={language}>使用。为什么需要:这是确定性的 esbuild 编译失败,会让 main 的 CI 变红(见 run 33515371387),删除重复是最小且完整的修复,能解开所有跑 web-shell 套件的 PR。
验证方式:在 main 上跑 web-shell 套件可复现 transform 报错;应用本 PR 后报错消失,由 CI 端到端确认。Evidence:N/A(测试文件编译修复,无可见输出变化)。本地未在各操作系统实测,依赖 CI。
风险与范围:无风险——仅删除两处完全重复的声明,语义不变;不在范围内:本地各 OS 运行;无破坏性变更。
无关联 issue;修复 #10514 / #8583 合并重叠引入的 main CI 红。