Repository navigation
feat(desktop): 插件市场索引固定到最新提交并静默刷新过期数据,已安装插件详情新增“更新日志”页签 - #2308
Merged
Merged
Conversation
- 读取托管在 GitHub 的插件市场索引时,先匿名查索引分支的最新提交,再读该提交下的固定地址, 绕过 raw.githubusercontent.com 对分支地址约 5 分钟的缓存;查询 5 秒超时,失败记 plugin_marketplace_pin 并改读原地址 - 设置窗口回到插件页或窗口回到前台时,数据超过一分钟就在后台静默刷新,列表照常显示 - 已安装插件详情在“版本与来源”后新增“更新日志”页签,打开时通过 Core 的 listReleases 读取市场登记仓库的 Releases:最新在前,标出预发布和已安装版本,正文按 Markdown 显示, 只打开网页链接;失败可重试并记 plugin_releases;同一窗口内按仓库缓存 - 详情过窄时页签换行,英文最窄窗口下不再被截断 - 固定 Core main 4430719(#172、#173)
xiaoyumuxi
marked this pull request as ready for review
November 22, 2026 14:56
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
raw.githubusercontent.com的分支地址读取。这个地址的缓存最长约 5 分钟,所以 Store 合入新版本后,旧索引还会被读到。设置窗口打开后也不会自己重新读。叠加起来,用户要等好几分钟,还得重开窗口,才能看到“有更新”。改动 / Changes
索引固定到最新提交(
desktop/internal/marketplace/service.go、desktop/internal/workbench/marketplace_service.go、desktop/internal/core/*)latestCommit(匿名,不带令牌)查出索引所在分支的最新提交。然后由 Core 的plugins.marketplace.resolveSource把索引和推荐列表的地址固定到这个提交(PinMarketplaceSource)。固定后的地址不带分支名,不受分支缓存影响。plugin_marketplace_pin。功能只会变慢,不会读不到。App.pinnedMarketplace())。core.GitHubRequest增加Ref字段,githubapi增加DecodeLatestCommit和DecodeReleases。设置窗口静默刷新(
desktop/internal/settingswindow/marketplace_model.go、window.go、window_view.go、marketplace_view.go)marketStaleAfter(1 分钟)时,在后台重新读取一次。已安装插件详情新增“更新日志”页签(
desktop/internal/settingswindow/installed_changelog.go、installed_view.go、controller.go、workbench/settings.go)listReleases匿名读取最近 20 个 Releases。MarkdownView显示,支持标题、列表、行内代码和链接。正文高度在布局时按实际宽度测量(ui.CustomLayout),第一帧就不会被截断。正文里的链接只打开 http/https,file://等其他链接点击无反应。plugin_releases(走已有的SettingsError)。Options.PluginReleases为 nil),不显示这个页签。页签换行(
installed_view.go)ui.Row改为ui.Flow,宽度不够时换到第二行。改动前,英文界面把窗口缩到最窄(900)时,原来的五个页签就已经超出右边。加上第六个后,1100 宽时也会被截断。文案、矩阵和 Core 固定版本
shared/i18n/features/plugin-changelog.json,包含中英 11 条desktop.pluginChangelog.*词条。已有词条native.updateLog(“更新日志”)的平台扩展到desktop。已重新生成shared.generated.go。plugin-detail-tabs(六个页签、更新日志、换行)和plugin-marketplace(索引固定到最新提交、静默刷新)。证据路径和验证动作同步补充,两端验证状态保持pending。PINNED_CORE_REVISION升到 Lithe-core-rust main4430719。其中包含:latestCommit和listReleases。截图
不在本 PR 范围内 / Out of scope
已登录 GitHub 时不带令牌读取,是为了不把令牌发给只读的公开接口。
pending。类型专属:feat
多平台对齐
desktop/internal/**),通用逻辑在 Rust Core,没有平台分支platform-specific),理由:范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/plugin-detail-tabs.json和plugin-marketplace.json:证据路径和验证动作已补,两端实现状态不变,验证状态保持pending./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh(221 条通过)和./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD(通过).artifacts/下生成的矩阵视图插件归属 / Plugin ownership
develop-lithe第三节的自查命令,结果为空dev.lithe.test.*/example/versions-fixture)和合成的 Releases,没有读取具体插件的插件包、检出或清单shared/i18n/UI 验证 / UI evidence
TestVisualInstalledChangelog(-tags 'vivahead lithevisual'),覆盖深色中文和浅色英文,尺寸 1100×720,生成的截图已检查TestInstalledTabsStayWithinANarrowDetail:英文、窗口宽 900 时,每个页签都不超出窗口。改回ui.Row后该测试失败。目标平台原生窗口验收未做统一日志系统 / Structured logging
backgroundFailedIn,操作名plugin_marketplace_pin)。更新日志读取失败用已有的SettingsError→operationFailedIn(操作名plugin_releases)界面文案 / i18n
shared/i18n/features/plugin-changelog.json(中英齐全),已运行node scripts/i18n/generate-i18n.mjs并提交生成结果;Viva 代码通过i18n.Shared读取shared/i18n/node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check(以及 i18n 测试 62/62),没有放宽脚本逻辑归属 / Logic placement
latestCommit和listReleases的请求定义、仓库地址解析(GitHubParseRemote)。平台层只发请求、解码响应和显示性能与内存 / Performance and memory
设置 / Settings
插件契约 / Plugin contract
latestCommit和listReleases是 Core 的 GitHub 请求,不是插件可调用的宿主方法scripts/desktop/build-desktop-core.sh的PINNED_CORE_REVISION已升到 Core main4430719(含 Fix/macos file open rendering lag #173)发行包与资源 / Bundle and resources
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh(通过)无用代码与重构 / Dead code and refactoring
验证 / Verification
scripts/desktop/desktop-go.sh test ./... -count=1(desktop/,链接 Core 4430719)gofmt -l ./internal ./cmd、desktop-go.sh vet ./...TestInstalledChangelog*、TestInstalledTabsStayWithinANarrowDetailmarketplace、core、settingswindow的固定地址回退和静默刷新测试TestVisualInstalledChangelog(-tags 'vivahead lithevisual')node scripts/i18n/verify-app-language-localization.mjs、node scripts/i18n/generate-i18n.mjs --check、i18n 测试./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD./.agents/skills/write-stable-tests/scripts/verify-test-stability.sh./scripts/desktop/verify/verify-runtime-bundle-immutability.shdevelop-lithe第三节插件零依赖自查命令未能执行的检查和原因:
提交前确认 / Final checks
main创建,目标分支为main.build/、target/、dist/、.artifacts/等产物,没有凭据和个人路径