fix(desktop): recover Pi after offline startup (#3382) - #3394
Conversation
Signed-off-by: qsoyq <github@19940731.xyz>
|
| Filename | Overview |
|---|---|
| apps/desktop/src/main/agent-binaries/pi-runtime-recovery.ts | 新增 Pi 可选 runtime 的单飞重试状态机,并在永久错误或应用退出时停止后续重试。 |
| apps/desktop/src/main/bootstrap-electron.ts | 将启动阶段 Pi prepare 失败接入后台恢复,同时保持失败不阻塞 Desktop 启动。 |
| apps/desktop/src/main/maker-host/index.ts | 为现有 Maker 增加幂等 Pi 动态注册,并向本地窗口及远程控制端广播 roster 变化。 |
| packages/maker-core/src/maker.ts | 增加仅追加且受 shutdown 状态保护的运行时 Agent 注册接口。 |
| apps/desktop/src/renderer/hooks/useAvailableAgents.ts | 订阅 roster 变化并失效 Agent 与 capability 缓存,使恢复后的 Pi 立即出现在选择器中。 |
| apps/mobile/app/sessions/new.tsx | 持有 sessions topic 订阅并在 roster push 后重新读取远程 Agent 列表,同时取消已失效的重连尝试。 |
| apps/mobile/src/device-link/DeviceLinkContext.tsx | 将远程 Agent roster push 路由为设备级回调供 Mobile 页面刷新。 |
| packages/device-link/src/topics.ts | 将 Agent roster 变化归入设备级 sessions topic,确保控制端可接收推送。 |
Reviews (10): Last reviewed commit: "fix(mobile): cancel stale roster resubsc..." | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d24b5c947
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: qsoyq <github@19940731.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ddab1f10a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@qsoyq 👋 这个 PR 还有 2 条 review conversation 没 resolve(packages/device-link/src/allowlist.ts / packages/device-link/src/topics.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
Signed-off-by: qsoyq <github@19940731.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf8c5b3695
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: qsoyq <github@19940731.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7c46e7e9e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
命中 UI 路径但 description 未附界面效果证据。建议补充改动后效果:截图/录屏,或改动后界面的 HTML 页面(```html 代码块、.html 附件或在线预览链接),便于确认界面符合 DESIGN.md。 |
Signed-off-by: qsoyq <github@19940731.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51703a7d12
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: qsoyq <github@19940731.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75a6d0db5a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: qsoyq <github@19940731.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7ed4d83eb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: qsoyq <github@19940731.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 73f674aa3a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…3394) Signed-off-by: qsoyq <github@19940731.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4de0d0e55
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: qsoyq <github@19940731.xyz>
|
这个 PR 需要维护者确认后再继续(产品/跨端可见性 + preload/IPC)。 请维护者直接在本 PR 上 Approve;若要改,请 Request Changes。讨论记录:#3417 |
|
@qsoyq 👋 这个 PR 目前与 请在本地 merge 最新的 |
Signed-off-by: qsoyq <github@19940731.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 036ebb7b9b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: qsoyq <github@19940731.xyz>
…pi-network-recovery-1
Signed-off-by: qsoyq <github@19940731.xyz>
ab6a02e to
7465b5d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7465b5d7fa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…pi-network-recovery-1 Signed-off-by: qsoyq <github@19940731.xyz> # Conflicts: # packages/maker-core/src/agents/pi/windows-git-path-powershell.test.ts
|
@qsoyq 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/renderer/hooks/useAvailableAgents.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
Signed-off-by: qsoyq <github@19940731.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8c598df09
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: qsoyq <github@19940731.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be6464d021
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@qsoyq 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/renderer/hooks/useAvailableAgents.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
Signed-off-by: qsoyq <github@19940731.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14662e854d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: qsoyq <github@19940731.xyz>
|
@qsoyq 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/renderer/hooks/useAvailableAgents.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
这次改了什么
摘要
修复 Cindy 断网启动时 Pi runtime manifest 获取失败后,在网络恢复时无法回到当前进程的问题。Pi 仍然是可选 Agent,不会阻塞 Claude Code、Codex 或主界面启动;恢复时重新走现有 managed prepare/CDN 校验流程,成功后增量注册到现有 Maker。
变更类型
fix缺陷修复feat新功能refactor/perf重构或性能优化docs/test/chore文档、测试或工程维护范围
.verifiedruntime 的既有策略;不重建 Maker;不改变登录页 Retry 行为。远程与多端适配结论
maker:agents:changed已加入 push allowlist 和账号级 topic 路由,Desktop 远程控制端可以刷新被控端 Agent roster。maker:list-available-agents;无新增视觉 UI,仅更新运行时列表。UI 变化
怎么验证的
自动验证
手工验证
未完成真实断网/恢复网络的手工验证。当前 Desktop dev 启动会优先使用本地
apps/pi-bin,且没有可强制跳过 dev fallback、改走 runtime CDN 的启动参数;因此pnpm restart:desktop:remote无法可靠模拟 Issue 中的 CDN manifest 失败路径。未执行的验证
未执行
/cindy-dev-cdp-explorer的真实 CDN 断网/恢复测试,也未执行跨平台打包 smoke。该场景需要在后续 beta packaged 包中验证:断网启动时 Pi 不显示,网络恢复后当前进程重新 prepare、注册并刷新 Agent 选择器。风险
风险分类
影响与回滚
提交前检查
git commit -s,见 DCO)