Repository navigation
feat(desktop): 插件设置页分为已安装和市场两个标签,仓库在齿轮菜单管理 - #1833
Merged
Merged
Conversation
- 插件页拆成「已安装」和「市场」两个标签,已安装为默认页 - 已安装:搜索框支持 / 选筛选(全部、语言服务器、构建、调试、界面、可更新、社区、已停用), 列表按已启用/已停用分组,带启用数量汇总和可更新标记 - 已安装详情:标题区显示状态、停用/启用、更新到新版本、卸载(先弹确认框); 概览、功能、设置、权限与程序、版本与来源五个标签,插件设置移到「设置」标签 - 齿轮菜单只管插件仓库和从磁盘安装;仓库弹窗列出社区、官方和自定义索引, 可添加、刷新、移除,内置仓库显示实际地址 - 社区仓库地址收为 marketplace.CommunityRepositoryURL,并传给设置窗口显示 - 已安装插件事实改为按名称排序的切片;修复 LanguageServerState 的数据竞争 - i18n:82 个已有词条补 desktop 平台,新增 desktop.plugins.installedOnThisComputer, 删除 20 个不再使用的 desktop.marketplace.* 词条
xiaoyumuxi
marked this pull request as ready for review
November 12, 2026 10:05
Lithe Review结论: ❓ 审查未完成 已由服务器取消。可以重新评论 |
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
Viva 桌面端的「设置 › 插件」原来把市场、已安装、仓库源和插件设置都塞在一个页面里,和旧 macOS 客户端的插件页差别很大:没有已安装列表的过滤和分组,插件设置挂在市场详情下面,仓库源和磁盘安装混在页面标题栏里。本 PR 按旧 macOS 插件页 1:1 复刻:市场和已安装分开,插件设置放进已安装详情,右上角齿轮只管插件仓库地址和从磁盘安装。
改动 / Changes
插件页结构(
settingswindow/window.go、marketplace_view.go)已安装标签(新增
settingswindow/installed_view.go)/会弹出过滤选项,选中后清空搜索框并切换过滤。languageServer.launch等),并列出会启动的程序。插件仓库弹窗(
settingswindow/marketplace_sources.go)marketSourceManager。数据来源(
workbench/plugins.go、workbench/settings.go、marketplace/service.go、pluginmanager/pluginmanager.go、settingswindow/controller.go)installedPluginFacts改为按名称(再按 ID)排序的切片。它在窗口线程外读取每个已安装包的清单和安装审批记录;清单读不出来的包也会列出 ID、版本和路径。pluginmanager.Manager新增Approval(id, version),用来读取安装时的审批记录(来源、权限、程序)。marketplace.CommunityRepositoryURL;设置窗口的Options新增MarketplaceURL和OfficialMarketplaceURL,仓库弹窗用它们显示内置仓库的实际地址。数据竞争修复(
workbench/lsp_status.go、workbench/app.go、workbench/pluginbackends.go)sharedState(atomic.Pointer)和sharedStateName(),跨线程只读这份原子副本。配色(
settingswindow/palette.go)界面文案(
shared/i18n/)desktop平台。desktop.plugins.installedOnThisComputer。desktop.marketplace.*词条。desktop/internal/i18n/shared.generated.go。测试
installed_view_test.go:/选择过滤。marketplace_model_test.go、marketplace_view_test.go、marketplace_search_test.go)切到「市场」标签再测。plugin_settings_view_test.go、plugin_settings_actions_view_test.go)改为从已安装详情的「设置」页签进入。功能矩阵
plugin-detail-tabs、plugin-marketplace、plugin-extension-management三条记录的证据路径和 notes,验证状态保持pending。不在本 PR 范围内 / Out of scope
类型专属:feat
多平台对齐
platform-specific),理由:范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/plugin-detail-tabs.json、plugin-marketplace.json、plugin-extension-management.json;两端实现状态保持partial,验证状态保持pending(没有执行整机验收)./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh和./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/preview HEAD.artifacts/下生成的矩阵视图统一日志系统 / Structured logging
N/A:没有新增或改动生命周期里程碑、操作终态或失败路径。启用、停用、更新、卸载都调用工作台已有的处理函数,日志沿用原有记录。
界面文案 / i18n
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
workbench/plugins.go的installedPluginFacts/describeManifest原本就在 Go 层从清单推导插件提供的能力,本 PR 在这里扩展了展示字段,没有迁入 Core。这部分应由 Core 统一给出;refactorIssue 待维护者确认后提交并回填编号:#性能与内存 / Performance and memory
设置 / Settings
插件契约 / Plugin contract
N/A:没有改动插件契约、能力版本、插件函数协议,也没有新增或修改宿主方法与通知。
发行包与资源 / Bundle and resources
N/A:没有新增运行时资源、缓存、下载物或构建步骤。仍运行了
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh,结果通过。无用代码与重构 / Dead code and refactoring
marketSourceManager,20 个不再使用的desktop.marketplace.*词条)refactorIssue:清单能力推导在 Go 层(见“逻辑归属”),待维护者确认后提交:#验证 / Verification
gofmt -l desktop/internalscripts/desktop/desktop-go.sh vet ./...scripts/desktop/desktop-go.sh test ./...settingswindow新增 4 个测试(TestInstalledTab*、TestRepositoriesDialogAddsAndRemovesAnIndex)node scripts/i18n/generate-i18n.mjs --checknode scripts/i18n/verify-app-language-localization.mjs./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/preview HEAD./scripts/desktop/verify/verify-runtime-bundle-immutability.sh未能执行的检查和原因:
提交前确认 / Final checks
preview创建;目标分支:preview.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图