fix: restore export HTML template placeholders broken by Prettier#50001
fix: restore export HTML template placeholders broken by Prettier#50001henry-the-frog wants to merge 1 commit into
Conversation
Greptile SummaryThis PR fixes a regression (#49957) where session exports rendered as blank pages because Prettier had reformatted the
All five placeholders in the template ( Confidence Score: 5/5
Last reviewed commit: "fix: restore templat..." |
|
✅ Approved Clean fix. The problem is clear: Prettier reformats Strengths:
No concerns. |
Prettier reformatted {{MARKED_JS}}, {{HIGHLIGHT_JS}}, and {{JS}} placeholders
in the session export HTML template into multi-line blocks with semicolons:
{ { MARKED_JS; } }
This broke the string .replace() calls in commands-export-session.ts, causing
exported sessions to render as empty pages (no JS injected).
Restored compact {{PLACEHOLDER}} format and added the template to
.prettierignore to prevent recurrence.
Fixes openclaw#49957
66a054e to
48f6644
Compare
|
Closing this as duplicate or superseded after Codex automated review. Close #50001 as superseded by #41861. The export bug is still real on current main and the latest release, but #41861 is the better canonical fix because it restores the placeholders and also addresses the JS string-replacement Best possible solution: Close #50001 as a duplicate/superseded PR and keep #41861 as the canonical fix candidate for #49957. The landed fix should restore formatter-safe placeholders and use function replacers for JS injection so vendored/app JS bytes are preserved verbatim. What I checked:
So I’m closing this here and keeping the remaining discussion on the canonical linked item. Codex Review notes: model gpt-5.5, reasoning high; reviewed against 54f8e4145e43. |
Problem
Session exports via
/export_sessionrender as empty pages in the browser (#49957).Prettier reformatted the
{{MARKED_JS}},{{HIGHLIGHT_JS}}, and{{JS}}placeholders intemplate.htmlinto multi-line blocks with semicolons:The
.replace("{{MARKED_JS}}", ...)calls incommands-export-session.tsno longer match, so no JavaScript is injected into the export.Fix
{{PLACEHOLDER}}format in the template.prettierignoreto prevent recurrenceTesting
Verified locally that the placeholder strings match what
commands-export-session.tsexpects.Closes #49957