Skills Manager v1.26.0
发布日期:2026-07-03
递交范围:v1.25.2...v1.26.0
发布概览
用户可见更新
- 新增「备份」页 —— 侧边栏新入口,把备份相关的一切收拢到一处:连接状态、立即备份、快照历史与一键恢复、备份范围清单(备份了什么、不备份什么)、断开连接。「技能库」工具栏的备份控件收口为一个状态点,点击跳转至此;设置页的 Git 地址栏保留为高级入口。
- 恢复永远可撤销 —— 恢复任意快照前,当前状态(包括未保存的修改)会先存成一个独立的可见快照并显示在历史中;恢复中途失败会自动回滚到该快照。旧的「恢复前请先提交或同步」限制已移除。
- 访问令牌不再留在文件里 —— 备份地址中内嵌的令牌(
https://user:token@host/...)会自动迁移到系统钥匙串(macOS 钥匙串 / Windows 凭据管理器 / Linux Secret Service):.git/config与应用数据库重写为无凭证地址并重新验证连接,任何一步失败都会整体回滚。新保存或克隆的地址也会同样消毒。git 只在内存中获得凭证——令牌不再出现在任何文件或日志中。 - 断开连接同时清除本机凭证 —— 断开时会连同远端配置一起删除钥匙串中保存的访问凭证。远端数据和其他设备不受影响。
- 更清晰的状态语言 —— 待备份状态会显示「有 N 个技能的更改尚未备份」;备份失败不再是一闪而过的提示,而是持久的红色状态卡,附人话原因和「重试备份」按钮。
- 首次启动即可恢复 —— 全新安装且技能库为空时,应用会先问:「全新开始,还是从备份恢复?」粘贴备份仓库地址即可把所有技能同步过来(#193/#140 的教训:恢复入口不能藏在工具栏里)。
- 大小警示 —— 单个技能目录超过 100 MB 或备份总量超过 1 GB 时,备份页会给出警示(目前仅警示,超大技能仍会备份)。
开发者与治理更新
- 新增核心模块
git_credentials:keyring v3(apple-native/windows-native/sync-secret-service+ vendored libdbus)、URL userinfo 解析、只回显环境变量的静态 askpass 脚本——磁盘上没有任何机密。 - 新增命令
git_backup_sanitize_remote_url、git_backup_migrate_credentials、git_backup_size_report;git_backup_set_remote改为返回消毒后的地址,git_backup_restore_version返回安全点 tag。应用启动时在后台幂等地执行凭证迁移。 - 备份重设计 Phase 1 验收全部自动化:#244(备份循环 + 模拟重启后状态仍一致)、#260(断开后 origin 与设置都清空且幂等)、迁移失败不留半迁移状态、恢复安全点捕获未提交修改、URL 凭证解析——测试总数 304。
test.yml新增 Linux cargo check job,Linux 独有的编译问题(如 keyring 的 vendored libdbus)在 push 时即暴露,不再拖到发版;此前 Linux 只在发版 workflow 中编译。- git 错误映射从备份页提取为
lib/gitErrors.ts,与首启对话框共用;备份提案 Phase 1 状态已更新至docs/backup-redesign-proposal.md§7。
当前校验状态
- ✅ 跨平台构建通过(macOS Intel / macOS ARM / Windows x64 / Linux x64)
- ✅ TypeScript typecheck 通过
English release notes
Release date: 2026-07-03
Commit range: v1.25.2...v1.26.0
Release Overview
- First installment of the backup redesign (cluster #24 / #264): a dedicated Backup page, restores that are always undoable, and access tokens moved out of files into the OS keychain.
User-facing
- New "Backup" page — A sidebar entry that gathers everything backup-related in one place: connection status, Back Up Now, snapshot history with one-click restore, a clear list of what is and isn't backed up, and Disconnect. The Library toolbar's backup controls collapse into a single status dot that links here; the Git URL field in Settings remains as an advanced entry.
- Restore is always undoable — Before restoring any snapshot, the current state (including unsaved edits) is first saved as a visible snapshot of its own and shown in the history; a failed restore rolls back to it automatically. The old "commit or sync before restoring" blocker is gone.
- Access tokens leave your files — Tokens embedded in backup URLs (
https://user:token@host/...) are automatically migrated into the OS keychain (macOS Keychain / Windows Credential Manager / Linux Secret Service):.git/configand the app database are rewritten to the credential-free URL and the connection is re-verified, with a full rollback if any step fails. Newly saved or cloned URLs are sanitized the same way. Git receives credentials in memory only — tokens no longer appear in any file or log. - Disconnect also removes this machine's credential — Disconnecting deletes the stored keychain credential along with the remote configuration. Remote data and other devices are unaffected.
- Clearer status language — The pending state now says how many skills have unbacked changes, and a failed backup stays visible as a red status card with a plain-language reason and a Retry button instead of a vanishing toast.
- First-launch restore — On a fresh install with an empty library, the app asks up front: start fresh, or restore from a backup? Pasting the backup repository URL brings everything over (#193/#140 lesson: the restore entry must not be buried in a toolbar).
- Size warnings — The Backup page warns when a single skill folder exceeds 100 MB or the whole backup exceeds 1 GB (warn-only for now; oversized skills are still included).
Developer & Governance
- New
git_credentialscore module: keyring v3 (apple-native/windows-native/sync-secret-servicewith vendored libdbus), URL userinfo parsing, and a static askpass script that only echoes environment variables — no secrets on disk. - New commands
git_backup_sanitize_remote_url,git_backup_migrate_credentials,git_backup_size_report;git_backup_set_remotereturns the sanitized URL andgit_backup_restore_versionreturns the safety-point tag. App startup runs the credential migration idempotently in the background. - Backup-redesign Phase 1 acceptance is now automated: #244 (status stays in-sync across a simulated restart), #260 (disconnect clears origin and setting, idempotent), migration rollback leaves no half-migrated state, restore safety point captures dirty edits, and URL credential parsing — 304 tests total.
test.ymlgains a Linux cargo-check job so Linux-only compile breaks (e.g. keyring's vendored libdbus) surface on push instead of at release time; previously Linux was only compiled by the release workflow.- Git error mapping extracted from the Backup page into
lib/gitErrors.ts, shared with the first-run dialog; backup proposal Phase 1 status updated indocs/backup-redesign-proposal.md§7.
Current Verification
- ✅ Cross-platform build passed (macOS Intel / macOS ARM / Windows x64 / Linux x64)
- ✅ TypeScript typecheck passed
完整变更:v1.25.2...v1.26.0