fix(channels): ensure newline between narration and draft status lines#4394
Merged
theonlyhennygod merged 1 commit intomasterfrom Mar 23, 2026
Merged
fix(channels): ensure newline between narration and draft status lines#4394theonlyhennygod merged 1 commit intomasterfrom
theonlyhennygod merged 1 commit intomasterfrom
Conversation
Narration text from native tool-call providers that doesn't end with a newline now gets one appended before being dispatched to the draft updater. This prevents garbled output like "Task started.⏳ count_to" in Telegram drafts. Update test to expect trailing newline in relayed narration. Closes #4348
a03f3fe to
cb0c880
Compare
webhive
pushed a commit
to webhive/zeroclaw
that referenced
this pull request
Mar 24, 2026
zeroclaw-labs#4394) Narration text from native tool-call providers that doesn't end with a newline now gets one appended before dispatch to the draft updater. Prevents garbled output in Telegram drafts. Closes zeroclaw-labs#4348
whtiehack
added a commit
to whtiehack/zeroclaw
that referenced
this pull request
Apr 18, 2026
Upstream c70e86c (zeroclaw-labs#5505) appended `.trim()` to strip_think_tags_inline, which eats the trailing `\n` that Progress events carry (e.g. `"⏳ tool\n"`). wecom_ws note_progress_update then push_str'es straight into the work log with no separator, producing stacked progress lines without line breaks. Fix: after trim_start / trim_end, re-append `\n` if the original post-strip text ended with one. Behaviour of 0d2b57e (zeroclaw-labs#4394) is restored without losing the think-tag stripping guarantee. Added regression test strip_think_tags_inline_preserves_trailing_newline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
master\ngets concatenated directly with the next status line, producing garbled output likeTask started.⏳ count_toon_deltanow always ends with\nbefore being dispatched to the draft updaterLabel Snapshot (required)
risk: lowsize: XSagentagent: loopChange Metadata
bugagentLinked Issue
Validation Evidence (required)
Security Impact (required)
Privacy and Data Hygiene (required)
passCompatibility / Migration
Human Verification (required)
\n(no double newline — guarded byends_withcheck); empty display_text (guarded by outer!display_text.is_empty())Side Effects / Blast Radius (required)
supports_draft_updates()\n— mitigated by theends_withguardRollback Plan (required)
Risks and Mitigations