tui3: trailing task and done events in turn demote settled assistant answer to raw plain workingProse
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Read deriveWorkfolds and workEntry in internal/tui3/workfold.go, then trace assistantRows in internal/tui3/render.go, focusing on entryDone and entryTask near turn boundaries. Confirm the fix preserves intermediate rolling summaries while ensuring the terminal assistant entry reaches settledMarkdown and retains markdown rendering when asynchronous events follow it.
索引モデルが issue の本文から書いたものです。
説明
Problem
In the TUI chat surface (internal/tui3), settled final assistant answers frequently fail to convert into rendered markdown answers, staying trapped as unformatted plain text with raw markdown syntax (###, **bold**, backticks) indented as step narration under previous disclosure nodes instead of standing as clean rolling answers.
This is especially prominent in manager and team turns, but also occurs in standard chats whenever background tasks, worker notifications, or tool events land near the turn boundary.
Root Cause Analysis in Code
-
workEntryininternal/tui3/workfold.go(lines 525–533):
When classifying whether an assistant entryeis working narration (demoted = true) or a settled answer,workEntryfalls through to a forward scan:for at := i + 1; at < len(es) && es[at].turn == e.turn; at++ { if groupBreaks(&es[at]) { return false } ... if es[at].kind != entryDivider && es[at].kind != entryNote && !entryWithdrawn(&es[at]) { return true } }When background task completions (
entryDone, e.g.✖ ◆ manager permissions · incomplete · 34s) or task status entries (entryTask) append to the current turn after the assistant finishes speaking,workEntrytreats them as subsequent non-divider/non-note work and setses[i].demoted = true. -
assistantRowsininternal/tui3/render.go(lines 1372–1385):if e.demoted { e.feet = nil text := e.text if e.capHead && e.capCut > 0 && e.capCut <= len(text) { text = text[e.capCut:] } return append(tags, a.workingProse(text, width)...) } if e.settled { return append(tags, a.settledMarkdown(at, e, width)...) }Because
e.demotedwas set totrue, the assistant block never enterssettledMarkdown. It routes toworkingProse, which performs raw plain-text line-wrapping with zero markdown formatting. -
Missing workfold certification in
deriveWorkfolds(workfold.go:264–316):
In manager turns or turns whereblockedtriggers (such asteam_send,entrySeam, orasks), no workfold is constructed for the turn (foldsmap has no entry for the turn). Without a certifyingf.answer == iin a workfold, the forward loop inworkEntryruns and is tripped byentryDone/entryTask.
Expected Behavior
- When nothing is clicked in the transcript, intermediate steps collapse into clean rolling summary lines (
▸ headline ... duration), and the assistant's terminal answer renders below them throughsettledMarkdownwith full markdown formatting. - Asynchronous task completion cards (
entryDone), notifications, and background events appended to the turn must not demote the assistant's final response into intermediate working prose.
Drafted with CodeAF
- 主要言語
- Go
- スター
- 115
- フォーク
- 14
- 平均マージ
- 9時間 35分
- マージ済み PR(30日)
- 752
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Agent-Field/CodeAF のほかの issue
-
area:chat bug sev:papercut
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
Agent-Field/CodeAF#1592 ·
メンテナーはふだん 1 日以内に返信
-
area:headless bug sev:critical
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Agent-Field/CodeAF#1566 ·
メンテナーはふだん 1 日以内に返信
-
area:chat bug sev:critical
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Agent-Field/CodeAF#1548 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:chat feature
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Agent-Field/CodeAF#1510 ·
メンテナーはふだん 1 日以内に返信
-
area:tests bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Agent-Field/CodeAF#1489 ·
メンテナーはふだん 1 日以内に返信
Agent-Field/CodeAF の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
siderolabs/terraform-provider-talos#414 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
JuliaComputing/jh#63 · コメント 1 件 ·
-
area/proxy kind/bug priority/backlog triage/accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
lexfrei/cloudflare-tunnel-gateway-controller#840 ·
メンテナーはふだん 1 日以内に返信
-
Priority: Normal Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cloudflare/cloudflared#1747 ·