手动添加的自定义市场源不会自动同步,必须到「安装市场插件」里点刷新才能拉到插件更新
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
## 现象
手动添加的**自定义插件市场源**(在市场中手动填入 git / URL 添加的市场,非 Cindy 官方市场)不会自动检查更新。
上游市场仓库已经发布了插件新版本,但 Cindy 侧不会自动感知:插件页、侧边栏「插件」入口都没有任何“有更新”的提示,插件一直停留在旧版本。
目前**唯一**能触发同步的路径很隐蔽:
> 「安装市场插件」→ 在列表里找到那个**已安装的市场** → 点击「刷新」
只有这一步才会真正 sync 一次市场源,之后才能看到并安装新版本。
## 复现步骤
1. 手动添加一个自定义市场源(git 类型,例如 `git@github.com:/.git`)。
2. 从该市场安装插件并正常使用。
3. 上游市场仓库更新插件版本并推送。
4. 保持 Cindy 打开(或退出后重新启动),观察插件页。
5. **实际**:没有任何更新提示,插件仍是旧版本;单纯打开插件市场页面也不会触发同步。
6. 进入「安装市场插件」→ 找到该已安装市场 → 点「刷新」→ 才同步到新版本。
## 本地证据(已脱敏)
owner namespace 下 `plugin-market/sources.v1.json` 中,自定义市场源只在手动点刷新时才会更新 `lastSyncedAt` / `lastRevision`:
```json
{
"schemaVersion": 1,
"sources": [
{
"name": "",
"addedAt": "2026-09-11T04:19:46.410Z",
"lastSyncedAt": "2026-09-15T01:56:54.318Z",
"lastRevision": "",
"source": { "type": "git", "url": "git@github.com:/.git", "sparsePaths": [] }
}
]
}
```
`lastSyncedAt` 只在手动刷新时被推进,说明除手动刷新外没有其他同步触发点。
## 期望行为
- 启动时,以及按一定时间间隔(例如每几小时 / 每天)**自动同步**已添加的自定义市场源,与官方市场一样能检查到插件更新。
- 同步到新版本时,在插件页 / 侧边栏「插件」入口给出可见提示(更新角标或“有更新”标记)。
- 由用户点击确认后再更新,不要求在用户无感知的情况下自动覆盖安装。
- 源不可达或网络失败时静默重试,不弹出错误打断用户。
## 为什么值得修
自定义市场多用于团队内部分发内部插件,迭代频率很高。当前“更新”能力藏在“安装市场插件”页面里,入口与语义都不匹配,实际等同于没有更新能力;用户会在完全不知情的情况下长期停留在旧版本。
## 环境
- Cindy 版本:0.1.81
- OS:win32 x64(Windows 11 专业版 10.0.26100)
- 市场源类型:git(手动添加)
- 界面语言:zh-CN
## 相关
- #2210 / #2219 曾为插件市场 installed 源增加过自动更新机制,但手动添加的自定义市场源仍未自动同步。
Contributor guide
Research direction
Start by tracing the existing installed-market auto-update work referenced in issues #2210 and #2219, then compare its sync triggers with the manual refresh path described here. Identify where custom sources update lastSyncedAt and lastRevision, and where plugin-page or sidebar update indicators are assembled. Done means custom sources are periodically retried, updates are visibly indicated, and installation remains user-confirmed without disrupting users on network failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100