Skip to content

Webchat flickers when lossless-claw plugin fires session.message events #66274

@BiznessFish

Description

@BiznessFish

Description

When the lossless-claw plugin is active, the webchat UI flickers (messages disappear and reappear) after every message send/receive. This makes the webchat nearly unusable.

Root Cause

  1. lossless-claw fires session.message events when it ingests messages into its database
  2. The webchat client's jC handler listens for these events and calls Qf (history fetch)
  3. Qf sets chatLoading=true before fetching, which triggers a loading state in the UI
  4. This causes messages to visually disappear during the fetch, then reappear when it completes
  5. With lossless-claw firing multiple events per turn, this creates rapid flicker

Steps to Reproduce

  1. Enable lossless-claw plugin
  2. Open webchat UI
  3. Send a message
  4. Observe messages flicker (disappear/reappear) after send

Suggested Fix

Either:

  1. Debounce the session.message handler — wait 500ms after last event before fetching
  2. Don't set chatLoading=true for incremental refreshes — only show loading state on initial load
  3. Skip loading state entirely in jC pathway — call a variant of Qf that doesn't set chatLoading

Workaround

Patch index-CsLHusjn.js to make jC a no-op:

// Original:
function jC(e,t){let n=t?.sessionKey?.trim();!n||n!==e.sessionKey||Qf(e)}

// Patched:
function jC(e,t){return}

This disables session.message refresh entirely. History still loads on page load and run completion.

Environment

  • OpenClaw 2026.4.12 (1c0672b)
  • lossless-claw v0.3.0
  • macOS, Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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