Repository navigation
docs(agents): 提议桌面端更新渠道、可配置更新源与先看日志的更新对话框 - #1983
Closed
xiaoyumuxi wants to merge 1 commit into
Closed
xiaoyumuxi wants to merge 1 commit into
xiaoyumuxi wants to merge 1 commit into
Conversation
记录正式版 / AutoBuild 双渠道、默认指向官方仓库且可改的签名更新源、 Motty 同款标题栏绿色下载箭头与“先显示更新日志再选择下载/跳过/稍后”的 更新对话框、不保留 Dev 身份的共用设置(保留不认识的配置并提示、切换渠道 可恢复设置快照),以及 Viva fork、store、桌面端和发布流水线的落地顺序。 Refs #1913 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| ## 风险 | ||
|
|
||
| - **macOS 版本字符串**:Viva 的 macOS 安装器要求包内 `CFBundleShortVersionString` 与更新源版本一致。如果打包或安装器不接受带预发布后缀的版本,需要在 fork 里改为比较基础版本加构建号,并同步上游。 | ||
| - **私钥丢失或泄露**:所有已安装的客户端都会停在旧版本。私钥必须备份;客户端支持多把公钥,可以轮换。 |
Contributor
There was a problem hiding this comment.
这里把私钥丢失和泄露的后果混在一起了。丢失可能导致无法继续签发更新;泄露则不会让客户端自动停在旧版本:仍信任旧公钥的客户端会接受对应私钥生成的签名,攻击者若还能控制更新源或镜像,就可能投递伪造更新。仅增加新公钥也不会撤销旧公钥。建议分别说明丢失后的恢复,以及泄露后的旧钥撤销、客户端信任更新和必要的人工升级方案。
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 15, 2026
Viva 客户端接受任何一把内置公钥签的更新源,没有吊销机制,只提供比当前版本新的版本。 原来的笔记把两种情况混在一起,写成“私钥丢失会让所有客户端停在旧版本”。 - 丢失:签不了新更新源,没有安全风险;用离线备用钥继续签名,没有备用钥只能手动重装。 - 泄露:仍内置旧公钥的客户端会接受伪造的“新版本”;只加新公钥不会撤销旧钥。 要删掉泄露的公钥、用剩下的钥签发新版本,并发布手动升级和恢复默认源的公告。 - 配置时就生成离线备用钥,两把公钥都写进 LITHE_UPDATE_PUBLIC_KEYS。 同步 release-lithe Skill 和 docs/ci-builds.md。回应 #1983 的评审意见。
28 of 32 tasks
Collaborator
Author
|
这个 Draft 只有方案提议。按维护者要求,方案和实现放在同一个 PR:提议提交 关于评审指出的私钥风险:确实把两件事混在了一起,已在
这里关闭,后续讨论请到 #1993。 |
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 15, 2026
* docs(agents): 提议桌面端更新渠道、可配置更新源与先看日志的更新对话框 记录正式版 / AutoBuild 双渠道、默认指向官方仓库且可改的签名更新源、 Motty 同款标题栏绿色下载箭头与“先显示更新日志再选择下载/跳过/稍后”的 更新对话框、不保留 Dev 身份的共用设置(保留不认识的配置并提示、切换渠道 可恢复设置快照),以及 Viva fork、store、桌面端和发布流水线的落地顺序。 Refs #1913 * docs(notes): follow Motty for update notes and delta patches Motty 0.4.10 uses the Viva update package with a signed feed and fetches the release notes separately after the check. Do the same: notes live beside each feed with a version header, so no Viva fork change and no Client.Latest are needed; cross-channel checks override Config.Current. Patches come from the previous build, as Motty's mirror-release.sh does. Refs #1913 * fix(desktop): 保存设置时保留此版本不认识的配置并提示一次 正式版和 AutoBuild 共用一个 settings.json。store.Save 以前按当前版本的 结构体重写整个文件,较新版本写入的字段、或形状变了的值,换到较旧版本 保存一次就丢了;值形状不对时 Load 还会整体失败、回落默认设置。 - store.Load 按目标类型遍历文件,记住没有字段读取的键和解码不了的值; Save 把它们合并回去。当前版本自己改过或清空的字段以当前值为准, 被删掉的对象不会带回里面的键。 - 首个窗口启动时,如有不认识的配置,提示一次(数量和前五个键名), 同一组键不再重复提示。提示在恢复背景之后再保存,不会清掉背景设置。 Refs #1913 * feat(desktop): update channels, feed sources, skip and kept settings - Two channels, stable and AutoBuild, each with a configurable feed that defaults to the 1lck/Lithe-IDEA release feed. The installed channel is the default; the user's switch, "switch now" and "restore" choices are saved. - Switching compares the other channel's feed with a version of its own (0.0.0, or the release AutoBuild is building towards when waiting), forgets the last check, and never runs during a download or install. Cross-channel releases install in full. - Skip This Version per channel; the arrow and notice stay away until a newer version arrives. A check the user asks for still finds it. - Release notes are read unsigned from <feed>.notes.md after the signed check, need a matching version header, and are cut at 16 KB. - Moving to the other channel keeps settings.json in update-snapshots in the preferences directory (5 newest kept); a restore is applied by the next launch of exactly that channel and version, keeping the update settings. - Installs that cannot replace themselves say why and offer the downloads page. Refs #1913 * feat(desktop): green update arrow and a dialog that shows the changes first The start screen and a project's title bar show a green arrow at the top right once a check finds a version: a ring fills while it downloads and a badge marks it ready. The arrow opens a dialog that shows the release notes before anything downloads, with Download, Skip This Version and Later; the download size names the delta patch next to the full archive. While it downloads the dialog follows the progress with Cancel, and once downloaded its title says the version is ready and it offers Restart. Settings > Updates gains the channel list, the feed of the chosen channel with Save, a link back to the default feed under a custom one, the build's channel, time and commit, and View Changes. Picking AutoBuild on a stable build asks first; going back to stable from AutoBuild offers to wait for the next stable release or switch now, and to restore the settings kept from the last time on stable. Headless captures of both cover the dark Chinese and light English scenes (-tags vivahead with LITHE_VISUAL_OUTPUT_DIR). Refs #1913 * fix(desktop): log stored values this version keeps but cannot read store.Load keeps a value whose stored shape this version cannot decode and Save writes it back, so the value survives a downgrade. Until now nothing said so: the setting quietly ran on its default. - Store.Unread(name) returns the decode error of the values it kept for that file, or nil. - Settings and the title bar layout log app.settings.decode_failed, the editor session logs editor_session_load; the rest still loads. - The log directory and the plugin approvals fail their read as before instead of silently using the default or leaving a plugin unapproved. Refs #1913 * feat(desktop): sign and publish the stable feed with notes and delta patches Follows Motty: the release builds a signed feed with viva feed, puts the release notes beside it unsigned, and lists patches from the previous version the feed offers. - package-desktop.sh takes --stable or --autobuild and writes package_info.go for the lithe_package_info build tag (viva package takes no -ldflags): channel, build time, commit and LITHE_UPDATE_PUBLIC_KEYS. It removes the file once it has packaged. - The release workflow gains an update-feed job. Only that job gets the VIVA_UPDATE_KEY secret. publish-update-feed.sh builds stable.json, its .sig and stable.notes.md from docs/releases/v<version>.md, with patches from the version the published feed offers, and uploads them to the desktop-update-feed release. A feed that already offers a later version is left alone; runs share the desktop-update-feed-stable concurrency group. - build-viva-tool.sh builds the viva CLI from the pinned fork through desktop/go.mod, so the replace applies. - viva feed lists patches on the archives only, so an NSIS installation uses the patch of the zip for its OS and architecture; the patch is checked against the installed files either way. - AutoBuild packages pass --autobuild. Its feed is not published yet: Viva's manifest refuses pre-release versions (proposed note 2026-11-16-desktop-autobuild-update-feed). - Worktree resource manifest, docs/ci-builds.md and release-lithe list the viva tool, the secret and the variable. Refs #1913 * docs(notes): update channels implemented; propose the AutoBuild feed - Move 2026-11-15-desktop-update-channels-and-dialog to implemented and record what shipped: channels and sources, the arrow and dialog, notes beside the feed, deltas with the NSIS zip patch, kept settings and snapshots. - Propose 2026-11-16-desktop-autobuild-update-feed: the Viva fork accepts SemVer pre-release versions in the manifest so AutoBuild can publish its own signed feed. - Feature matrix: updates-check-download, updates-failure-rollback and application-settings gain the evidence, notes and test commands. They stay partial and pending until verified on real installs. Refs #1913 * fix(desktop): show the build's own update channel as Automatic (<channel>) Picking the build's own channel saves no choice: updates follow the build. The list showed it by its plain name, the same as an explicit switch, so the inherited value and an explicit one looked alike. Its entry now reads "自动(正式版)" / "Automatic (Stable)" through a new shared i18n entry, and the other channel keeps its plain name, as develop-lithe's "show the effective value" rule asks. * docs(desktop): 分开说明更新签名私钥的丢失与泄露 Viva 客户端接受任何一把内置公钥签的更新源,没有吊销机制,只提供比当前版本新的版本。 原来的笔记把两种情况混在一起,写成“私钥丢失会让所有客户端停在旧版本”。 - 丢失:签不了新更新源,没有安全风险;用离线备用钥继续签名,没有备用钥只能手动重装。 - 泄露:仍内置旧公钥的客户端会接受伪造的“新版本”;只加新公钥不会撤销旧钥。 要删掉泄露的公钥、用剩下的钥签发新版本,并发布手动升级和恢复默认源的公告。 - 配置时就生成离线备用钥,两把公钥都写进 LITHE_UPDATE_PUBLIC_KEYS。 同步 release-lithe Skill 和 docs/ci-builds.md。回应 #1983 的评审意见。
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 桌面端已经实现应用内更新和增量更新,但没有发行构建注入更新源,设置 → 更新永远显示“此构建未配置更新源”。在接上发布流水线(#1913)之前,需要先定下来几件事:
本 PR 只提交方案 Note,不改代码。界面设计稿会单独发给维护者审核,审核通过后再按 Note 的落地顺序分 PR 实现。
改动 / Changes
.agents/notes/proposed/feature/2026-11-15-desktop-update-channels-and-dialog.md,内容包括:<版本>-autobuild.<UTC 时间>。跨渠道切换从不比较完整版本号,并给出切换规则表。为此需要 Viva fork 增加Client.Latest。1lck/Lithe-IDEA的desktop-update-feed滚动 tag,写在代码里。用户可以按渠道改成镜像地址,但仍用内置公钥验签。notes字段。正式版取发布说明,AutoBuild 由提交记录生成。desktop/internal/store保存时会抹掉不认识字段的现有缺陷,以及“保留不认识的配置并提示一次”的修法。不在本 PR 范围内 / Out of scope
类型专属:docs
.agents/notes/(中文),docs/只保留操作说明、正式 schema、发布说明和验收材料;改了 Note 已运行./scripts/agent-notes/verify-agent-notes.sh范围检查 / Scope checks
功能矩阵 / Feature matrix
N/A:只提交提案 Note,没有宿主能力变化;功能矩阵在桌面端实现 PR 中更新。
插件归属 / Plugin ownership
N/A:不涉及插件。
UI 验证 / UI evidence
N/A:不改界面代码。设计稿会单独审核,实现 PR 再附无头截图。
统一日志系统 / Structured logging
N/A:不改代码。Note 已写明新日志事件需要先在 Core 日志目录声明。
界面文案 / i18n
N/A:不新增界面文案。
逻辑归属 / Logic placement
N/A:不改代码。Note 说明了更新器留在
desktop/Go 代码、复用上游 Vivaupdate包的理由。性能与内存 / Performance and memory
N/A:不改代码。
设置 / Settings
N/A:不改设置页。Note 中的设置行按“标签、ⓘ、控件、状态标签”设计,“默认”显示实际生效的地址。
插件契约 / Plugin contract
N/A:不涉及插件契约或宿主方法。
发行包与资源 / Bundle and resources
N/A:不改资源。Note 规定设置快照只写用户数据目录。
无用代码与重构 / Dead code and refactoring
N/A:不改代码。store 丢弃未知字段是缺陷,不是重构债,在 store 修复 PR 中按缺陷流程处理。
验证 / Verification
./scripts/agent-notes/verify-agent-notes.shok: 158 active Agent Note(s) verified未能执行的检查和原因: 无。只改了 Note,不涉及构建和测试。
提交前确认 / Final checks
main创建;目标分支:feat、fix、docs 为main,release 以发布流程要求为准.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图🤖 Generated with Claude Code