Repository navigation
fix(desktop): 设置窗口的 ⓘ 点击不再固定白色说明卡片,只用悬停提示 - #2172
Merged
Merged
Conversation
设置窗口的 infoButton 在 0.7.0 迁移时用 ui.PopoverWith 实现:悬停显示共享提示, 点击还会固定一张白色 Popover 卡片,Escape 或再次点击才关闭。工作台和日志窗口的 ⓘ 只有悬停提示,同一客户端出现两种说明外观。 - infoButton 改成和工作台相同的 IconOnly Ghost 按钮,说明交给 Tooltip, 向右展开、右侧放不下时换到左侧;辅助技术仍把说明读作图标描述。 - 回归测试 TestGeneralInfoShowsHelpOnlyInItsTip:悬停显示、点击后不出现卡片、 移开后消失、移回再次显示,提示都在图标旁边。改动前在“点击后出现卡片”处失败。 - TestProjectToolchainTrustSwitchGrantsAndRevokesImmediately 改为悬停读取说明。 - 截图场景 m49 改名为 m49-toolchain-project-trust-click,检查点击后不留说明; m46 改为悬停截图。 - 键盘聚焦不再能打开说明(与工作台一致;Viva ui 层未开放 ShowOnFocus)。 - 更新 application-settings 与 macos-shared-hover-tooltip-style 的矩阵说明, 附点击前后截图。
xiaoyumuxi
marked this pull request as ready for review
November 18, 2026 14:47
30 of 37 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
PR 类型 / Type
改动说明 / What changes
背景 / Why
#2171 让工作台、设置窗口和日志窗口共用一份提示气泡样式,但设置窗口的 ⓘ 还有第二种说明外观:悬停时显示共享的深色提示,点击后还会固定一张白色说明卡片(Viva 的 Popover 卡片),按 Escape 或再点一次才关闭。工作台和日志窗口的 ⓘ 只有悬停提示,所以 #2170 预期的“整个客户端只有一种提示气泡”还没满足。
这次去掉设置窗口 ⓘ 的点击卡片,三个窗口的 ⓘ 都只用悬停提示。
改动 / Changes
desktop/internal/settingswindow/window_view.goinfoButton不再用ui.PopoverWith,改成与工作台、日志窗口相同的ui.Button(...).Icon(icons.Info).IconOnly().Ghost().Size(18, 18).Tooltip(help).TooltipOn(ui.TooltipRight):悬停在图标右侧显示说明,右侧放不下时换到左侧。native.moreInformation,说明仍作为图标描述交给辅助技术。components导入和卡片开关状态ui.State[bool](c, "info")。infoButton,全部一起生效;其他窗口的PopoverWith都是菜单或面板,不受影响。desktop/internal/settingswindow/general_view_test.goTestGeneralInfoHoverClickAndKeyboard改为TestGeneralInfoShowsHelpOnlyInItsTip,依次检查:无障碍名称;说明不常驻;悬停后显示在图标旁边;点击后不出现卡片;移开后消失、窗口未关闭;移回后再次显示在图标旁边。desktop/internal/settingswindow/toolchains_view_test.goTestProjectToolchainTrustSwitchGrantsAndRevokesImmediately原来点击 ⓘ 打开卡片来读取说明,改为悬停读取,再移开指针去切换开关。desktop/internal/settingswindow/visual_capture_test.gom49-toolchain-project-trust-help改名为m49-toolchain-project-trust-click,内容从“点击后固定的卡片”改为检查点击后屏幕上没有说明。m46-history-default-rules-help原来靠点击固定说明再截图,改为悬停后推进 1 秒再截图。m50的注释改为说明它截的是共享悬停提示。application-settings.json:verification删掉“点击固定、Escape、键盘操作”,改成悬停提示、点击不固定、辅助技术读出说明;notes追加 2026-11-18 的说明。macos-shared-hover-tooltip-style.json:notes补充“设置窗口 ⓘ 的点击卡片已去掉”。docs/assets/tooltip-unified-style/{before,after}/settings-click-{light,dark}.png:点击 ⓘ 之后的改动前后截图。不在本 PR 范围内 / Out of scope
components.HoverTooltip有ShowOnFocus(),但ui层没有开放,整个客户端的提示都不会因键盘聚焦显示。辅助技术仍能读出说明。如果需要让键盘用户看到提示,需要先在 Viva fork 开放这个选项,本 PR 不做。类型专属:fix
复现与根因
settingswindow.infoButton用ui.PopoverWith实现“点击固定说明”,卡片使用设置主题的theme.Popover(白色卡片)。feat(desktop): 设置页 ⓘ 说明显示在图标右侧 #1854 只把它挪到图标右侧。工作台和日志窗口的 ⓘ 一直只用Tooltip。检查项
desktop/internal/settingswindow/general_view_test.go的TestGeneralInfoShowsHelpOnlyInItsTip。把window_view.go换回 main 5e8835a 的版本运行,结果是general_view_test.go:149: pressing the ⓘ opened its help in a second card;换回修复后通过。infoButton只在settingswindow包内调用(14 个文件),都随本次改动生效;插件设置页的 ⓘ 也走同一个函数。.agents/notes/implemented/bug-fix/记录:行为约束由回归测试和功能矩阵application-settings记录,没有需要单独写 Note 的取舍。范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/<id>.json:两端的实现状态和验证状态、证据路径、owner、验证动作都如实填写;没有运行验证的保持pending。改了application-settings和macos-shared-hover-tooltip-style,状态不变(两端验证仍为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/;插件的构建步骤、资源路径和补丁没有写进docs/ci-builds.md、Agent Note 或 SkillUI 验证 / UI evidence
desktop/下运行:LITHE_VISUAL_OUTPUT_DIR=<dir> ../scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' ./internal/settingswindow/ -run 'TestVisualSettings/(m46|m49|m50)' -count=1。window_view.go上运行原来的 m49(点击后固定卡片)场景;“改动后”在本 PR 提交 b6049da 上运行。点击“信任当前项目中的工具环境”旁的 ⓘ 之后:
悬停时的提示与 #2171 相同(见 #2171 的对照表),本 PR 不改提示样式。
统一日志系统 / Structured logging
N/A:没有新增或改动生命周期里程碑、终态、降级或失败路径。
界面文案 / i18n
native.moreInformation。node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,没有放宽脚本或扩大豁免名单逻辑归属 / Logic placement
N/A:只改了设置窗口的呈现方式,没有业务逻辑。
性能与内存 / Performance and memory
N/A:没有新增后台功能、子进程、缓存、定时器或依赖,也没有改动启动、输入、滚动等热路径。去掉的是一个按需打开的弹层。
设置 / Settings
插件契约 / Plugin contract
N/A:不涉及插件契约、能力版本、插件函数协议或宿主方法。
发行包与资源 / Bundle and resources
N/A:没有新增运行时资源或构建步骤。
无用代码与重构 / Dead code and refactoring
components导入已删除。refactor标签的 Issue:没有发现。验证 / Verification
../scripts/desktop/desktop-go.sh test -race ./internal/settingswindow/ ./internal/logwindow/ ./internal/uistyle/ -count=1(在desktop/)TestGeneralInfoShowsHelpOnlyInItsTip在 main 的window_view.go上运行pressing the ⓘ opened its help in a second card;修复后通过gofmt -l desktop/internal/settingswindow/node scripts/i18n/verify-app-language-localization.mjsnode scripts/i18n/generate-i18n.mjs --check./.agents/skills/write-stable-tests/scripts/verify-test-stability.shdevelop-lithe第三节插件零依赖自查rg./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD未能执行的检查和原因:
desktop的./...:改动只在settingswindow包,已跑该包全部测试(-race)。提交前确认 / Final checks
main创建;目标分支:feat、fix、docs 为main,release 以发布流程要求为准.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图