Skip to content

Canvas Host: build default status with DOM nodes - #58266

Merged
jacobtomlinson merged 1 commit into
openclaw:mainfrom
jacobtomlinson:fix/fix-170
Mar 31, 2026
Merged

jacobtomlinson merged 1 commit into
openclaw:mainfrom
jacobtomlinson:fix/fix-170

Conversation

@jacobtomlinson

Copy link
Copy Markdown
Contributor

Summary

  • Updates the default canvas host page to build its status line with DOM nodes instead of HTML string injection
  • Keeps the rendered status text and styling unchanged for the fallback test page

Changes

  • Replaced the status element HTML-string assignment with createElement, createTextNode, and textContent
  • Added a regression assertion that the generated fallback page no longer includes the old statusEl.innerHTML path

Validation

  • Ran pnpm test -- src/canvas-host/server.test.ts src/canvas-host/server.state-dir.test.ts
  • Ran pnpm check
  • Ran pnpm build
  • Ran local agentic review with claude -p "/review" and there was no actionable follow-up

Notes

  • Scope is limited to the generated fallback canvas host page and its tests
  • No config or migration changes

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Mar 31, 2026
@greptile-apps

greptile-apps Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR replaces the statusEl.innerHTML string-injection approach in the generated canvas host fallback page with equivalent DOM API calls (document.createElement, createTextNode, textContent). The rendered output and styling are unchanged — only the construction mechanism is safer. Two regression assertions are added to the test suite to lock in the new path and confirm the old innerHTML approach is gone.

Confidence Score: 5/5

Safe to merge — the refactoring is mechanically equivalent, tests are updated, and no runtime or contract issues were found.

All changes are scoped to the generated fallback page's inline script. The DOM rewrite is functionally identical to the original string interpolation, helperReady is evaluated exactly once as before, and the two new test assertions provide adequate regression coverage. No P0/P1 issues found.

No files require special attention.

Important Files Changed

Filename Overview
src/canvas-host/server.ts Replaces statusEl.innerHTML string-building with DOM API calls; behavior and styling are identical.
src/canvas-host/server.test.ts Adds two regression assertions confirming the DOM path is present and the old innerHTML path is absent.

Reviews (1): Last reviewed commit: "Canvas Host: build status with DOM nodes" | Re-trigger Greptile

@jacobtomlinson
jacobtomlinson merged commit df0e136 into openclaw:main Mar 31, 2026
41 of 42 checks passed
@jacobtomlinson
jacobtomlinson deleted the fix/fix-170 branch March 31, 2026 09:30
pgondhi987 pushed a commit to pgondhi987/openclaw that referenced this pull request Mar 31, 2026
singleGanghood pushed a commit to singleGanghood/openclaw that referenced this pull request Mar 31, 2026
steipete pushed a commit to Mlightsnow/openclaw that referenced this pull request Apr 1, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
Nachx639 pushed a commit to Nachx639/clawdbot that referenced this pull request Jun 17, 2026
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request Sep 29, 2026
lhfer pushed a commit to lhfer/openclaw that referenced this pull request Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant