-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Description
Summary
All markdown tables render as jammed inline text in the Gateway Dashboard WebChat interface (http://127.0.0.1:18789/chat), regardless of proper formatting with blank lines.
Steps to reproduce
- Open OpenClaw Gateway Dashboard (
http://127.0.0.1:18789/chat) - Send a message with a properly formatted markdown table:
Text before.
| Col1 | Col2 |
|------|------|
| A | B |
Text after.- Observe the rendered output
Expected behavior
Properly formatted table HTML:
<div class="chat-text">
<p>Text before.</p>
<table>
<thead><tr><th>Col1</th><th>Col2</th></tr></thead>
<tbody><tr><td>A</td><td>B</td></tr></tbody>
</table>
<p>Text after.</p>
</div>Actual behavior
Jammed inline text - entire message collapses into a single paragraph:
Visual: All text runs together on one line, table structure lost.
HTML:
<div class="chat-text"><p>Text before. | Col1 | Col2 | |------|------| | A | B | Text after.</p></div>OpenClaw version
2026.2.17
Operating system
macOS Darwin 25.2.0 (arm64)
Install method
Standard install via npm/CLI per OpenClaw documentation
Logs, screenshots, and evidence
**Root Cause Analysis:**
Through DevTools HTML inspection, we determined that **the Gateway collapses/override all newline characters before markdown parsing**:
| Input | Processed | Result |
|-------|-----------|--------|
| `\n\n` (blank lines) | ` ` (single space) | No block separation |
| `\n` (newlines) | ` ` (single space) | Single paragraph only |
The Lit template markers (`<!--?lit$...-->`) show content is rendered as a single interpolated string, preventing the markdown parser from recognizing block-level elements.
**Browser Developer Tools Output:**
<div class="chat-bubble has-copy fade-in">
<!--?lit$918486889$-->
<div class="chat-text" dir="ltr">
<!--?lit$918486889$-->
<p><strong>EVEN SIMPLE TABLE JAMMING...</strong> | Scenario | Result |...</p>
</div>
</div>Impact and severity
Component: Gateway Dashboard WebChat
Severity: Medium - Blocks table formatting, reduces chat readability
Impact Areas:
- Tables unusable in WebChat
- Numbered lists (
1. 2. 3.) also jam - Multi-paragraph messages collapse
- Forces use of bullet lists and inline formatting only
Additional information
Attempted Workaround: Browser Extension
We developed a Chrome extension (OpenClaw Dashboard Table Preserver v1.0.2) to repair jammed tables client-side:
- Approach: MutationObserver, CSS
!importantrules, repair logic - Result: Extensions cannot fix this
- Reason: By the time the extension sees the DOM, newlines are already collapsed server-side
Conclusion
This is a server-side markdown preprocessing issue - the Gateway normalizes newlines before the markdown parser runs. Extensions cannot fix it; the parser must preserve block-level structure.
Suggested Fix
Primary: Preserve block-level markdown structure by not collapsing newlines before parsing. Users expect standard markdown to work naturally - tables should render as tables, lists as lists.
Feature Request (Optional)
Terminal / Preformatted Mode
A mode that preserves exact text formatting with terminal-like aesthetics:
| Mode | Render Style | Parse Tables | Best For |
|---|---|---|---|
| Markdown (current) | Proportional font | ✅ Yes | Conversational text |
| Preformatted | Monospace, exact | ❌ No | Code, logs, data |
| Terminal | Monospace + terminal aesthetic | ❌ No | Technical sessions |
Use cases:
- Sharing code snippets with indentation and newlines intact
- Pasting log output or error messages for debugging
- Configuration files (JSON, YAML, nginx.conf)
- Clean copy-paste to web forms (no bold/italic artifacts)
- API keys or structured data where exact characters matter
Labels: bug, ui, markdown, gateway, webchat
Reporter: User via Fren AI session
Date: 2026-02-18