Repository navigation
fix(search): 全局搜索的 ⓘ 和页签名称放进同一个页签块 - #2238
Merged
Merged
Conversation
“类型”“符号”页签的 ⓘ 原来是页签按钮外的独立按钮,选中底色只盖住名称, ⓘ 隔着间距漂在外面,看不出它解释的是前面的页签。现在两者合成一个页签块: 选中底色、悬停和点击都覆盖名称和 ⓘ,点 ⓘ 也会切到该页签;块的颜色、圆角、 高度取自 Viva 按钮配方,和其他页签一致;ⓘ 仍是独立按钮,鼠标和键盘都能打开说明。 回归测试断言 ⓘ 落在页签边界内、紧贴页签右缘,点击 ⓘ 切到该页签; 同步 Agent Note 与功能矩阵的描述。
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
PR 类型 / Type
改动说明 / What changes
背景 / Why
#2218 给全局搜索(双 Shift)的“类型”“符号”页签加了 ⓘ,说明这两个页签列出什么、范围到哪里。但 ⓘ 放在页签按钮外面,是同一行里的一个独立按钮:选中“类型”时灰色底色只盖住“类型”两个字,ⓘ 隔着间距漂在外面,看起来像一个单独的控件,看不出它解释的是前面的页签。ⓘ 应该紧贴名称,和名称在同一个页签块里。
改动 / Changes
desktop/internal/workbench/search_everywhere_view.go):新增everywhereHelpTab,用ui.ButtonBase拼出一个页签块,里面依次是名称和 ⓘ。components.ButtonRecipe(未选中 Ghost、选中 Secondary),和其他页签用的是同一套配方,看起来和“全部”“文件”等页签一致。ui.Button,因为它只支持前置图标,ⓘ 放不到名称后面。desktop/internal/workbench/search_idea_test.go,TestEverywhereLanguageTabsExplainTheirScopeAndHaveNoFilter):新增以下断言。everywhereHelpTabEndPad。next字段。.agents/notes/implemented/feature/2026-11-08-viva-project-search.md):补充说明 ⓘ 和名称在同一个页签块里、选中底色、悬停和点击都覆盖两者、点 ⓘ 也切页签,以及外观取自 Viva 按钮配方。shared/platform-feature-matrix/features/search-global.json):verification和notes里的“页签后的 ⓘ”改成“页签块内名称后的 ⓘ”,并补充验证动作“选中底色覆盖两者,点 ⓘ 也切到该页签”。两端的状态不变,仍是pending。docs/assets/search-everywhere-scope-help/):改动前后各 4 张无头截图的裁图,用于下方 UI 验证一节的对照。不在本 PR 范围内 / Out of scope
类型专属:fix
复现与根因
ui.Button的兄弟按钮放在后面(行间距 4),选中底色只画在页签按钮自己身上。检查项
desktop/internal/workbench/search_idea_test.go的TestEverywhereLanguageTabsExplainTheirScopeAndHaveNoFilter。the ⓘ at {X:420 Y:105 Width:18 Height:18} is not inside the desktop.everywhere.types tab at {X:370 Y:101 Width:46 Height:26}。everywhereScopeHelp和新增的everywhereHelpTab只在search_everywhere_view.go的页签行里使用,测试只引用了everywhereHelpTabEndPad。范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/search-global.json:只改验证动作和备注的描述,两端的实现状态和验证状态不变,仍是pending。./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh(validated 218 platform capabilities)和./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD(passed)。.artifacts/下生成的矩阵视图。插件归属 / Plugin ownership
develop-lithe第三节的自查命令,结果为空。UI 验证 / UI evidence
LITHE_VISUAL_OUTPUT_DIR=<dir> ./scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' ./internal/workbench -run '^TestVisualSearchResults$'search-types-help-*和search-symbols-help-*,鼠标停在 ⓘ 上并显示说明。docs/assets/search-everywhere-scope-help/。统一日志系统 / Structured logging
N/A:没有新增或改动日志事件。点 ⓘ 切页签时沿用页签已有的
workspace.searchEverywhere.scope操作记录。界面文案 / i18n
desktop.everywhere.types/symbols、typesHelp/symbolsHelp和native.moreInformation。node scripts/i18n/verify-app-language-localization.mjs(passed)和node scripts/i18n/generate-i18n.mjs --check(en-US/zh-CN 11904/11904 complete),没有放宽脚本。逻辑归属 / Logic placement
N/A:只改界面呈现和点击区域,不涉及可共享的业务逻辑。
性能与内存 / Performance and memory
N/A:只改页签行的布局,没有新增后台任务、缓存或依赖,搜索路径不变。
设置 / Settings
N/A:不涉及设置项。
插件契约 / Plugin contract
N/A:不涉及契约和宿主方法。
发行包与资源 / Bundle and resources
N/A:不涉及运行时资源。
无用代码与重构 / Dead code and refactoring
验证 / Verification
./scripts/desktop/desktop-go.sh test ./internal/workbench -run TestEverywhere./scripts/desktop/desktop-go.sh test ./internal/workbench -run TestEverywhere./scripts/desktop/desktop-go.sh test ./internal/workbench./scripts/desktop/desktop-go.sh test -race ./internal/workbench -run TestEverywhere./scripts/desktop/desktop-go.sh test ./...TestVisualSearchResults(vivahead lithevisual,中英 × 明暗)gofmt -l(改动的两个 Go 文件)node scripts/i18n/verify-app-language-localization.mjs、node scripts/i18n/generate-i18n.mjs --check./scripts/agent-notes/verify-agent-notes.shverify-platform-feature-matrix.sh、verify-platform-feature-matrix-change.sh origin/main HEADrg命令未能执行的检查和原因:
提交前确认 / Final checks
main(7112e478f)创建,目标分支是main。