Skip to content

[Weixin] WeChat client clips right-side content when scrolling Markdown tables #16951

@gzhang33

Description

@gzhang33

Bug Description

The WeChat personal client (connected via iLink Bot API) renders Markdown tables as scrollable containers, but clips/hides content beyond the visible viewport on the right side. Users can scroll horizontally within the table, but the rightmost columns are cut off and invisible.

This is a WeChat client-side rendering bug in its Markdown/CSS Webview engine, not a Hermes transport issue.

Hermes Transport Layer Status

Hermes is correctly preserving Markdown tables as-is since v2026.4.23 (PR #11571, commit 6ee65b4d):

  1. format_message() -> _normalize_markdown_blocks() -> preserves Markdown tables
  2. _send_message() -> sends raw Markdown text to iLink API
  3. _rewrite_table_block_for_weixin() exists but is dead code (never called)

The Markdown arrives intact at the WeChat client. The clipping happens during rendering.

Steps to Reproduce

  1. Send a Markdown table with 3+ columns to a WeChat contact via the Weixin adapter
  2. Open the message in WeChat personal client (Windows / macOS / mobile)
  3. The table renders as a scrollable container
  4. Scroll right -> right-side columns are clipped/invisible

Expected Behavior

All table columns should be visible when scrolling, or the table should expand to fit content.

Actual Behavior

Columns beyond the initial visible width are clipped. The scrollable container exists but does not reveal all content.

Environment

Component Value
OS Raspberry Pi 4B (agent host)
Python 3.11.x
Hermes Version v2026.4.23+232 (post PR #11571)
WeChat Client Windows / macOS / mobile (all affected)
Connection iLink Bot API

Workaround

Generate table images using table-image-generator skill and send as native images via MEDIA::

node ~/.hermes/skills/creative/table-image-generator/scripts/table.mjs \
  --data '[{"Col A":"val","Col B":"val","Col C":"val"}]' \
  --output table.png --dark --scale 2

Then include MEDIA:/path/to/table.png in the agent response.

Proposed Mitigation (Hermes-side)

Since this is a client-side bug outside Hermes' control, the recommended mitigation is to update the Weixin platform hint in prompt_builder.py to instruct the agent to:

  1. Use table images (via table-image-generator skill) for tables with 3+ columns or wide content
  2. Use list format (key: value) for simple 2-column tables
  3. Avoid pipe tables in Weixin responses until the WeChat client fixes its rendering

Related Issues / PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to haveplatform/wecomWeCom / WeChat Work adaptertype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions