Repository navigation
fix(search): 类型和符号页签用 ⓘ 说明范围,并去掉无效的筛选 - #2218
Merged
Merged
Conversation
全局搜索的类型、符号页签只列语言服务在项目目录内报告的声明,标准库、SDK 和第三方依赖不显示,用户容易误以为语言服务没启动。两个页签后各加一个 ⓘ, 说明列出哪些种类、范围和对语言插件的依赖。 筛选里的包含忽略文件、生成目录和符号链接选项只作用于 Core 的文件和内容 搜索,到不了语言服务结果,这两个页签因此不再显示筛选按钮。
xiaoyumuxi
marked this pull request as ready for review
November 20, 2026 01:18
Collaborator
Author
|
无头截图 artifact(Draft CI,提交 2b43bee):search-visual-Linux-X64。新增 |
21 of 24 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue / Linked issue
sync.OnceValue、gfx.Bitmap)。是否补建 Issue 待维护者确认,确认后在这里补Closes #。PR 类型 / Type
改动说明 / What changes
背景 / Why
全局搜索的“类型”“符号”页签只列语言服务(LSP
workspace/symbol)在项目目录内报告的声明,标准库、SDK 和第三方依赖里的名字(例如 Go 的sync.OnceValue、Viva 依赖里的gfx.Bitmap)不会出现。界面上没有任何说明,用户看到“没有匹配结果”时会以为语言服务没启动或坏了。另外,这两个页签右侧的筛选按钮里只有“包含 Git 忽略的文件 / 插件生成目录 / 符号链接”三个选项,它们只作用于 Core 的文件和内容搜索,对语言服务结果没有任何效果,是无效选项。
改动 / Changes
desktop/internal/workbench/search_everywhere_view.go):“类型”“符号”页签后各加一个 ⓘ(18×18 的图标按钮,无障碍名称“更多信息”),悬停显示列出哪些种类、范围(只含项目目录内定义,不含标准库、SDK、第三方依赖)以及对语言插件的依赖;点击 ⓘ 把键盘焦点还给搜索框,与预览按钮一致。everywhereLanguageScope,类型、符号页签不再显示筛选按钮;全部、文件、文本页签保持原样,操作页签本来就没有。shared/i18n/features/search.json):新增desktop.everywhere.typesHelp、desktop.everywhere.symbolsHelp中英词条,重新生成desktop/internal/i18n/shared.generated.go。search_idea_test.go新增TestEverywhereLanguageTabsExplainTheirScopeAndHaveNoFilter,检查两个 ⓘ 的无障碍提示、位置在对应页签和下一个页签之间、悬停后完整显示说明,以及各页签是否显示筛选;search_visual_test.go增加两个页签悬停 ⓘ 的中英明暗截图。2026-11-08-viva-project-search.md补充类型/符号只含项目内结果、用 ⓘ 说明、两个页签不显示筛选的原因。search-global.json补验证动作和备注,两端证据加入search_everywhere_view.go,状态保持partial/pending。不在本 PR 范围内 / Out of scope
go.mod)只按需加载子模块,属于语言服务自身行为,不在宿主处理。类型专属:fix
复现与根因
OnceValue或Bitmap。实际:显示“没有匹配结果”,界面没有任何范围说明,筛选里的选项也不起作用。期望:界面说明这两个页签只列项目内的声明,不提供无效选项。everywhereSymbolPath(search_everywhere_lsp.go)有意丢弃项目目录外的workspace/symbol结果;该过滤随 Viva 桌面端迁移引入(Epic(0.7.0): 基于 Viva 框架的跨平台方案的迁移(#1794) #1799,0faecba49),之后 feat(search): 完成 IDEA 搜索计数、类型发现与紧凑结果布局 #2215 拆出“类型”页签并按清单启动语言服务时沿用了它,界面一直没有说明。筛选按钮沿用文件搜索的选项,没有按页签区分。检查项
desktop/internal/workbench/search_idea_test.go的TestEverywhereLanguageTabsExplainTheirScopeAndHaveNoFilter。把search_everywhere_view.go换回origin/main版本运行,失败于search_idea_test.go:92: no ⓘ tells assistive technology "列出语言服务报告的类、接口、结构体和枚举。…";换回修复后通过。everywhereScopes内部,新增两个包内函数;filtered()只在筛选按钮处使用,隐藏后不会残留“已过滤”提示。.agents/notes/implemented/bug-fix/记录:决策写进了持有搜索设计的implemented/feature/2026-11-08-viva-project-search.md,不另建 bug-fix 笔记。范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/search-global.json:两端的实现状态和验证状态、证据路径、owner、验证动作都如实填写;没有运行验证的保持pending./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh;改了平台实现路径的,还运行了./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD.artifacts/下生成的矩阵视图插件归属 / Plugin ownership
develop-lithe第三节“插件归属与宿主零依赖”的自查命令,结果为空shared/i18n/;说明文字是宿主自己的通用描述,不提具体语言或插件UI 验证 / UI evidence
LITHE_VISUAL_OUTPUT_DIR=… scripts/desktop/desktop-go.sh test -count=1 -tags 'vivahead lithevisual' ./internal/workbench -run '^TestVisualSearchResults$',提交 2b43bee,场景search-types-help-*、search-symbols-help-*(切到对应页签并悬停 ⓘ),深浅主题 × 中英文,1440×900。已逐张检查:ⓘ 紧跟页签、说明完整换行不被裁剪、两个页签右侧只剩预览按钮。search-visual-Linux-X64,CI 跑完后在评论里补链接。pending。统一日志系统 / Structured logging
N/A:没有新增或改动生命周期、操作终态、降级或失败路径;点击 ⓘ 只把焦点还给搜索框。
界面文案 / i18n
shared/i18n/补齐中英词条,运行node scripts/i18n/generate-i18n.mjs并提交生成结果,没有手改生成文件;Viva 代码通过desktop/internal/i18n/的接口读取shared/i18n/node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,没有放宽脚本或扩大豁免名单逻辑归属 / Logic placement
性能与内存 / Performance and memory
N/A:没有新增后台功能、子进程、缓存或定时器,也没有改动搜索流程;只是在页签栏多声明两个按钮、在两个页签少声明一个按钮。
设置 / Settings
N/A:没有新增或修改设置项;ⓘ 用法沿用设置界面的说明图标约定。
插件契约 / Plugin contract
N/A:不涉及插件契约、能力版本或宿主方法。
发行包与资源 / Bundle and resources
N/A:没有新增运行时资源;已运行
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh,静态检查通过。无用代码与重构 / Dead code and refactoring
验证 / Verification
.agents/skills/write-stable-tests/scripts/test-stability-macos.sh --package ./internal/workbench -- --filter 'TestEverywhere'.agents/skills/write-stable-tests/scripts/test-stability-macos.sh --package ./internal/workbenchscripts/desktop/desktop-go.sh test -count=1 -tags 'vivahead lithevisual' ./internal/workbench -run '^TestVisualSearchResults$'gofmt -l internal/workbench/node scripts/i18n/generate-i18n.mjs --check、--coveragenode scripts/i18n/verify-app-language-localization.mjsnode --test --test-timeout=60000 scripts/i18n/test-i18n.mjs./scripts/agent-notes/verify-agent-notes.sh./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD、verify-platform-feature-matrix.sh./scripts/desktop/verify/verify-runtime-bundle-immutability.sh未能执行的检查和原因: macOS 原生窗口整机验收和 Windows 实机验证没有做(无头截图不能替代),矩阵保持
pending。提交前确认 / Final checks
main创建;目标分支:main.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图