Repository navigation
fix(workflow): every stage chat line is clipped at 240 characters with no way to read the rest (introduced by #1456) #1460
Description
Written-by: FlyBot Product
Introduced by #1456 (5c1fb164, 2026-10-27T13:53:22Z): the Workflow stage now clips every chat line at 240 characters, with no way to read the rest. On the commit before it the same line renders in full, and #1461 did not change that: the same probe is still red on 53d2c025.
f0133279 (before) |
5c1fb164 (after) |
|
|---|---|---|
| a 509-character line in the stage chat | rendered in full — PROBE O full text rendered on f0133279: true |
240 characters ending in … — PROBE N full text rendered: false, PROBE N clipped at 240 (ellipsis line): true |
A long system line is clipped the same way (PROBE N long system line clipped too: true), and no node carries the full text in title or an aria label (PROBE N any node carrying the full text (title/aria): 0), so the tail is unreachable from the UI.
Root cause
CHAT_PREVIEW = 240 (plugins/workflow/client.js:184) and chatPreview() (:196-200) are applied to the whole chat instead of to a summary:
#1461(53d2c025) deleted the Conversation branch that used to map every message through it (:317at5c1fb164), so the clip now lands in the fallback renderer:Bubble—:387(the function),:389(system),:390(user),:396(bot):if (message.kind === 'user') return h('div', { className: 'wf-user' }, chatPreview(message.text))
#1461only moved the clip, it did not fix it: the same probes are still red on53d2c025.
The service keeps the full text (state.logs; a step reply is read with a 2000-character limit at plugins/workflow/src/service.js:778), so this is display-only data loss: the client drops the tail and offers no title, expand or copy.
Impact: the owner's own brief is cut (the composer sits on the stage), and every narrate line that quotes a Bot reply is cut too — #1452 already hides node-Bot bubbles, so those lines are the only place a node's words appear.
Reproduction
Append this test to plugins/workflow/test/client.test.js; client, delivery, mount, settle, findAll and textOf already exist in that file.
test('PROBE: a long line in the stage chat renders short', async () => {
const graph = delivery()
const long = `BRIEF ${'让发布说明覆盖四个小节,并保留每条验收命令的原文。'.repeat(20)}END`
graph.messages = [{ id: 'm1', kind: 'user', text: long }]
const call = async (name) => {
if (name === 'workflow/state') return { workflows: [graph], templates: [{ id: 'delivery', name: '发布交付流水线' }] }
return { ok: true, workflows: [graph] }
}
const view = mount(client.Section, { roster: { bots: [] }, call, actions: {} })
await settle()
findAll(view.tree, node => node.type === 'button' && textOf(node).includes('发布交付流水线'))[0].props.onClick()
await settle()
const text = textOf(view.tree)
const titled = findAll(view.tree, node => Object.values(node.props ?? {}).some(value => typeof value === 'string' && value.includes('BRIEF')))
console.log('PROBE N typed chars:', long.length)
console.log('PROBE N full text rendered:', text.includes(long))
console.log('PROBE N clipped at 240 (ellipsis line):', text.includes(`${long.slice(0, 239)}…`))
console.log('PROBE N any node carrying the full text (title/aria):', titled.length)
view.unmount()
})Printed on 5c1fb164:
PROBE N typed chars: 509
PROBE N full text rendered: false
PROBE N clipped at 240 (ellipsis line): true
PROBE N long system line clipped too: true
PROBE N any node carrying the full text (title/aria): 0
The same line on f0133279 prints PROBE O full text rendered on f0133279: true, which is what makes this a regression rather than a missing feature.
Expected — either shape
- Do not pass stage chat lines through
chatPreview(); keep the 240 cap for summaries only (sidebar row, stage strip), or - keep the clip but carry the full text in
titlewith an expand control, and always show the owner's own line in full.
Reachability
The running instance is at e37f1f8 (2026-10-26T12:57:03Z), which predates the Workflow surface, so this stage is not yet visible to users; the measurement above is on 5c1fb164, and the re-run on 53d2c025 (2026-10-27) prints the same five lines.
Duplicate check
Search over open and closed issues as of my read: workflow chat message truncated 240 → 0 results; workflow message preview clip ellipsis → 0 results. The open #1459 asks for the opposite direction (hide the composer, fix the edges) and does not mention clipping.
Activity
Birfy commentedon Oct 27, 2026
Written-by: Triage
Triage verdict: agent-ready.
Why it qualifies (the three AGENTS.md conditions)
#1456(5c1fb164) addedCHAT_PREVIEW = 240and ran every stage-chat line throughchatPreview()— theConversationmapping and all threeBubblebranches (client.js:184-200,:317at that commit,:389/:390/:396onmain). Onf0133279the same 509-character line rendered in full. The measured probes on5c1fb164arefull text rendered: false,clipped at 240 (ellipsis line): true,any node carrying the full text (title/aria): 0— display-only data loss; the service keeps the full text.plugins/workflow/test/client.test.jsin the issue body asserts full rendering of a 509-char user line and the 239-char prefix +…onmain(red), plus the system/bot cases.hold, not tracking/umbrella, no open PR carriesFixes/Closes #1460, and no one is assigned.Implementation brief
Defect. The stage chat clips every
system/user/botline to 240 chars ending in…, with the tail unreachable (notitle, no aria label, no expand). Owner briefs and narrate lines that quote a Bot reply are cut; after #1452 those narrate lines are the only place a node's words appear.Reproduction (red first). Append the issue's probe to
plugins/workflow/test/client.test.jsand run it onmain: it printsfull text rendered: falseandclipped at 240 (ellipsis line): true. Record the red output in the PR body.Fix (option 1, the regression restore).
plugins/workflow/client.js: drop thechatPreview()mapping inStage/Conversationand thechatPreview()calls on the threeBubblebranches (:389,:390,:396) so they rendermessage.textasf0133279did.taskSummary()andsidebarPreview()already cover the stage strip and sidebar row, sochatPreview/CHAT_PREVIEWand the export at:1390can be deleted once a repo-wide grep finds no other caller; delete rather than leave a dead clipped helper.Files.
plugins/workflow/client.js,plugins/workflow/test/client.test.js, pluschangelog.d/1460.fixed.md.Required tests (red first, then green).
userline renders in full andlong.slice(0,239) + '…'is absent;systemline renders in full;botline (persistent roster Bot, e.g. Chief) renders in full;chatPreviewis kept for summaries, a test pins that chat messages never pass through it.Run
npm testinplugins/workflow(or rootnpm run verify) at the tip and record the tip SHA.Risk tier: T2.
plugins/workflow/client.jsmatchesplugins/**(T2); the test file is T1. So this needs a PASS at the tip and green CI; norisk:T*label is hand-set. Open PRs #1431 / #1432 touch the same plugin — rebase before opening, and putFixes #1460in the body.Birfy commentedon Oct 28, 2026
Written-by: Triage
Triage verdict: agent-ready — re-triaged from the live board (2026-10-28T00:1xZ), not from the previous run's note.
Board check
No
hold. No open PR namesFixes/Closes #1460(all 14 open PRs read; #1485 is the only one touchingplugins/workflow/client.js, and it does not touch:426–:437). No assignee. The labels were empty: the earlieragent-readywas added at 14:53Z and then removed bygithub-actions[bot]when that run died.Still a real regression on live
main(measured here, not quoted)Rebuilt
plugins/workflow/client.jsatfe6c9069with the issue's probe intest/client.test.jsand rannode --test:The last line is stale in the issue: #1473 (
0869fcd1, merged 16:00Z) addedtitle: message.textto all threeBubblebranches, so the tail is now reachable on hover. The regression itself is untouched —CHAT_PREVIEW = 240(:193) andchatPreview()(:209-213) still run on the whole chat at:428(system),:429(user),:435(bot), whilef0133279(before #1456) renderedmessage.textin full. #1456's own summary says the 240 cap was for "short task summaries"; applying it to chat is the accident, and #1461 only moved it.Three conditions
hold, not tracking/umbrella, not team-via-groups.Implementation brief
Defect. Every stage-chat line past 240 chars is replaced by
…. The owner's own brief, system lines and narrate lines that quote a node reply are cut — after #1452 those narrate lines are the only place a node's words appear. Display-only:state.logskeeps the full text.Reproduce (red first). Append the issue's probe verbatim to
plugins/workflow/test/client.test.js;delivery,mount,settle,findAll,textOfall exist there andclient.Sectionisclient.js:1065. Record the red output in the PR body.Fix (option 1). In
plugins/workflow/client.js, dropchatPreview()at the threeBubblebranches (:428,:429,:435) so they rendermessage.textagain. Keeptitle: message.text; keep #1473'sword-wrapCSS. Nothing else uses the helper:taskSummary()(:194) andsidebarPreview()(:214) never call it, and a repo-wide code search forchatPreviewreturns onlyplugins/workflow/client.js— so deletechatPreview(),CHAT_PREVIEWand the:1537export entry instead of leaving dead clipped code. Do not touch #1452's node-Bot hiding, #1459's composer/edges work, or #1473's wrapping.Files.
plugins/workflow/client.js,plugins/workflow/test/client.test.js,changelog.d/1460.fixed.md.Required tests. A >240-char
userline renders in full andlong.slice(0,239) + '…'is absent; the same for asystemline and for a persistent-rosterbotline; plus one test pinning that a summary surface (taskSummary/ sidebar row) still trims.Risk: T2 —
plugins/workflow/client.jsmatchesplugins/**(T2), the test file andchangelog.d/are T1; the highest wins. So a PASS at the tip and green CI, no hand-setrisk:T*. Rebase over #1485'stest/client.test.jstail before opening, and putFixes #1460in the PR body.Birfy commentedon Oct 28, 2026
Written-by: Dev
Claiming #1460. Branch:
dev/1460-stage-chat-full-text(basefe6c9069, main head at claim time).Plan: drop
CHAT_PREVIEW/chatPreview()from the threeBubblebranches inplugins/workflow/client.jsso stage chat lines rendermessage.textin full (option 1 from the brief), add red-first tests for a >240-charuserline, a longsystemline, a persistent-rosterbotline and the summary surfaces staying clipped, pluschangelog.d/1460.fixed.md. #1485 is rebased against; it does not touch:426–:437.Render every Workflow stage chat line in full
Birfy commentedon Oct 28, 2026
LIVE note (Asia/Shanghai 2026-10-28) — still open; title clip may also show in Workflow UI
This issue is still OPEN (stage chat 240-char clip from #1456). bot-im’s LIVE pass on tip ~55e1c27a still saw ~240-char clipping in the Workflow UI.
Owner asked these LIVE defects filed/updated: 「这些问题也要提issue去改」 (t640u).
Render every Workflow stage chat line in full (ThinkFlowLab#1510)