Repository navigation
Conversation
…d-untitled-search # Conflicts: # packages/vscode-ide-companion/src/webview/components/SessionHistoryDropdown.test.tsx
|
The remaining Ubuntu test failure at c083c1b is the core cold-scan latency assertion in I attempted to rerun only the failed Ubuntu job, but GitHub returned |
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Not explored to full depth (tool budget reached): "agent 2": none — no check was cut short.; "agent 1b": none — the walk finished inside the tool budget..
中文说明
未探索到全部深度(达到工具调用预算):"agent 2":none — no check was cut short.;"agent 1b":none — the walk finished inside the tool budget.。
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.4)
What this PR does
This change makes session-history search use the same localized fallback label that each untitled row displays. Missing and empty display names keep the existing falsy fallback behavior, and the label is now derived in one place for both filtering and rendering. The regression test verifies both the matching sessions and the localized text visible in each result.
Why it's needed
In a localized UI, untitled sessions render with the translated label, but search previously compared a missing title against the hard-coded English string
Untitled. As a result, searching for the exact label visible in the UI, such as未命名, returned no matches. Sharing the label derivation also prevents the filter and rendered row from drifting apart again.Reviewer Test Plan
How to verify
Use the VS Code companion in the Chinese locale with one session whose display name is missing, one whose display name is an empty string, and one named session. Open session history and search for
未命名. Confirm that both untitled sessions remain visible, both rows display未命名, and the named session is excluded.The focused regression test also checks these three outcomes. As a mutation check, changing the fallback from falsy to nullish makes the empty-name assertion fail, while changing only the rendered fallback to
Untitledmakes the visible-text assertion fail.Evidence (Before & After)
The before/after image uses the actual session-history component with the same Chinese locale and session fixtures as the regression scenario.
Tested on
Environment (optional)
Windows 11, Node.js 24.15.0, Vitest 3.2.7. After syncing upstream main, the VS Code companion workspace passed all 606 tests and ESLint. The local type check could not complete because this worktree\u0027s shared dependencies lack the VS Code API module; GitHub checks are running on the pushed head.
Risk & Scope
Linked Issues
Related to #10382, specifically the localized session-history search finding recorded in its follow-up comment. This PR does not close the umbrella issue, which tracks several independent findings.
中文说明
本 PR 的改动
本改动让会话历史搜索使用每个未命名行实际展示的同一个本地化回退标签。缺失与空字符串显示名称继续保持既有的假值回退语义,并且过滤与渲染现在只在一处派生标签。回归测试同时验证匹配到的会话和每条结果实际显示的本地化文本。
为什么需要此改动
在本地化界面中,未命名会话会显示翻译后的标签,但搜索此前会把缺失标题与硬编码英文字符串
Untitled比较。因此,搜索界面中实际可见的标签(例如未命名)不会返回任何结果。共享标签派生也可以防止过滤逻辑与行渲染再次发生漂移。Reviewer 测试计划
如何验证
在中文语言环境的 VS Code companion 中准备三个会话:一个缺少显示名称、一个显示名称为空字符串、一个有正常名称。打开会话历史并搜索
未命名。确认两个未命名会话都保持可见、两行都显示未命名,且有名称的会话被排除。聚焦回归测试也会检查这三个结果。突变验证中,把假值回退改成空值回退会使空名称断言失败;只把渲染侧回退改成
Untitled会使可见文本断言失败。证据(修改前与修改后)
修改前后对比图使用真实的会话历史组件,并采用与回归场景相同的中文语言环境和会话夹具。
已测试平台
环境(可选)
Windows 11、Node.js 24.15.0、Vitest 3.2.7。同步上游 main 后,VS Code companion workspace 的 606 项测试与 ESLint 均通过。本地类型检查因当前共享依赖缺少 VS Code API 模块未能完成;GitHub checks 正在针对已推送的 head 运行。
风险与范围
关联 Issue
关联 #10382,具体对应其后续评论中记录的本地化会话历史搜索问题。本 PR 不会关闭这个汇总 issue,因为其中还跟踪了多个彼此独立的问题。