Repository navigation
feat(extensions): 详情可安装任一历史版本,扩展卡片交互调整 - #178
Conversation
Dependency changes are prepared in an isolated sibling directory. Replacement errors restore original files; shared-directory operations use a file lock. Tests cover failures, junctions, local links and histories beyond six versions.
Version changes verify the previous disk version under the shared installation lock and validate the prepared package before replacing dependencies. Windows junctions and pnpm virtual store paths remain inside the prepared tree until publication. Tests cover stale requests, incompatible targets, failed package operations, and restoration of the original installation.
Installed cards open details directly and place deletion confirmation beside the status. History rows offer exact version changes with shared-installation confirmation and show operation failures below the information heading. The browser preserves modal dimensions when history opens. UI tests cover card navigation, deletion confirmation cancellation, version changes, and retry after failure.
The flex baseline placed the trash glyph above the status text. A two-pixel visual offset aligns the icon in both collapsed and confirmation states; verified in the browser.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The rollback test assumed thirty microtask turns completed the request and refresh chain. It now waits for the resulting UI state and holds the update response to verify pending behavior.
Throwing from cleanup replaced the original package or restoration diagnostic. Cleanup now appends its failure and retained path to the operation error; successful publication returns a cleanup warning. Unsupported cleanup retries are removed. Real file locks or directory permissions exercise both failed-operation and successful-publication cleanup paths. Recovery documentation names the retained backup and installation lock.
…ory-recovery Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 删除 POST /api/extensions/version 与 ExtensionManager.changeVersion 及其测试:
历史版本行直接调用 operate('install', { name, version }),经 /api/extensions/check
核对类别与契约后由 /api/extensions/install 执行 pnpm add name@version,完成后检查更新。
- 删除 src/extensions/install.ts(临时副本、.install-lock、恢复逻辑)、.gitignore 的
/.extensions-operations-*/ 与客户端对「临时文件清理失败」的判断:装卸仍按原样串行跑在
extensions/ 里,这套恢复机制没有对应的故障记录。
- 删除 install() 的 --save-exact:更新与手动安装按用户给的版本范围写入依赖。
- 删除 src/extensions/versions.ts 与客户端对它的运行时导入,newerVersion 回到
src/extensions.ts;历史行按钮统一为「安装此版本」,已装版本显示「当前版本」并禁用,
本机链接安装的包全部禁用。
- 删除历史行的 kind/problems 与 expectedVersion 核对:类别与契约由 check 判定。
- 删除卡片改版后不再引用的 manage/details/create 等文案;确认标题改为整句,不再拼接按钮文字。
- 删除键第一次点击时在卡片内显示 removeBody,删除前说明会影响共用扩展目录的其他 Bot。
- 测试去掉只检查实现细节的断言(.extension-card-actions 为空、标题是 SPAN),
历史版本测试改为断言 check 与 install 的请求体和抽屉内的结果。
- docs/extensions.md 的 Owner 行恢复,安装机制说明换成一句与代码一致的描述。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ory-recovery Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
PR 描述仍在陈述当前 diff 里不存在的安装恢复路径。
本检查「The PR description states something about this codebase that is false」。
描述写:「服务端在共享目录锁内核对原安装版本、扩展类别和契约,安装后校验实际包名、版本及固定依赖声明。」「安装与卸载在同级临时副本中执行,包管理器失败时保留正式安装,文件替换失败时恢复原文件。」「Windows junction 和 pnpm virtualStoreDir 随目录切换重新定位。」「恢复未完成时保留备份和目录锁。」「清理失败返回临时目录路径;安装失败原因与清理错误一同返回。」Checks 仍勾「failure preservation, replacement restoration」与「real file-lock / directory-permission cleanup tests」。
src/extensions.ts 的 install() 对 extensions/ 直接 pnpm add,进程内 exclusive 互斥;历史行经现有 check 后 operate('install', { name, version })。345cf23 已删掉 POST /api/extensions/version、src/extensions/install.ts、.install-lock 与 --save-exact。沿这条路径找不到共享目录锁、原安装版本核对、安装后包名/版本/固定依赖校验、同级临时副本或替换失败恢复。
请把这些路径仍然存在的证据写入描述,或从描述里删掉这些句子。
— Cortico PR Gate via Cursor Cloud Agent
Sent by Cursor Automation: Cortico PR Gate
|
谢谢 @kwk1001!已合并。合并前维护者把范围收窄了(详见描述末尾):保留「详情列出全部历史版本、可安装任一版本」和卡片交互调整,安装走现有的 check → install 流程;删去了新端点、目录事务与安装锁、 |


中文
扩展详情改为“历史版本”,列出 registry 中仍存在的全部发布版本,并为可安装版本提供安装、更新或回退操作。切换前确认共享影响和重启要求,服务端在共享目录锁内核对原安装版本、扩展类别和契约,安装后校验实际包名、版本及固定依赖声明。
安装与卸载在同级临时副本中执行,包管理器失败时保留正式安装,文件替换失败时恢复原文件。Windows junction 和 pnpm virtualStoreDir 随目录切换重新定位,错误写入现有日志。恢复未完成时保留备份和目录锁。清理失败返回临时目录路径;安装失败原因与清理错误一同返回。配置、Memory 与部署数据保持原状。
已安装卡片点击或使用 Enter / Space 打开详情,移除详情、管理 World 按钮和分割线;垃圾桶放到状态行并采用两次点击确认,点击别处或 Esc 取消。错误移到“信息”标题下,空历史增加间距,展开历史时保持窗口尺寸,垃圾桶下移 2 像素改善视觉对齐。
English
Extension details now list every registry release under History and offer exact-version installation, upgrade, or rollback. The server checks the expected disk version under the shared installation lock, validates the target contract, and verifies the prepared package and exact dependency pin before publication. Package operations use a sibling staging directory with restoration on replacement failure, including Windows junction and pnpm virtual-store rebasing.
Installed cards open details directly with keyboard support. Deletion uses an inline trash confirmation beside the status, package errors appear below Information, and opening history preserves the modal dimensions. Configuration, Memory, and deployment data are retained; incomplete restoration preserves the backup and lock for inspection. Cleanup failures retain the temporary directory path and the original installation diagnostic.
Checks
pnpm test— 255 files passed; 4832 tests passed, 2 skippedpnpm run typecheckpnpm typecheck:webpnpm build:web维护者追加(合并前):维护者追加了提交 345cf23,把这个 PR 收窄为下面的内容;下面是收窄后的范围,上面的原描述保留供参考。
pnpm add name@version),重启后生效;已装的版本标为当前版本;卡片交互调整(点卡片开详情、两次点击删除、图标位置)照原样保留,删除确认里仍写明会影响使用它的其他 Bot。POST /api/extensions/version与changeVersion、src/extensions/install.ts的目录副本与.install-lock、--save-exact、src/extensions/versions.ts、历史行的 kind/problems 与 expectedVersion 核对。原因:check + install 已经覆盖安装指定版本;目录事务每次复制整个 extensions/、依赖 pnpm 内部格式、进程中途退出会留下锁,又没有失败记录证明需要它。