Repository navigation
fix(telegram): keep raw command progress rows within line budget - #168464
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:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR includes Telegram tool icons, labels, separators, and statuses in the existing progress-line character budget. Example: A raw Exec progress row uses maxLineChars: 40.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep open: this PR repairs a current Telegram line-budget defect, and source review found no introduced correctness or security bug. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe shared progress compositor supplies structured activity rows; Telegram renders them into HTML or rich-message previews using the account's configured line budget. flowchart LR
A[Tool activity] --> B[Shared progress compositor]
B --> C[Telegram row renderer]
D[Account line budget] --> C
C --> E[HTML or rich preview]
E --> F[Telegram draft stream]
Technical reviewBest possible solution: Keep complete-row budgeting in Telegram's structured renderer while preserving the existing configuration and shared compactor. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main grants detail the entire configured budget and then adds visible row text; no target code was executed during this read-only review. Is this the best way to solve the issue? The repair belongs in this Telegram adapter because it adds the surrounding text; it does not resolve the linked issue's separate command-suffix preservation request. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7b125134f386. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +19, Tests +63, Docs +2. Total +84 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 Reviewed October 10, 2026, 9:51 AM ET / 13:51 UTC. |
|
Maintainer override: the only red job is check-source-contracts, which reports six legacy sessionAccessorRead calls in src/auto-reply/reply/dispatch-from-config.test-support.ts. The same check fails identically on main (https://github.com/openclaw/openclaw/actions/runs/38056049112/job/114224856770), and this PR only touches the Telegram progress renderer, its test and docs. The two cancelled jobs had already passed their affected parts (extensions-test types; QA Smoke Telegram scenarios). ClawSweeper is ready on this exact head. |
|
Landed in 7635272. Raw command progress rows on Telegram now respect maxLineChars; Test Server before/after evidence is in the PR body. |
…nclaw#168464) Telegram progress rows for raw commands exceeded progress.maxLineChars (53 code points at a limit of 40), because the renderer gave the compacted command detail the whole line budget and then added the tool icon, label and status around it. The detail now gets only the remaining budget, so the complete row fits; fitting rows and the existing clipping policy are unchanged. Found by our Telegram Test Server bug hunt; related openclaw#130144. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #130144
What Problem This Solves
Telegram raw-command progress rows exceed
progress.maxLineCharsbecause the tool icon, label, separators, and status are added outside the detail's allowance.User Impact
The complete Telegram progress row now respects the configured line budget, including running and blocked raw commands. No new configuration, SDK change, or separate command limit is introduced.
Why This Change Was Made
Reserve the fixed row text before shortening overflowing detail with the existing compactor. Preserve already-fitting rows and their formatting. Oversized prepared labels also go through the existing compactor.
This stays in Telegram's structured renderer: Discord and Mattermost use the shared whole-row text formatter, while Slack has its own independent native/card rendering path.
Checked #126480: its Slack compact commentary behavior and documentation are unchanged.
Evidence
maxLineChars: 40, raw command text, raw tool detail: two baseline recordings reached 53 code points; both candidate recordings peaked at 36 for tool rows, with zero over-budget rows. Entire progress rows, including commentary, peaked at 38.📖 Read from…p/deep/file.txt failed.gpt-5-minirun on the built candidate: two successful streamed provider responses, an actual exec turn, bounded progress rows, and the requested final reply observed by TDLib.pnpm test extensions/telegram/src/progress-draft-preview.test.ts --maxWorkers=1: 7.36s wrapper wall time, 5.89s Vitest duration.pnpm buildand targeted Oxfmt check pass in Linux isolation. Test messages are removed with receipt-validated TDLib read-back; leases, temporary credentials, and listeners are cleaned up.session-accessor-boundaryguard:dispatch-from-config.test-support.tshas six legacy reads against a zero baseline. This head and main fail with the same file, count, and message. The diff does not touch that file, its imports, or the guard.check-test-types(the affected extensions-test graph already passed) andQA Smoke CI (profile 4/4)(all nine scenarios, including the six Telegram scenarios, already passed before cancellation). The focused Telegram test shard, production types, extension lint, and channel-boundary checks passed.Merge danger: two-way door; reverting fully restores the previous renderer. Blast radius is Telegram structured progress rows; no persisted state, transport delivery policy, or other channel is changed.