Repository navigation
feat(desktop): 插件设置页去掉常驻说明,开关不再重复标题,范围说明收进 ⓘ - #1899
Merged
Merged
Conversation
- 每个设置仍是两行:标题行(标题、ⓘ、重置)和控件行。 - 开关不再显示和标题行相同的文字,标题只作为无障碍名称。 - 删掉每行下面的“当前为继承值……”常驻说明(词条 desktop.pluginSettings.inherited)。 - 作用范围的说明收进范围选择旁的 ⓘ,并写清全局和项目两个范围的区别。 - 保留“仅可在全局范围修改”和“已存储的值无效”两条状态提示。 - 新增无头截图场景 TestVisualPluginSettingsForm 和 docs/assets/plugin-settings-form。
xiaoyumuxi
marked this pull request as ready for review
November 14, 2026 05:51
22 of 28 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
已安装插件的“设置”标签页里,同一份信息说了好几遍:
页面因此又长又难懂。按“难懂的配置用 ⓘ、常驻文字只留错误、警告和保存结果”的界面约定精简,标题一行、控件一行的布局不变。
改动 / Changes
开关不重复标题(
plugin_settings_view.go):布尔设置的ui.Switch不再带说明文字,只用.Label(declaration.Title)给辅助技术一个名称;标题只在上面的标题行出现一次。去掉常驻的继承说明:删掉每行下面的“当前为继承值……”和对应词条
desktop.pluginSettings.inherited。globalOnly)和“已存储的值无效”(invalidStored)是状态和错误,保留。范围说明收进 ⓘ:范围选择旁的常驻文字换成 ⓘ(
w.infoButton,悬停显示提示,点击弹出说明)。desktop.pluginSettings.scopeHelp改写为先讲两个范围的区别,再提醒切换前保存或重新加载。shared.generated.go。测试(
plugin_settings_view_test.go):在已有的表单测试里加了以下检查:RoleSwitch);恢复开关的说明文字、恢复继承说明、恢复常驻范围说明,这三种情况下测试都会失败(本地反向验证过)。
截图(
plugin_settings_visual_test.go、docs/assets/plugin-settings-form/):新增无头截图场景TestVisualPluginSettingsForm。功能矩阵:在
declarative-plugin-settings的说明末尾补一句本次行为和测试名,状态保持 partial/pending。截图(深色中文 / 浅色英文):
不在本 PR 范围内 / Out of scope
plugin.json里的文字,宿主的 i18n 管不到,插件现在也没有地方提供中文。l10n/<语言>.json,按设置 ID 给出标题、说明和选项名;Core 按界面语言挑选,缺的条目回退到plugin.json的原文。归入 API-37,是pluginAPIVersion0 内的补充。validate_settings(plugin-manifest/src/settings.rs)有意按 ID 排序。是否改成声明顺序、或加order字段,是契约层面的决定,本 PR 不动。SwitchHitExtent左右各多 12pt),复选框和图标按钮也是这样。这是 Viva 的设计,应用层不做补偿。类型专属:feat
多平台对齐
platform-specific),理由:范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/declarative-plugin-settings.json的说明;状态和验证保持 partial/pending./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh(223 项通过)和./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/preview HEAD(通过).artifacts/下生成的矩阵视图统一日志系统 / Structured logging
N/A:只改呈现,没有新增生命周期里程碑、操作终态或失败路径。
界面文案 / i18n
desktop.pluginSettings.inherited,改写了desktop.pluginSettings.scopeHelp,中英都在shared/i18n/修改;运行了node scripts/i18n/generate-i18n.mjs并提交生成结果node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,都通过;没有放宽脚本逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
插件契约 / Plugin contract
N/A:不改契约和宿主方法。
发行包与资源 / Bundle and resources
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh,通过docs/assets/下的截图只是文档无用代码与重构 / Dead code and refactoring
desktop.pluginSettings.inherited已删除验证 / Verification
./scripts/desktop/desktop-go.sh test ./... -count=1(在desktop/,rebase 到 #1898 之后,Core29b35bf)TestPluginSettingsFormEditsOnlyOnExplicitSaveAndPreservesConflictDraft./scripts/desktop/desktop-go.sh vet ./internal/settingswindow/(含和不含vivahead,lithevisual标签)、gofmt -lLITHE_VISUAL_OUTPUT_DIR=… ./scripts/desktop/desktop-go.sh test -tags vivahead,lithevisual ./internal/settingswindow -run '^TestVisualPluginSettingsForm$'node --test --test-timeout=60000 scripts/i18n/test-i18n.mjsnode scripts/i18n/generate-i18n.mjs --check、node scripts/i18n/verify-app-language-localization.mjs.agents/skills/write-stable-tests/scripts/verify-test-stability.sh --base origin/preview./scripts/desktop/verify/verify-runtime-bundle-immutability.sh偶发情况:
test-i18n.mjs第一次和整套桌面测试(含 Core 重编)并行运行时,卡住了 8 分钟:generate-i18n.mjs用spawnSync("gofmt", [], { input })格式化生成的代码。采样看到 node 停在 spawnSync 的事件循环里,gofmt 停在读 stdin 上,两边互相等。未能执行的检查和原因: 没有在 Windows 实机上运行;截图来自无头渲染,不代表原生窗口验收。没有在打包后的应用里打开真实插件的设置页手动核对。
提交前确认 / Final checks
preview(已 rebase 到 feat(desktop): Core 固定版本升到 Lithe-core-rust#33,构建检测跳过被 Git 忽略的目录 #1898 之后),目标分支previewTMPDIR指向/tmp/lithe-visual/)