Repository navigation
test(web-shell): follow the renamed workspace copy in two e2e specs - #15860
Conversation
#15315 renamed the sidebar's "Project" section to "Workspaces" and the Add Workspace dialog title to "Add workspace". #15296 and #15319 merged alongside it with smoke specs that still look for the old names, so the web-shell E2E Smoke lane now fails on every PR in web-shell.host-directory-picker.spec.ts:90 and web-shell.standalone.spec.ts:197.
yiliang114
left a comment
There was a problem hiding this comment.
No findings — test-only copy fix with zero risk.
Two e2e selector strings updated to match the rename #15315 landed ("Add Workspace" → "Add workspace", "Project" → "Workspaces"). The diff is exactly what the PR body describes.
|
Thanks for the PR! Template looks good ✓ Problem: observed, and I checked it independently rather than taking the description's word for it. On Direction: clearly aligned. A check that fails on every PR regardless of what the PR changes destroys the signal for everyone else, so this is worth more than the two lines cost. #15315 standardized the copy deliberately and updated a dozen e2e specs in the same change — it just never touched Size: not applicable — no core paths. Both files are e2e specs, so production logic lines are 0 and the whole diff is 4 test lines. Approach: scope is exactly right, and I could not make it smaller. I did verify the completeness claim instead of assuming it: after this change the only Risk: no elevated risk signals. Stage 1e's high-risk path list excludes Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 问题:是已观测到的 bug,我独立核实过,没有只采信 PR 描述。当前 方向:明确对齐。一个不论 PR 改了什么都会失败的检查,会让所有人的 CI 信号失效,所以它的价值远超这两行的成本。#15315 是有意统一文案的,同一次改动里也更新了十几个 e2e 用例——只是完全没碰 规模:不适用——未触及核心路径。两个文件都是 e2e 用例,生产代码行数为 0,整个 diff 是 4 行测试代码。 方案:范围恰当,我无法再把它缩小。我确实核实了"改动已完整"这一说法,而不是直接假设:本次改动之后,e2e 目录里唯一剩下的 风险:无升级风险信号。Stage 1e 的高风险路径清单会排除 进入代码审查 🔍 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
Code reviewMy independent proposal before reading the diff: change the two expected strings in the specs, not the copy in The one thing worth real scrutiny was whether Nice side effect: Non-blocking, and about the pattern rather than this diff: these specs assert on localized English copy, which is precisely how a 31-file copy change broke them silently even though it updated 12 e2e specs in the same commit. Stable selectors ( Test evidenceThis is an unattended CI run, so per the gate's rules I did not build or execute any PR-derived code — the evidence below is the PR's own CI read through the API, plus static reading of the tree in a worktree. What I verified myself, not from the description:
The after state is being produced right now by this PR's own smoke run on the reviewed commit — that check executes precisely these two spec files, so it settles the claim directly. Fetched once; no polling. The author's local "15 passed" is their own report on Linux and is not what I am relying on. No sandboxed lane named here, deliberately: there is no production behaviour for
Reading of that signal: nothing is red on this commit so far. The nine checks that have settled are green ( 中文说明代码审查在读 diff 之前我自己的方案是:改这两个用例里期望的字符串,而不是改 真正值得推敲的一点是: 一个附带的正面效果: 非阻断,且针对的是模式而非本 diff:这些用例断言的是英文文案本身,这正是为什么一次涉及 31 个文件的文案改动会静默地弄坏它们——即便同一次提交已经更新了 12 个 e2e 用例。改用稳定的选择器( 测试证据这是无人值守的 CI 运行,因此按照门禁规则,我没有构建或执行任何来自本 PR 的代码——下面的证据来自通过 API 读取的本 PR 自身 CI,以及在 worktree 中对代码树的静态阅读。 我自己核实的部分(不来自 PR 描述):
修复后的状态正由本 PR 在所审 commit 上的 smoke 运行产出——该检查执行的正是这两个 spec 文件,因此它能直接验证这一结论。检查只拉取一次,未轮询。作者本地"15 passed"是其自述(Linux),我没有把它当作依据。 这里有意不指定沙箱验证通道:没有生产行为可供 CI 信号解读:本 commit 上目前没有红灯。已完成的 9 个检查全部通过,16 个按此 PR 类型设计性跳过(macOS/Windows — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
|
Confidence: 5/5 — clean at every stage; the only thing outstanding is procedural, that the check which decides it is still running. Stepping back: this is two characters of intent — make the specs say what the UI says — and it is the smallest change that could possibly fix the problem. My independent proposal was identical, so there is no simpler path I found that the diff missed. The motivation is not "I think this string should differ"; it is "an entire CI check has been red on every PR for a day", which I confirmed from another PR's real job log rather than from the description. The part I would normally worry about with a rename-following test fix is silent incompleteness — the author fixes the two cases they saw and leaves three more stale. I went looking for that and it is not there: the other capital-W Two honest notes, neither against this diff. First, the durability follow-up from Stage 2: asserting on localized copy is what let a 31-file change break these silently, and moving the affected specs to stable selectors is worth its own issue. Second, this only became possible because a copy change landed alongside two spec PRs on the same day without either noticing — a reminder that a rename touching UI strings wants a full e2e run, not just the unit suite, before it merges. Verdict: approve. 中文说明Confidence: 5/5 — 各阶段均无问题;唯一未完成的事项是流程性的,即决定性的检查仍在运行。 退一步看:这本质上只是"让用例说出界面实际显示的内容",而且是能修复该问题的最小改动。我独立想到的方案与之一致,所以不存在我发现了、而 diff 漏掉的更简路径。动机不是"我觉得这个字符串应该不一样",而是"整整一天里,每个 PR 的某项 CI 检查都是红的"——这一点我是从另一个 PR 的真实 job 日志中确认的,而不是采信描述。 这类"跟随改名"的测试修复,我通常会担心的问题是不完整的静默修复:作者修好了看到的两处,却留下另外三处过期。我专门找过,这里没有:e2e 目录中另一处大写 W 的 两点坦率说明,都不是针对本 diff。其一,Stage 2 提到的可持续性问题:断言本地化文案,正是一次 31 文件的改动能够静默弄坏这些用例的原因;把受影响的用例改为使用稳定选择器,值得单开 issue。其二,这件事之所以发生,是因为一次文案改动与两个用例 PR 同日合入而双方都没有察觉——这提醒我们:涉及 UI 字符串的改名,合入前需要跑完整的 e2e,而不只是单元测试套件。 结论:批准。 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
qqqys
left a comment
There was a problem hiding this comment.
Reviewed exact head 7fb01980fc5a7bc00e8920ce533bf511afde9475. Approving: no blocking finding was ever filed on this PR, and the two changed selector strings match what production renders at this head.
The two strings are the current ones, not a guess
"Add Workspace"→"Add workspace"in the host-directory-picker spec'sdialog()locator.packages/web-shell/client/components/dialogs/AddWorkspaceDialog.tsxcarries the lowercase form on main, and the sibling specpackages/web-shell/client/e2e/web-shell.remote-workspace-add.spec.tsalready selects[data-web-shell-dialog-title="Add workspace"]. So the attribute value this spec was matching no longer existed, and the change brings it in line with both the component and the spec beside it.'Project'→'Workspaces'in the standalone spec's sidebar button lookup, keepingexact: true. The sidebar's collapsible section is the "Workspaces" header row (WebShellSidebar's own prop doc names it, andWorkspaceSection's header button carriesaria-expandedwithtoggleExpanded), so the old label was the stale side of the same rename.
Why this cannot be a false green
For a test-only copy fix the one Critical shape worth checking is a gate that now passes without testing anything, and this change cannot produce one:
exact: trueis preserved on both lookups, so nothing was widened into a substring match that could match loosely.- The dialog locator still keys on the
data-web-shell-dialog-titleattribute rather than on visible text, so it stays tied to the component's own contract. - A Playwright
getByRole(..., { name })that matches nothing times out, and one that matches the wrong button leads the collapse/persist assertions that follow it to fail. Both surface as a red spec, not a silent pass — so the failure mode of a wrong string here is loud. - The assertions themselves are untouched; only the two selector strings changed, one line each.
CI
No failing checks. 10 passed and 10 were still running at review time — among them web-shell E2E Smoke (ubuntu-latest, Node 22.x), the lane that actually executes these two specs, plus Test (ubuntu-latest, Node 22.x), the no-AK integration tests, TUI parity and the OpenTUI no-flicker gate. I did not wait for them. My approval rests on the rename being present in production source and on a mismatched selector failing loudly, so a red in that lane would mean the second string is wrong rather than that this change is unsafe — worth a glance before merge, since it is the one piece of evidence I could not read.
The branch predated QwenLM#15860, so the host-directory-picker and standalone E2E specs still waited on the old "Add Workspace" dialog title and timed out. Merging origin/main (24 commits) restores the current baseline.
|
Released in v0.26.5. |
What this PR does
Updates two web-shell smoke specs to the copy #15315 introduced:
web-shell.host-directory-picker.spec.tslooks for the dialog titledAdd workspace, notAdd Workspace.web-shell.standalone.spec.tsclicks the sidebar section buttonWorkspaces, notProject.Why it's needed
#15315 renamed
sidebar.addWorkspaceTitletoAdd workspaceandsidebar.projecttoWorkspaces. #15296 and #15319 merged intomainthe same day with specs that still use the old names, and #15315 did not touch them. Since thenweb-shell E2E Smoke (ubuntu-latest, Node 22.x)fails on every PR with these two cases, whatever the PR changes:The same pair fails on #15853, #15684, #15849 and the run for
codex/issue-11484-target-version.Reviewer Test Plan
How to verify
From
packages/web-shell:Evidence (Before & After)
mainatfa7421bdc1, the two casesI also searched the e2e specs for the other strings #15315 renamed. The remaining hits are a fixture's
displayName: 'Project'and the managedAdd Workspacedialog, whosemanaged.remoteWorkspaceAddcopy #15315 kept.Tested on
Environment (optional)
Node 22.22.2, Playwright Chromium, Debian 13.
Risk & Scope
Linked Issues
Follows #15315, #15296 and #15319.
中文说明
这个 PR 做了什么
把两个 web-shell smoke 用例改成 #15315 引入的新文案:
web-shell.host-directory-picker.spec.ts查找标题为Add workspace的对话框,而不是Add Workspace。web-shell.standalone.spec.ts点击侧栏中名为Workspaces的分组按钮,而不是Project。为什么需要
#15315 把
sidebar.addWorkspaceTitle改成了Add workspace,把sidebar.project改成了Workspaces。#15296 和 #15319 同一天合入main,它们带来的用例仍然使用旧文案,#15315 也没有改到这两处。此后,无论 PR 改了什么,web-shell E2E Smoke (ubuntu-latest, Node 22.x)都会在这两个用例上失败,错误见上方英文部分。#15853、#15684、#15849 以及
codex/issue-11484-target-version分支的运行,都是这两个用例失败。评审者测试计划
如何验证
在
packages/web-shell目录下运行上方英文部分给出的npx playwright test命令。证据(前后对比)
main(fa7421bdc1)上的这两个用例我还在 e2e 用例里搜索了 #15315 改名的其他文案。剩下的命中只有两处:一个测试夹具里的
displayName: 'Project',以及 managed 的Add Workspace对话框,它用的managed.remoteWorkspaceAdd文案 #15315 没有改。测试平台
只在 Linux 上运行过;macOS 和 Windows 未测。
环境(可选)
Node 22.22.2,Playwright Chromium,Debian 13。
风险与范围
关联 Issue
承接 #15315、#15296 和 #15319。