Skip to content

fix(ui): expose Regenerate for failed turns with no assistant output - #2381

Merged
M4n5ter merged 1 commit into
mainfrom
fix/failed-empty-turn-regenerate
Aug 7, 2026
Merged

M4n5ter merged 1 commit into
mainfrom
fix/failed-empty-turn-regenerate

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 7, 2026

Copy link
Copy Markdown
Member
English

Summary

  • render the assistant recovery surface for recorded terminal conversational turns even when no assistant event was produced
  • keep inferred legacy turns and internal operations from exposing invalid Regenerate or Branch actions
  • keep empty running turns free of actionable recovery controls

Root cause

TurnView mounted the assistant message only when the turn had timeline content or an active live-streaming projection. A request that failed before producing text, thinking, or tool events therefore lost both its failure banner and the footer that owns Regenerate.

The recovery surface now follows the durable turn model instead of timeline presence alone. A turn with a real user prompt and a recorded terminal state can render failure or abort presentation plus its recovery actions without assistant output. The evidence and ownership checks deliberately exclude inferred legacy completion and internal operations such as compaction, which do not have a valid conversational regeneration source.

Validation

  • npm --workspace @maka/ui test — 475 passed, 0 failed
  • Desktop turn presentation and footer action tests — 22 passed, 0 failed
  • Biome format and lint on all changed files
  • git diff --check

Closes #2372.

简体中文

概要

  • 即使没有产生任何 assistant event,也为具有持久化终态证据的对话 turn 渲染 assistant 恢复区域
  • 避免 inferred legacy turn 与内部 operation 暴露无效的“重新生成”或“分支”操作
  • 继续保证空的 running turn 不出现可执行的恢复控件

根因

TurnView 过去只在 turn 包含 timeline 内容或存在活跃 live-streaming projection 时挂载 assistant message。请求若在产生 text、thinking 或 tool event 之前失败,failure banner 与承载“重新生成”的 footer 就会一起消失。

现在,恢复区域不再只依据 timeline 是否存在,而是遵循持久化 turn 模型。只要 turn 具有真实 user prompt 和已记录的终态,即使 assistant 输出为空,也能渲染失败或中止信息以及恢复操作。证据与所有权检查会明确排除 inferred legacy completion 和 compaction 等内部 operation,因为它们没有有效的对话 regeneration source。

验证

  • npm --workspace @maka/ui test — 475 项通过,0 项失败
  • Desktop turn presentation 与 footer action 测试 — 22 项通过,0 项失败
  • 对全部改动文件运行 Biome format 与 lint
  • git diff --check

关闭 #2372。

@M4n5ter
M4n5ter merged commit 9e793a7 into main Aug 7, 2026
12 checks passed
@M4n5ter
M4n5ter deleted the fix/failed-empty-turn-regenerate branch August 7, 2026 04:24
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.

fix(ui): expose Regenerate for failed turns with no assistant output

1 participant