fix: pin the profile's pnpm store, and restyle the update card - #148
Merged
Conversation
Two unrelated things this branch already touches. A profile whose node_modules was linked from a store pnpm would not choose again is locked shut: ERR_PNPM_UNEXPECTED_STORE refuses installs, uninstalls, updates and repairs alike, and all the user sees is "unable to change plugins". One profile reached that state with a 487 MB store inside itself and nothing pinning it, so removing a plugin that broke startup was impossible from the UI. The launch path now writes the store pnpm recorded into the profile's .npmrc before anything runs pnpm — stating a fact that already holds rather than choosing a new store — and reports the mismatch when it cannot. The update card grew a second line: what happened on the first, what it means on the second, with the version where a version belongs. The icon became a badge that carries the state, the accepted action is the only filled control on the card, and the rest is spacing. Wording and buttons are unchanged in substance — accept, skip, restart.
This was referenced Aug 22, 2026
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.
接在 #147 之后,同一轮排查里剩下的两件事及后续修复。
一、固定 profile 的 pnpm store(P0)
一个 profile 的
node_modules如果是从某个 store 链过来的,而 pnpm 下次不会再选中那个 store,整个插件系统就被从外面锁死:ERR_PNPM_UNEXPECTED_STORE拒绝的不只是安装,卸载、更新、修复一并拒绝,而用户看到的只有一句"未能修改插件配置"。实际发生的情形:某个 profile 内部有一个 487 MB 的 store(
<profile>/.pnpm-store/v10),.modules.yaml记着它,但.npmrc没有store-dir——于是 pnpm 默认去用~/Library/pnpm/store/v10,两边对不上。结果是一个会导致启动失败的插件没法从界面卸载,必须手工改配置才能救回来。修法:启动路径在任何 pnpm 运行之前,把 pnpm 自己记录过的 store 写进 profile 的
.npmrc。node_modules/.modules.yaml的storeDir,不是替用户挑一个 store;从没装过东西的 profile 没有可写的东西。时序上放在
runtime.stop()之后、repairProfilePackages()之前——修复本身也要跑 pnpm。二、更新卡片样式
第二行是新的:第一行说发生了什么,第二行说这对用户意味着什么,版本号落在第二行(版本号回答"哪一个",不回答"现在怎样")。图标变成承载状态的圆形徽章,卡片上只有被接受的那个动作是实心按钮,其余是间距。
按钮的文案和行为没变——同意更新、跳过此版本、重新启动并安装。
三、补全 dsh 补丁依赖并完善插件卸载恢复降级
dsh-desktop-hmr-fallback依赖声明:在patches/@deepseek-ai+dsh+0.1.1-rc.1.patch中声明该依赖,使全新 profile 启动时healProfilesModuleFallback正确软链该包,解决 CI Windows 冒烟测试失败问题。resetPluginProfile进行安全清理(清理package.json、cordis.patch.yml、node_modules/<pkg>、packages/<pkg>及脏 lockfile),避免卸载失败死锁。验证
npm run typecheck通过;npm test40 文件 271 测试全绿。