perf(device-link): 按可见内容分页并按需读取工作详情 - #4081
Conversation
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. |
|
| Filename | Overview |
|---|---|
| packages/maker-shared/src/historyViewController.ts | 新增共享历史分页、展开详情、缓存及生命周期控制器;普通刷新会吞掉并发的旧页请求。 |
| apps/desktop/src/main/localDb/ipc/historyViewReader.ts | 新增基于可见项目和字节预算的 Host 历史投影及详情分页读取。 |
| apps/desktop/src/main/localDb/ipc/messages.ts | 注册历史视图、展开意图和工作详情 IPC,并校验会话范围锚点。 |
| apps/desktop/src/main/device-link/dispatch.ts | 根据每个控制端的历史视图状态抑制详情推送,并合并发送失效通知。 |
| packages/maker-shared/src/historyViewProjection.ts | 将思考和可延迟工具活动折叠成稳定、可恢复的工作摘要。 |
| apps/desktop/src/renderer/lib/makerChatStore.ts | 为远程 Desktop 会话接入共享历史控制器、兼容降级和定位流程。 |
| apps/mobile/app/sessions/[sessionId].tsx | Mobile 会话页切换到投影历史渲染,并接入后台暂停、分页和消息定位。 |
| apps/mobile/src/session/remoteHistoryView.ts | 新增按设备和会话隔离的 Mobile 历史控制器注册及 React 订阅封装。 |
Sequence Diagram
sequenceDiagram
participant C as Desktop/Mobile 控制端
participant V as HistoryViewController
participant H as 被控 Desktop Host
participant DB as SQLite 历史
C->>V: 打开远程会话
V->>H: messages:view
H->>DB: 按原始游标扫描
H-->>V: 正文 + 工作摘要
V-->>C: 渲染可见历史
C->>V: 展开工作摘要
V->>H: messages:view-intent
V->>H: messages:work-details
H->>DB: 分页读取完整范围
H-->>V: 详情页
V-->>C: 自动续读并渲染
H-->>V: history-view-changed
V->>H: 合并后的刷新请求
Prompt To Fix All With AI
### Issue 1
packages/maker-shared/src/historyViewController.ts:62-68
**旧页请求被吞掉**
普通刷新或失效刷新仍在进行时,用户触发的“加载更早”会直接复用现有 `pagePromise`,因此不会执行 `older=true` 的旧页读取。调用方在该 Promise 结束后仍按成功处理,但列表没有增加任何旧内容,用户只能再次操作。建议保留这一分页意图,并在当前请求完成后执行。
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "perf(device-link): 按可见内容分页并按需读取工作详情" | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bda60c1d29
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
命中 UI 路径(apps/desktop/src/renderer/components/chat/MessageStream.tsx / apps/desktop/src/renderer/components/chat/WorkGroupBlock.tsx / apps/desktop/src/renderer/components/chat/messageWorkGroups.ts 等)但 description 未附界面效果证据——建议补充改动后效果:截图/录屏,或改动后界面的 HTML 页面(```html 代码块、.html 附件或在线预览链接),便于确认界面符合 DESIGN.md 设计规范。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7c1d7c74f
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@dashhuang 👋 这个 PR 还有 2 条 review conversation 没 resolve(packages/maker-shared/src/historyViewController.ts / packages/maker-shared/src/historyViewRender.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76cfd360d1
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
76cfd36 to
6a18b1c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a18b1c4f9
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f8a9e9420
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b7ea18ec2
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@dashhuang 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/renderer/lib/makerChatStore.ts),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fee8b97497
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
fee8b97 to
8c4ec31
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c4ec31a8b
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
4ccd274 to
379caff
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 379caff501
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
e3583ef to
f409dfb
Compare
…d-harness Take makecindy#4081 on-demand remote history. Retrigger Windows 2/2 after maker-core windows-git-path-powershell flake (this PR does not touch it). Signed-off-by: Bill Yuchen Lin <10104354+yuchenlin@users.noreply.github.com>
这次改了什么
摘要
手机补齐任务内的历史定时失败提示,与桌面共用失败快照排序和显示条件。已读不消除历史失败;关闭只写当前区域/账号/设备/任务的本机偏好,新失败重新显示。任务运行、当前错误、退出中断或续跑等待时让位给对应提示。沿现有任务页读取入口复用轻量索引,同时提供提示和已读处理,不增加第二轮全调度扫描;绑定事件也会刷新,离线和不可见页面不发起读取。
远程历史改为先读取正文和工作摘要,展开后按需续读详情。Mobile 与 Desktop 远程共用读取、流式正文交接和排序规则,减少重复加载、正文收尾消失及短暂换位。
手机保留已访问任务的历史缓存;电脑未连接时,有缓存的设备仍可从设备列表进入,显示“电脑未连接,可查看已缓存内容”。离线查看暂停任务读取、详情订阅与同步提示,电脑恢复后原地核验。设备列表首次读取补齐已经离线的电脑状态,不把 relay 在线当作电脑在线;首页与直接打开任务共用在途设备查询。关闭远控、撤销访问仍沿原规则处理,缓存不授予控制权限。
同时对齐两端任务状态与中断红点:已读确认停留改为 0.2 秒,仍要求前台、同步和渲染完成;应用退出造成的持久中断告警不会因打开查看而消失,继续执行或忽略后才清除。
变更类型
feat新功能fix缺陷修复refactor/perf重构或性能优化docs/test/chore文档、测试或工程维护范围
UI 变化
docs/design-rules/DESIGN.md§2 Color Palette & Roles、§10 Theme System & Token Reference、§14.4 动效;重试按钮遵循 §5 与design-governance.md§13。复用现有主题颜色、状态点、连接提示与工作组,不硬编码单一主题;Mobile 操作触控区域沿用 44×44。异步边界
怎么验证的
自动验证
历史定时失败提示补充回归:共享状态与聚合 51 项、Mobile 横幅/已读编排 15 项及绑定事件接线 1 项、Desktop 横幅与自动化 48 项通过;最终相关门禁、两端类型检查及统一全量门禁结果见下。文案与设计台账检查通过。
所有本机测试清除继承的
CINDY_AUTH_REGION、VITE_CINDY_AUTH_REGION、NODE_ENV。离线定向回归覆盖:缓存入口与撤权隔离、离线不请求、不错误标记已读、在途响应/磁盘读取交错、旧设备列表与新 presence 竞态、Desktop 离线缓存不重置和上线首拉、离线运行任务不误触发停滞恢复。全量门禁后补充了磁盘读取与断线交错用例,并再次运行相关门禁;磁盘恢复的 reset、停用、降级保护回归保持通过。
手工验证
完成实际 diff、请求 settle 路径和独立只读复核。本轮未启动开发版或操作实机。
未执行的验证
未安装到日常实例;真实手机/桌面远程连接、断网冷启动、弱网、长历史滚动和双模式目检仍待验收。工作区为
dash/remote-history-on-demand/cindy-remote-history-on-demand;未启动 Metro,无本轮 bundle/build label 证据。不宣称已解决实机全部同步停滞。此前 maker-shared build 的无关类型/ES lib 错误曾在干净基线复现;本轮未重新验证该 build,不将两端 typecheck 等同于全部 package build。
风险
风险分类
影响与回滚
历史失败提示不修改运行记录或已读状态;关闭偏好仅在当前客户端生效,不跨设备同步。新版 Host 轻量索引包含每任务最新失败;旧 Host 回退原查询,保留最近 50 条运行记录的限制。本轮未安装日常实例,未做 Light/Dark 实机目检。
离线仅可读实际下载且仍保留的内容,不承诺所有远端历史。Mobile 内存沿用 8 个视图/约 4 MiB;历史磁盘与全部媒体不按总容量淘汰,历史单项仍有 8 MiB 保守准入保护。历史缓存所在系统 cache 目录可能被回收,长期媒体磁盘占用会增长,手动清理另做。
历史快照按区域/账号/设备/任务隔离,沿现有账号、设备、任务删除和降级清理;不能把此清理边界泛化到全部附件副本。存储 I/O 失败沿 best-effort 缓存处理,不保证异常存储下跨重启绝对清除。
Desktop 远程复用已有内存投影和原始消息磁盘缓存,未新增投影磁盘存储,因此不承诺 Desktop 重启后拥有 Mobile 同等完整的离线投影缓存。
故障半径限当前 peer/session:离线暂停读取和探测,不重连共享链路;其他设备继续沿原路径运行。未修改 SSH 路径或本地 Desktop 的补流策略。设备查询失败保留缓存和未连接状态,在线新内容仍需后续有效可达证据。
旧 Host 自动降级;中断字段缺失时维持旧显示,完整一致体验需要两端升级。本次中断同步处理现代持久标记,不宣称覆盖独立历史 error-tail 告警。
扫描预算不是进程总内存上限;单条巨型正文、展开超长详情仍可能昂贵。真实弱网性能待测量。
回滚 / 降级方式:回退本 PR 恢复旧读取与推送,缓存不替代权威历史或授权。无需数据库迁移或重新登录。存量插件影响:无。
提交前检查
本轮 review 收敛:状态入口与离场清理