Skip to content

fix(ui): keep tool details visible during live turns - #2244

Merged
M4n5ter merged 2 commits into
mainfrom
fix/runtime-host-live-tool-details
Aug 5, 2026
Merged

fix(ui): keep tool details visible during live turns#2244
M4n5ter merged 2 commits into
mainfrom
fix/runtime-host-live-tool-details

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 5, 2026

Copy link
Copy Markdown
Member
English

Summary

  • Preserve durable tool arguments and settled results when the live projection intentionally carries no payload.
  • Keep meaningful live results, transient status, and output chunks authoritative.
  • Add regressions for a completed Runtime Host tool while the surrounding Turn is still running and for newer live PTY output staying ahead of its persisted snapshot.

Root cause

Runtime Host subscription events carry tool lifecycle but omit argument and result payloads. Desktop refreshes the durable transcript after each tool result, but the live overlay spread undefined arguments and an empty compatibility result over the newly refreshed record. The detail row therefore stayed blank until the live Turn retired at the end of the task.

This change fixes the ownership rule at the merge seam instead of expanding the wire protocol: live state owns transient progress, while the durable transcript fills details that the live event does not carry.

Validation

  • npm --workspace @maka/ui test — 359 passed
  • npm exec biome check -- packages/ui/src/materialize.ts packages/ui/src/__tests__/materialize.test.ts
  • git diff --check
中文

概要

  • 当实时投影按设计不携带 payload 时,保留持久化的工具参数和已完成结果。
  • 有实际内容的实时结果、临时状态和输出流仍然保持最高优先级。
  • 增加回归测试,覆盖 Runtime Host 工具已完成但整个 Turn 仍在运行,以及较新的实时 PTY 输出继续领先于持久化快照的场景。

根因

Runtime Host 的订阅事件只传递工具生命周期,不传递参数和结果 payload。Desktop 会在工具结果产生后刷新持久化 transcript,但实时 overlay 随后用 undefined 参数和空的兼容结果覆盖了刚刷新的完整记录。因此,在整个任务结束、实时 Turn 被移除以前,展开工具行只能看到空白。

本次修复没有扩大 wire protocol,而是在数据合并边界纠正所有权:实时状态负责临时进度,持久化 transcript 负责补齐实时事件没有携带的详情。

验证

  • npm --workspace @maka/ui test — 359 项通过
  • npm exec biome check -- packages/ui/src/materialize.ts packages/ui/src/__tests__/materialize.test.ts
  • git diff --check

@M4n5ter
M4n5ter marked this pull request as ready for review August 5, 2026 13:26
@M4n5ter
M4n5ter merged commit 6f6ed7a into main Aug 5, 2026
12 checks passed
@M4n5ter
M4n5ter deleted the fix/runtime-host-live-tool-details branch August 5, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant