Repository navigation
fix(whatsapp): render CommonMark italic correctly - #113010
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 23, 2026 11:05
Contributor
Author
|
@clawsweeper re-review The prior exact-head review lease expired while the PR comment remained at |
Contributor
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 24, 2026
This was referenced Nov 1, 2026
This was referenced Nov 25, 2026
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.
What Problem This Solves
Fixes an issue where CommonMark italic such as
*text*was sent unchanged and rendered as bold in WhatsApp. The old regex converter also leaked unsupported syntax such as heading markers, labeled-link syntax, spoiler/underline markup, and fenced-code language identifiers.Why This Change Was Made
WhatsApp now declares a static
FormatCapabilityProfileand uses the shared Markdown IR renderer plus fallback engine for both direct sends and auto-replies. The old regex/placeholder converter and separate table pre-pass are removed; transport-owned mentions, media envelopes, indentation, chunk modes, and provider calls remain local. Formatting-aware chunking closes and reopens markers at boundaries and re-chunks after render expansion before the provider send.This is AI-assisted work commissioned as part of the maintainer-directed Markdown-unification wave.
User Impact
WhatsApp users now get the intended platform dialect consistently:
*italic*->_italic_instead of WhatsApp bold<u>under</u>->under;||secret||->secret[docs](https://example.com)->docs (https://example.com)# Title->*Title*- one->• one;- [x] done->[x] donets/other language identifiers are removed while code remains monospaceoff,bullets,code,block) still apply through the shared parseAuthored escapes, leading indentation, trailing newlines, newline-mode paragraph packing, private-use Unicode, and chunk-size limits remain preserved.
Evidence
Golden before/after coverage enumerates every declared construct, including the italic regression, code-language fallback, links, headings, lists/tasks, tables, blockquotes, images, mentions, escapes, indentation, and chunk boundaries.
node scripts/run-vitest.mjs extensions/whatsapp/src/text-runtime.test.ts extensions/whatsapp/src/send.test.ts extensions/whatsapp/src/auto-reply/deliver-reply.test.ts extensions/whatsapp/src/outbound-adapter.sendpayload.test.ts— 4 files, 147 tests passed after the final rebase.node scripts/check-changed.mjs -- extensions/whatsapp/src/targets-runtime.ts extensions/whatsapp/src/text-runtime.ts extensions/whatsapp/src/text-runtime.test.ts extensions/whatsapp/src/send.ts extensions/whatsapp/src/send.test.ts extensions/whatsapp/src/auto-reply/deliver-reply.ts— Blacksmith Testboxtbx_01ky79tkrz7d0xhfc94xpqn5y4, run https://github.com/openclaw/openclaw/actions/runs/30001121124, all selected formatting, typecheck, lint, boundary, ratchet, and import-cycle gates passed..agents/skills/autoreview/scripts/autoreview --mode uncommitted --stream-engine-output— accepted findings were fixed (IR-before-render chunking, indentation/trailing-byte preservation, escaped-marker safety, newline-mode parity, whitespace limiting, guard sizing, and direct-send re-chunking). The final repeated claim that only voice-note overflow was drained was rejected after verifying the commontrailingTextChunksloop and the multi-provider-call regression test.Rank-up moves: the initial exact-head lease and one explicit re-review lease both expired with onlyreview startedplaceholders. After backoff, the status runbook still reported zero completed reviews in the prior hour and about 2,030 pending exact reviews while repair/reconcile workflows ran. There were therefore no moves to apply; this infrastructure gap is recorded here rather than bypassed silently.git diff --check origin/main...HEAD— passed.LOC: total
+455/-110; production+226/-65; tests+229/-45. Production LOC grows because this channel now owns an explicit capability profile plus safe IR-aware transport chunking and byte-preservation guards, replacing the smaller but incorrect regex path and eliminating the separate table conversion path.