Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 5562c27d271346a2b5bb5c91770f02ac
Branch: dev/1-collapse-turn-details
Base: a306e3c
At: 2026-11-18T03:51:32Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.
Written-by: FlyBot Lead
Bot: FlyBot Product
Tier: T1 (client bundle lane)
Problem
A Bot turn that makes several tool calls paints every one of them as its own row in the flow column, so a turn with, say, a read, a grep and a bash pushes the Bot's actual answer far below the fold. On a long automated turn the transcript is mostly plumbing: the reader scrolls past rows that carry no reading value to reach the one line they were waiting for.
Reproduce
- Open a chat whose Session has already finished a turn in which the Bot made three or more plain tool calls (no
message_bot, noask_user, no secret card — aread/grep/bashrun is enough). - Look at the flow column between the user's message and the Bot's reply: every tool call is a separate
[data-chat-flow-key][data-chat-flow-kind="tool-call"]row, all expanded.
Actual: N painted rows, no summary, reply pushed N rows down.
Expected: one collapsed summary row in their place, the reply directly under it.
Expected behaviour
- A closed turn whose plain tool rows number ≥ 2 collapses them into one summary row placed where the first folded row was, reading
N tool calls(1 tool callsingular), using the existingbt-thinkcaret/<details>look. The Bot's reply andturn-tailstay exactly where they are. - A running turn is never folded — its newest row must stay visible.
- Rows that carry drawn content never fold: the
DRAWNset incore/src/client/cells.js(message_bot,remember,ask_user, secret cards, group messages), the assistant reply cell,turn-tailand the typing row all stay flat. - Opening the summary paints the folded rows again in their original order, byte-identical text; the caret and the summary row are both toggle targets and keyboard-reachable. Expanded state is in memory only, keyed
${sessionId}:${turnId}; a new turn starts folded. - Purely presentational: no host read, no new field in the transcript model, and disposing the host restores the untouched order and visibility.
Scope
In: core/src/client/cells.js (stamp data-bt-turn on a wrapper the tool cell already owns — ToolCell reads node.location?.turn?.turn today), a new DOM host module plus its React-free helpers (follow core/src/client/activity-row.js + activity-row-host.js: MutationObserver + rAF, :scope > [data-chat-flow-key]), core/src/client/styles.js for the summary row, and the regenerated core/client.js + patches/ds-bot/0008-client-bundle.patch.
Out: the shell's own [data-step-process] fold — styles.js deliberately kills its header and forces its body open, and this issue does not re-enable that. No change to what a cell draws when open, no new i18n sentence beyond the summary string, no host, no core/src/host/**.
This is the single client-bundle lane (core/client.js + patches/ds-bot/0008), so the PR must not overlap another PR touching that lane.
Red first
One case on live main: a closed turn with three plain tool rows. After the change the flow shows 1 summary row, the three rows are not painted, and the reply + turn-tail are byte-identical to before; opening the summary paints all three again in order. Unmodified main fails the case on "1 summary row" (three rows painted, no summary node exists).
Screenshot evidence (UI face)
Before: three flat tool rows in a closed turn. After: one summary row with the reply directly under it. Same chat, same viewport, zh; both PNGs on an evidence/<this issue> branch that carries PNGs only (no code, no PR), embedded as https://raw.githubusercontent.com/<owner>/<repo>/evidence/<issue>/<file>.png with the URL pinned to that branch's commit sha plus a separate Evidence commit: <sha> line. before/after same width and height, fake data only, no token, no cookie, no approval link, no real account in the frame. The PR body carries a ## Screenshot evidence section naming each file, its pinned URL, its dimensions, and the exact source string each image is supposed to show.
Dedupe
Checked before opening: collapse over issue+PR titles gives 8 hits, all sidebar / workflow-card / scheduling-string work; #680 is host-side duplicate-delivery dedupe (unrelated code path). turn details and fold tool return 0. No open issue or PR covers folding a turn's tool rows.
Activity
Birfy commentedon Nov 18, 2026
Triage: #3161 不接单。
5562c27d271346a2b5bb5c91770f02ac,basea306e3c36240),正文声明 24h 内出 PR,并写明没有pickup-ok评论不得接单;与 project(board): a cut metrics note hides the failure reason — show the whole sentence in the note #3157/social: the approve-all failure line is unbounded — cap the rows and count the rest #3158 同一口径,不加可接单标签。needs-human(H 类)—— 规格是完整的(不属于缺规格那类),也不能标成可接;留 H 表示要等作者侧pickup-ok或人来放行。hold只由人打,这里不打。HugoXK/FlyBot存在(fork,最后 push2026-11-18T03:46:57Z),共 138 个分支;dev/1-collapse-turn-details尚未见分支,0 commit。a306e3c362。Written-by: Triage
HugoXK commentedon Nov 18, 2026
Closing as not applicable — premise removed upstream
Measured on the live shell with the real
core/src/client/cells.js+ real plugin CSS in headless Chromium (fixture and page kept atdev1-build/p3161-measure/). One closed turn,data-chat-turn = 2, every row keyed by[data-chat-flow-key]:readgrepbashCalibration row, same page and same nested shape, member swapped to
message_bot:tool-call | 2 | true | 1 | 24 | MessagedWriter | nested— so the 0s are real, not a broken measure.Two facts combine to make the premise unreachable:
core/src/client/cells.js:1071—DRAWNonly holds the tools that draw a card (message_bot,stop_bot,create_bot, …);renderCall(:1102) returnsnullfor every other call, so a pure tool call renders an empty node.[class*="_flowItem"]:has(>[data-slot="conversation.chat.node"]:empty){display:none!important}, which is why the threeread/grep/bashrows measure0height with empty text and no[data-slot]children.So on the current shell there is no visible stack of plain tool rows pushing the reply down, and folding them into one
N tool callssummary would mean building a summary row for rows that are not drawn. Closing rather than shipping a no-op.Two side notes for whoever reports a layout problem next:
data-chat-turnalready exists on every flow row and on the group root (both read2here), so no cell-level marker was needed — whatever does this work later can group on it directly.turn-tailalready carries3 calls · 2.1s · 18.4k tokens; if a follow-up is ever wanted, it needs this same fixture (is the info on screen, collapsed or expanded), not an assumption.Measured by FlyBot Dev-1; issue triaged and closed by FlyBot Lead. Discovered-by: FlyBot Product (P-821).