openclaw - 💡(How to fix) Fix WebChat UI does not receive real-time updates from other channels [6 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#44619Fetched 2026-04-08 00:44:28
View on GitHub
Comments
6
Participants
1
Timeline
11
Reactions
0
Participants
Timeline (top)
commented ×6cross-referenced ×3closed ×1reopened ×1

Fix Action

Workaround

Manually refresh the WebChat view to see new messages.

RAW_BUFFERClick to expand / collapse

Bug Description

WebChat UI does not receive real-time updates when messages arrive from other channels (e.g., Telegram). Users must manually refresh the WebChat view to see new messages.

Steps to Reproduce

  1. Open WebChat in the macOS app (Lobster menu → "Open Chat")
  2. Send a message from Telegram to the bot
  3. Observe that the message does NOT appear in WebChat automatically
  4. Manually refresh the WebChat view
  5. The message now appears

Expected Behavior

WebChat should receive real-time updates via WebSocket events when new messages arrive from any channel, without requiring manual refresh.

Actual Behavior

  • ✅ WebChat → Telegram: Works correctly (Telegram receives messages in real-time)
  • ❌ Telegram → WebChat: Requires manual refresh to see new messages

Environment

  • OpenClaw version: 2026.3.11 (29dc654)
  • Platform: macOS
  • Session configuration: dmScope: "main" (shared session)
  • Channels: Telegram + WebChat

Technical Details

According to the documentation (platforms/mac/webchat.md):

Data plane: Gateway WS methods chat.history, chat.send, chat.abort, chat.inject and events chat, agent, presence, tick, health.

The WebChat should be subscribing to chat events to receive real-time updates, but it appears this is not working correctly.

Impact

  • Users cannot use WebChat as a real-time chat interface
  • Must constantly refresh to check for new messages
  • Reduces usability of the WebChat feature

Workaround

Manually refresh the WebChat view to see new messages.

extent analysis

Fix Plan

To resolve the issue of WebChat not receiving real-time updates, we need to ensure that it is correctly subscribed to chat events via WebSocket. Here are the steps:

  • Verify WebSocket connection establishment and chat event subscription in the WebChat code.
  • Check for any errors in the WebSocket connection or event handling.
  • Implement a retry mechanism for WebSocket connections and event subscriptions.

Example code snippet to establish a WebSocket connection and subscribe to chat events:

// Establish WebSocket connection
const ws = new WebSocket('wss://example.com/ws');

// Subscribe to chat events
ws.onmessage = (event) => {
  if (event.data.type === 'chat') {
    // Handle new chat message
    console.log(`Received new chat message: ${event.data.message}`);
    // Update WebChat UI with new message
  }
};

// Handle errors
ws.onerror = (event) => {
  console.log('WebSocket error:', event);
};

// Handle connection close
ws.onclose = () => {
  console.log('WebSocket connection closed');
  // Retry establishing connection and subscribing to events
};

Verification

To verify that the fix worked:

  • Send a message from Telegram to the bot.
  • Observe that the message appears in WebChat automatically without requiring manual refresh.
  • Check the browser console for any errors related to WebSocket connections or event handling.

Extra Tips

  • Ensure that the WebSocket connection is properly closed and reopened when the user navigates away from or returns to the WebChat view.
  • Implement a mechanism to handle duplicate or missed messages due to WebSocket connection issues.
  • Review the OpenClaw documentation (platforms/mac/webchat.md) for any specific requirements or recommendations for WebSocket event handling.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING