Repository navigation
fix(channels): long progress titles exceed the configured line budget - #168312
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR bounds prepared tool titles to the configured progress-line budget while retaining path suffixes and status. Example: Telegram displays a Read operation with a long path and maxLineChars set to 40.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current progress-title overflow without introducing a concrete defect. The earlier dashboard CI concern is independently confirmed outside this change; remaining checks are still running. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherPrepared agent activity enters the shared channel line builder, which produces structured labels, details, and status for channel progress renderers. flowchart TD
A[Prepared agent activity] --> B[Shared channel line builder]
C[Channel progress configuration] --> B
B --> D[Progress compositor]
D --> E[Telegram preview]
D --> F[Slack progress card]
D --> G[Other channel previews]
Technical reviewBest possible solution: Keep title compaction in the shared channel builder so structured renderers receive the same bounded prepared title. Do we have a high-confidence way to reproduce the issue? Current-main source exposes the unbounded prepared label to Telegram and Slack, and the supplied baseline Telegram observations demonstrate the overflow; this review ran no target code. Is this the best way to solve the issue? The focused repair uses the existing shared owner and compaction algorithm, preserving title suffixes and status without adding configuration or a competing rendering path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 699636375966. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +12, Tests +22, Docs +2. Total +36 across 3 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 10, 2026, 3:36 AM ET / 07:36 UTC (Revision 2). |
|
The dashboard failure is independently reproduced on #59414 ( Both that run and this PR's first CI attempt fail the same two cases in
Both time out clicking The initial run has 16 fail-fast cancellations; @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Maintainer override: the only red job is checks-ui-e2e (1/2), where two session-dashboard pin cases time out because |
|
Landed in 7738181. Long tool titles now respect maxLineChars in progress drafts; Test Server before/after evidence is in the PR body. |
…openclaw#168312) Prepared progress-draft tool titles (for example 'Read from <long path>') were copied into the line label untruncated, so maxLineChars (default 120) never applied to them: a Telegram draft row stayed at 232 characters with maxLineChars=40 while commentary lines in the same draft were cut. The shared line builder now fits titled tool labels into the remaining line budget with the existing middle-ellipsis path compaction, so every channel using it benefits. Found by our Telegram Test Server bug hunt. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes progress drafts exceeding
maxLineCharswhen a prepared tool title contains a long path. Telegram showed a 232-character Read row even with a 40-character limit; Slack's detailed cards also rendered the unbounded label.User Impact
Long prepared tool titles now use the configured line budget and a middle ellipsis, retaining the filename and failure status. No configuration, defaults, SDK contracts, or persisted state change.
Why This Change Was Made
Compact prepared titles in the shared channel line builder, reserving space for the surrounding row text before any renderer consumes the label. Telegram and Slack both consume that label directly. Discord and Mattermost already compact the compositor's complete text; they now receive the same bounded title. Authored commentary and ordinary tool rows retain their existing rendering.
Checked #150671: its authored-preamble completion metadata and quiet Slack behavior are unchanged; this only bounds named tool titles.
Evidence
Current-main baseline:
aff6117e93512a393d101785148b141d3b271c33. Built candidate:1e51409eaabc047a1bdef85a60c885087d71bb4f. All channel observations below are real Telegram Test Server TDLib timelines from isolated built Gateways.📖 Read from /tmp/deep/…/file.txt failed(full path, no actual ellipsis)📖 Read from…p/deep/file.txt failed📖 Read from…p/deep/file.txt failed📖 Read from…/deep/deep/deep/deep/deep/deep/deep/deep/deep/deep/file.txt failedThe baseline overflow persisted through five edits (31.1–39.5 seconds). Both candidate repeats preserved the bounded row through five edits, delivered
FINAL_LONGLINES_OKseparately, then deleted the draft. Counts are Unicode code points; the corresponding UTF-16 lengths are 233, 35, 35, and 79.The limit-40 controls were byte-for-byte unchanged across baseline and both repeats:
💬 I am going to carefully inspect…,💬 Second I am going to carefully…, and ordinary🛠️ Exec/running/blockedrows.A separate real-provider run (
openai/gpt-5-mini, low reasoning) read the same long path: draft 76123 showed a 35-character running row and a 34-character failed row, final 76124 deliveredF3_LIVE_DONE, then the draft was deleted.node scripts/run-vitest.mjs src/channels/streaming.test.ts extensions/telegram/src/progress-draft-preview.test.ts extensions/slack/src/progress-blocks.test.ts extensions/slack/src/progress-blocks.card.test.ts— 78 tests passed, 122.47 seconds total; new core cases take milliseconds.pnpm buildand focused formatting passed in the isolated Linux build container. The pre-existing advisory Control UI gzip-budget warning also appears on the baseline build.checks-ui-e2e (1/2)and its aggregateopenclaw/ci-gatefail. The two dashboard pin-click cases also fail on independent PR feat(doctor): show actionable Node lifecycle advice #59414, job 114161791045, with the samechat-gutter-stackpointer interception. This diff does not touch the Control UI or its mocked-Gateway dashboard fixture. The initial 16 fail-fast cancellations were covered by one maintainer-authorized replay; no code was repushed.Two-way door: reverting restores the previous rendering. Blast radius is prepared named-tool titles in channel progress previews; no delivery, routing, provider, or storage behavior changes.