fix(imessage): avoid visible media placeholder text#81209
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. Current main source and tests show the media-only image path rewrites empty text to Real behavior proof Next step before merge Security Review detailsBest possible solution: Merge the code shape after live after-fix iMessage proof or an explicit maintainer proof override: keep RPC Do we have a high-confidence way to reproduce the issue? Yes. Current main source and tests show the media-only image path rewrites empty text to Is this the best way to solve the issue? Yes for the code direction after the follow-up. The patch now decouples visible RPC text from internal echo matching, which is the narrow maintainable fix for the visible-placeholder bug. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 1d6e5f7a3e42. |
Independent reproduction on v2026.5.12-beta.3Confirmed the bug on a separate machine running OpenClaw Synthetic repro — same recipe as the PR description, run from {
"sentText": "<media:image>",
"rpcMethod": "send",
"rpcText": "<media:image>",
"rpcFile": "/tmp/proof-image.png",
"receiptKind": "media"
}Line 198 of Live repro — Fix LGTM — agrees with the synthetic before/after. |
|
@homer-byte thanks for the focused fix. The visible iMessage placeholder bug is real, but I think this still needs one adjustment before merge. Finding: preserve media echo matching while clearing RPC text The PR correctly changes the outbound RPC payload for media-only sends to use Current main uses the synthesized
The inbound monitor still has explicit coverage for attachment-only echo fallback by Best fix: keep RPC |
|
Pushed a maintainer follow-up in f8a9877 to address the echo-cache blocker. What changed:
Verification:
@clawsweeper re-review |
f8a9877 to
5ad9776
Compare
|
Rebased the maintainer follow-up onto current New head: 5ad9776. Post-rebase verification:
@clawsweeper re-review |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
omarshahine
left a comment
There was a problem hiding this comment.
Approved from maintainer review after the follow-up at 5ad9776.
The visible iMessage bug is reproduced on v2026.5.12-beta.3, and the maintainer patch now keeps RPC text: "" for media-only sends while preserving a separate internal echoText for persisted and in-memory echo matching. That resolves the previous blocker without reintroducing visible <media:image> delivery.
Local verification on the rebased head:
pnpm test extensions/imessage/src/send.test.ts extensions/imessage/src/monitor/deliver.test.tspnpm exec oxfmt --check --threads=1 CHANGELOG.md extensions/imessage/src/send.ts extensions/imessage/src/send.test.ts extensions/imessage/src/monitor/deliver.ts extensions/imessage/src/monitor/deliver.test.tspnpm exec oxlint extensions/imessage/src/send.ts extensions/imessage/src/send.test.ts extensions/imessage/src/monitor/deliver.ts extensions/imessage/src/monitor/deliver.test.tspnpm test extensions/imessagepnpm check:changed
5ad9776 to
463afd4
Compare
|
Landed via squash merge after maintainer follow-up and rebase onto current
Thanks @homer-byte. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Keep media-only iMessage sends from delivering visible <media:image> text while preserving a non-visible echo key for self-echo dedupe. Thanks @homer-byte. (cherry picked from commit c3e5d85)
Keep media-only iMessage sends from delivering visible <media:image> text while preserving a non-visible echo key for self-echo dedupe. Thanks @homer-byte.
Keep media-only iMessage sends from delivering visible <media:image> text while preserving a non-visible echo key for self-echo dedupe. Thanks @homer-byte.
Keep media-only iMessage sends from delivering visible <media:image> text while preserving a non-visible echo key for self-echo dedupe. Thanks @homer-byte.
Keep media-only iMessage sends from delivering visible <media:image> text while preserving a non-visible echo key for self-echo dedupe. Thanks @homer-byte.
Summary
<media:image>/<media:...>text for iMessage media-only sends<media:image>text when no attachment is presentUser problem
When OpenClaw sends an image over native iMessage, the recipient can see the actual image plus a visible
<media:image>placeholder in the conversation. In Rich's real iMessage thread this made image sends look duplicated, with the placeholder text appearing between two image previews.That placeholder is useful as an internal inbound/context marker, but it should not be fabricated as outbound user-visible text when a real file is already being sent.
Fix
sendMessageIMessagenow keeps media-only outbound text empty after resolving the attachment. The RPC still receives thefilepath, so the image is delivered, but OpenClaw no longer sends a synthetic<media:image>text body alongside it.Literal user text such as
literal <media:image> textis still preserved when no attachment is sent.Real behavior proof
<media:image>placeholder, creating duplicate-looking image delivery in the Messages thread.fix/imessage-media-only-no-placeholder, executing the patchedextensions/imessage/src/send.tsoutbound iMessage helper with the real package/test runtime and an instrumented iMessage RPC client.{ "sentText": "", "rpcMethod": "send", "rpcText": "", "rpcFile": "/tmp/proof-image.png", "receiptKind": "media" }file: "/tmp/proof-image.png"andtext: ""; it no longer sends the synthetic<media:image>body while still producing a media receipt.Tests
pnpm exec oxfmt --check --threads=1 extensions/imessage/src/send.ts extensions/imessage/src/send.test.tspnpm exec oxlint extensions/imessage/src/send.ts extensions/imessage/src/send.test.tspnpm test extensions/imessage/src/send.test.tspnpm test extensions/imessage→ 354 passedpnpm check:changed