Skip to content

export-session HTML renders blank — template placeholders broken by formatter #41862

@briannewman

Description

@briannewman

Description

/export-session produces an HTML file (~2MB with session data) that opens in the browser but displays nothing — blank page with the dark theme background, no messages rendered.

Environment

  • OpenClaw 2026.3.8
  • macOS, Discord channel

Steps to Reproduce

  1. Run /export-session in any Discord channel with an active session
  2. Open the resulting HTML file in a browser
  3. Page is blank — styled but no content

Root Cause

The {{MARKED_JS}}, {{HIGHLIGHT_JS}}, and {{JS}} template placeholders in src/auto-reply/reply/export-html/template.html were reformatted by Prettier into multi-line JS block statements. The generateHtml() function uses .replace('{{MARKED_JS}}', ...) which requires contiguous strings, so the replacement silently fails and the vendor JS + app code are never injected into the HTML.

Introduced in 9d403fd.

Fix

PR #41861 — collapses placeholders to single-line format with prettier-ignore guards.

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