fix(ui): keep tool details visible during live turns - #2244
Merged
Conversation
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.
English
Summary
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
undefinedarguments 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 passednpm exec biome check -- packages/ui/src/materialize.ts packages/ui/src/__tests__/materialize.test.tsgit diff --check中文
概要
根因
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.tsgit diff --check