Skip to content

[Bug]: Two Independent Control UI (openclaw dashboard) Blank/Freeze Issues #44107

@zianai

Description

@zianai

Bug type

Regression (worked before, now fails)

Summary

Bug Report: Two Independent Control UI (openclaw dashboard) Blank/Freeze Issues

Component: Gateway / Control UI (apps/control-ui)

Version: 2026.3.8 (3caab92)

Environment:

  • OS: macOS 26.1 (arm64)
  • Browser: Google Chrome 145.0.7632.162
  • Node: 25.8.0
  • Gateway auth mode: token
  • Gateway bind: loopback (http://127.0.0.1:18789/)

Bug 1: <all_urls> content script extension silently kills module script → blank page

What & Why

What: When a Chrome extension with "matches": ["<all_urls>"] + document_start content scripts is installed and enabled (e.g. Doubao AI Assistant dbjibobgilijgolhjdcbdebjhejelffo), openclaw dashboard opens a completely blank page. DevTools Console is empty. No JavaScript errors appear.

Why: The extension injects preinject.js at document_start into all URLs including http://127.0.0.1, corrupting the JS execution environment before the Lit component initializes. The <script type="module" crossorigin> tag fails silently — <openclaw-app> never calls connectedCallback(), the WebSocket connect RPC is never sent, onHello never fires, and the page stays blank.

Steps to Reproduce

  1. Install any Chrome extension that injects content scripts into <all_urls> at document_start (e.g. Doubao, Kimi, or similar AI assistant extensions)
  2. Start the gateway: openclaw gateway start
  3. Run openclaw dashboard
  4. Chrome opens http://127.0.0.1:18789/#token=<token>
  5. Result: Completely blank white page, empty DevTools Console

Confirm root cause: Disable the extension → page renders correctly.

Observed vs Expected

Behavior
Observed Blank page, empty console, no JS errors
Expected Control UI renders normally

Note: Gateway logs correctly show webchat connected — the WebSocket TCP connection is established — but no RPC calls follow because sendConnect() never runs. Connection closes with code 1001.

Root Cause

<script type="module" crossorigin> causes Chrome to fetch the script in CORS mode. A document_start extension script that modifies the page environment before the module loads can silently abort module evaluation without emitting any console error. This is a known Chrome behavior with type="module" + early-injecting extensions.

Extension manifest excerpt (Doubao AI Assistant):

{
  "content_scripts": [
    { "matches": ["<all_urls>"], "js": ["static/js/preinject.js"] },
    { "matches": ["<all_urls>"], "js": ["static/js/content.js"] }
  ],
  "permissions": ["declarativeNetRequest", "webRequest", "<all_urls>"]
}

Proposed Remediation

Option A (UX fallback): Add an inline <script> (before the module script) that sets a timeout sentinel. If <openclaw-app> has not mounted within ~3 seconds, inject a plain-HTML error message into document.body explaining the likely cause (browser extension conflict) and suggesting the user disable extensions or use an Incognito window.

Option B (Docs): Add a troubleshooting entry:

Dashboard is blank in Chrome: Disable browser extensions (especially AI assistant extensions) or open the dashboard in an Incognito window. Extensions with <all_urls> content scripts can silently interfere with the Control UI on http://127.0.0.1.


Bug 2: Control UI tab freezes (Chrome "page unresponsive") when loading large session

What & Why

What: After disabling the extension from Bug 1, the Control UI JavaScript runs correctly — WebSocket connects, device is paired, hello-ok is received, and the app routes to /chat?session=agent%3Amain%3Amain. However, the Chrome tab then becomes completely unresponsive. Chrome shows the "1 page unresponsive" dialog. The page never renders.

Why: The active session (agent:main:main) contains 84 messages totalling ~156 KB, including large assistant messages with thinking blocks (GLM-4.7 extended reasoning), tool calls, and tool results (largest single message: ~18 KB). When chat.history RPC returns all messages at once, the frontend attempts to render the full history synchronously, freezing the renderer process.

Steps to Reproduce

  1. Ensure a session with 80+ messages and thinking blocks exists for the default agent
  2. Disable any <all_urls> extensions (so JS runs normally)
  3. Start the gateway: openclaw gateway start
  4. Run openclaw dashboard
  5. Result: Page routes to /chat?session=agent%3Amain%3Amain, then Chrome shows "page unresponsive" dialog after ~30 seconds

Confirm root cause: Rename/remove the large session file and restart the gateway → dashboard opens normally with an empty session.

Observed vs Expected

Behavior
Observed Chrome tab freezes, "page unresponsive" dialog appears
Expected Chat history loads and renders without blocking the UI thread

Session Data at Time of Freeze

  • Session key: agent:main:main
  • Session ID: 6c2b31f4-3f2a-4515-b6e5-9359c90829b0
  • Total messages: 84
  • Total file size: ~156 KB
  • Contains: thinking blocks (thinkingSignature: "reasoning_content"), tool calls, tool results
  • Largest single message: ~18 KB

Root Cause

The chat.history RPC response delivers all messages in a single payload. The frontend renders them synchronously on the main thread. With large sessions containing extended thinking blocks and tool call/result pairs, this blocks the renderer long enough for Chrome to mark the tab as unresponsive.

Proposed Remediation

  • Paginate chat.history: Return messages in chunks (e.g. last 20 first, load older on scroll)
  • Virtualize the message list: Only render messages currently in the viewport
  • Async rendering: Use requestAnimationFrame or scheduler.yield() to break up the render work across frames
  • Truncate thinking blocks in history: Collapse or omit extended thinking content when loading history (show on demand)

AI-Assisted Disclosure

  • Diagnosed and written with AI assistance (Claude Code / claude-sonnet-4-6)
  • Testing: Both bugs reproduced and root causes confirmed on reporter's machine
  • The reporter understands the described behavior and proposed fixes
  • Degree of testing: fully tested (both bugs confirmed via enable/disable extension and session rename)

Steps to reproduce

Steps to Reproduce

  1. Install any Chrome extension that injects content scripts into <all_urls> at document_start (e.g. Doubao, Kimi, or similar AI assistant extensions)
  2. Start the gateway: openclaw gateway start
  3. Run openclaw dashboard
  4. Chrome opens http://127.0.0.1:18789/#token=<token>
  5. Result: Completely blank white page, empty DevTools Console

Confirm root cause: Disable the extension → page renders correctly.

Steps to Reproduce

  1. Ensure a session with 80+ messages and thinking blocks exists for the default agent
  2. Disable any <all_urls> extensions (so JS runs normally)
  3. Start the gateway: openclaw gateway start
  4. Run openclaw dashboard
  5. Result: Page routes to /chat?session=agent%3Amain%3Amain, then Chrome shows "page unresponsive" dialog after ~30 seconds

Confirm root cause: Rename/remove the large session file and restart the gateway → dashboard opens normally with an empty session.

Expected behavior

Observed vs Expected

Behavior
Observed Chrome tab freezes, "page unresponsive" dialog appears
Expected Chat history loads and renders without blocking the UI thread

Actual behavior

Observed vs Expected

Behavior
Observed Chrome tab freezes, "page unresponsive" dialog appears
Expected Chat history loads and renders without blocking the UI thread

OpenClaw version

2026.3.8

Operating system

macOS 26.1 (arm64)

Install method

curl -fsSL https://openclaw.ai/install.sh | bash

Model

Claude Code / claude-sonnet-4-6

Provider / routing chain

openclaw -> cloudflare-ai-gateway -> zai

Config file / key location

No response

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Image Image Image Image Image Image

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions