fix: render text formatting on the RPC send bridge path#143
fix: render text formatting on the RPC send bridge path#143omarshahine wants to merge 2 commits into
send bridge path#143Conversation
handleSend forwarded text and file to the IMCore bridge but never the attributed-text format ranges, so direct/handle sends came through plain even on macOS 15+ — only `send-rich` (and the RPC `sendRich` handler) honored formatting. The OpenClaw gateway's `message` tool uses the plain `send` method for handle targets, so its bold/italic notifications silently lost styling. Thread the format ranges through handleSend -> sendViaBridge -> the bridge sendMessage action, accepting `formatting` (the key OpenClaw emits) alongside `text_formatting`/`textFormatting` for parity with `sendRich`. Bridge transport only; AppleScript sends stay plain. Adds tests covering the threaded ranges and the no-formatting case.
|
Codex review: needs real behavior proof before merge. Reviewed June 21, 2026, 5:33 PM ET / 21:33 UTC. Summary Reproducibility: yes. from source inspection: current main's Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Merge the RPC bridge forwarding and regression tests after inspectable real behavior proof is attached and release notes stay in the maintainer-owned process. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: current main's Is this the best way to solve the issue? Yes, forwarding the existing formatting payload into the existing bridge Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e4a14f4056fb. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Problem
handleSend(RPC methodsend) forwardstextandfileto the IMCore bridge but never the attributed-text format ranges. So direct/handle sends come through plain even on macOS 15+ — onlysend-rich(CLI) and the RPCsendRichhandler honor formatting.This bites the OpenClaw gateway: its
messagetool routes plain handle targets (to: +1…) through thesendmethod and puts format ranges in aformattingparam. imsg'ssendignores it, so**bold**/*italic*notifications silently lose styling. Replies render correctly only because the gateway routes those throughsendRich.Fix
Thread the format ranges through
handleSend→sendViaBridge→ the bridgesendMessageaction, mirroring whatsendRichalready does. Acceptformatting(the key OpenClaw'smessagetool emits) alongsidetext_formatting/textFormattingfor parity withhandleSendRich.Tests
rpcSendThreadsTextFormattingToBridge— asserts ranges from theformattingkey reachinvokeBridgeastextFormatting.rpcSendWithoutFormattingOmitsTextFormatting— asserts notextFormattingkey when none is supplied.All
RPCServerBridgetests pass (7/7, no regressions).End-to-end proof (real device, macOS 15+)
On the unfixed
0.11.1binary, RPCsend+ a formatting range → plain text. With this change (release build), the same call — methodsend, bareformattingkey,transport: bridge— renders bold on the recipient.send-richalready worked; this brings the plainsendpath to parity.