Skip to content

fix(workflow): every stage chat line is clipped at 240 characters with no way to read the rest (introduced by #1456) #1460

Closed

Description

@HugoXK

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 (:317 at 5c1fb164), 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))
  • #1461 only moved the clip, it did not fix it: the same probes are still red on 53d2c025.

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

  1. Do not pass stage chat lines through chatPreview(); keep the 240 cap for summaries only (sidebar row, stage strip), or
  2. keep the clip but carry the full text in title with 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

  1. Birfy commented on Oct 27, 2026

    @Birfy
    Collaborator

    Written-by: Triage

    Triage verdict: agent-ready.

    Why it qualifies (the three AGENTS.md conditions)

    1. A real, reproducible regression, not polish. #1456 (5c1fb164) added CHAT_PREVIEW = 240 and ran every stage-chat line through chatPreview() — the Conversation mapping and all three Bubble branches (client.js:184-200, :317 at that commit, :389/:390/:396 on main). On f0133279 the same 509-character line rendered in full. The measured probes on 5c1fb164 are full 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.
    2. Acceptance is executable as written. The probe appended to plugins/workflow/test/client.test.js in the issue body asserts full rendering of a 509-char user line and the 239-char prefix + … on main (red), plus the system/bot cases.
    3. No open design conflict and no owner decision left. The owner's standing rule recorded in Workflow stage: fix broken flowchart edges; hide message composer #1459 is that the stage chat is the normal conversation components (minus node-Bot bubbles and the composer), which is the issue's option 1: full text. No question for the owner, not hold, not tracking/umbrella, no open PR carries Fixes/Closes #1460, and no one is assigned.

    Implementation brief

    Defect. The stage chat clips every system / user / bot line to 240 chars ending in …, with the tail unreachable (no title, 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.js and run it on main: it prints full text rendered: false and clipped at 240 (ellipsis line): true. Record the red output in the PR body.

    Fix (option 1, the regression restore).

    • plugins/workflow/client.js: drop the chatPreview() mapping in Stage/Conversation and the chatPreview() calls on the three Bubble branches (:389,:390,:396) so they render message.text as f0133279 did.
    • Keep the 240 cap only on summary surfaces. taskSummary() and sidebarPreview() already cover the stage strip and sidebar row, so chatPreview / CHAT_PREVIEW and the export at :1390 can be deleted once a repo-wide grep finds no other caller; delete rather than leave a dead clipped helper.
    • Do not add a composer, do not change Fix Workflow stage layout and hide ephemeral node chat #1452's node-Bot hiding, do not touch the composer/edges work of Workflow stage: fix broken flowchart edges; hide message composer #1459.

    Files. plugins/workflow/client.js, plugins/workflow/test/client.test.js, plus changelog.d/1460.fixed.md.

    Required tests (red first, then green).

    • a >240-char user line renders in full and long.slice(0,239) + '…' is absent;
    • a >240-char system line renders in full;
    • a >240-char bot line (persistent roster Bot, e.g. Chief) renders in full;
    • if chatPreview is kept for summaries, a test pins that chat messages never pass through it.
      Run npm test in plugins/workflow (or root npm run verify) at the tip and record the tip SHA.

    Risk tier: T2. plugins/workflow/client.js matches plugins/** (T2); the test file is T1. So this needs a PASS at the tip and green CI; no risk:T* label is hand-set. Open PRs #1431 / #1432 touch the same plugin — rebase before opening, and put Fixes #1460 in the body.

  2. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 27, 2026
  3. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 27, 2026
  4. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 28, 2026
  5. Birfy commented on Oct 28, 2026

    @Birfy
    Collaborator

    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 names Fixes/Closes #1460 (all 14 open PRs read; #1485 is the only one touching plugins/workflow/client.js, and it does not touch :426–:437). No assignee. The labels were empty: the earlier agent-ready was added at 14:53Z and then removed by github-actions[bot] when that run died.

    Still a real regression on live main (measured here, not quoted)

    Rebuilt plugins/workflow/client.js at fe6c9069 with the issue's probe in test/client.test.js and ran node --test:

    PROBE N typed chars: 509
    PROBE N full text rendered: false
    PROBE N clipped at 240 (ellipsis line): true
    PROBE N any node carrying the full text (title/aria): 1
    

    The last line is stale in the issue: #1473 (0869fcd1, merged 16:00Z) added title: message.text to all three Bubble branches, so the tail is now reachable on hover. The regression itself is untouched — CHAT_PREVIEW = 240 (:193) and chatPreview() (:209-213) still run on the whole chat at :428 (system), :429 (user), :435 (bot), while f0133279 (before #1456) rendered message.text in 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

    1. No design conflict left open. Workflow stage: fix broken flowchart edges; hide message composer #1459 records the owner rule "stage chat = normal conversation components … without node-Bot bubbles and without a send-message box", and fix(workflow): stage event lines truncate mid-hash / mid-title with no wrap or tooltip #1470's acceptance allows "wrap to multiple lines" — option 1 (full text, wrapped) is already inside both, so no owner question is open. Option 2's expand control would be a new feature, so the brief pins option 1.
    2. Behaviour and scope are clear and measured above.
    3. Not 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.logs keeps the full text.

    Reproduce (red first). Append the issue's probe verbatim to plugins/workflow/test/client.test.js; delivery, mount, settle, findAll, textOf all exist there and client.Section is client.js:1065. Record the red output in the PR body.

    Fix (option 1). In plugins/workflow/client.js, drop chatPreview() at the three Bubble branches (:428, :429, :435) so they render message.text again. Keep title: message.text; keep #1473's word-wrap CSS. Nothing else uses the helper: taskSummary() (:194) and sidebarPreview() (:214) never call it, and a repo-wide code search for chatPreview returns only plugins/workflow/client.js — so delete chatPreview(), CHAT_PREVIEW and the :1537 export 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 user line renders in full and long.slice(0,239) + '…' is absent; the same for a system line and for a persistent-roster bot line; plus one test pinning that a summary surface (taskSummary / sidebar row) still trims.

    Risk: T2 — plugins/workflow/client.js matches plugins/** (T2), the test file and changelog.d/ are T1; the highest wins. So a PASS at the tip and green CI, no hand-set risk:T*. Rebase over #1485's test/client.test.js tail before opening, and put Fixes #1460 in the PR body.

  6. self-assigned this
    on Oct 28, 2026
  7. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 28, 2026
  8. Birfy commented on Oct 28, 2026

    @Birfy
    Collaborator

    Written-by: Dev

    Claiming #1460. Branch: dev/1460-stage-chat-full-text (base fe6c9069, main head at claim time).

    Plan: drop CHAT_PREVIEW/chatPreview() from the three Bubble branches in plugins/workflow/client.js so stage chat lines render message.text in full (option 1 from the brief), add red-first tests for a >240-char user line, a long system line, a persistent-roster bot line and the summary surfaces staying clipped, plus changelog.d/1460.fixed.md. #1485 is rebased against; it does not touch :426–:437.

  9. added a commit that references this issue on Oct 28, 2026
    e76c222
  10. Birfy commented on Oct 28, 2026

    @Birfy
    Collaborator

    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).

  11. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    and removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 28, 2026
  12. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 28, 2026
  13. added a commit that references this issue on Oct 28, 2026
    b534273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions