openclaw/extensions/diffs/src
tanshanshan b7f9bf5a5c
fix(diffs): replace iconMarkup string with ToolbarIconName enum to el… (#83955)
* fix(diffs): replace iconMarkup string with ToolbarIconName enum to eliminate XSS sink

Replace createToolbarButton's iconMarkup: string parameter with icon: ToolbarIconName,
a union of known icon names. SVG generation moves into a sealed toolbarIconSvg map so
innerHTML only receives compile-time-known strings. The old splitIcon/unifiedIcon/
wrapIcon/backgroundIcon/themeIcon functions are removed; callers now pass icon name
literals instead of raw markup strings.

Closes #83918

* fix(diffs): remove jsdom dependency from viewer-client test

Use source file string analysis instead of jsdom to avoid missing
@types/jsdom declaration error in check-test-types CI job.

* fix(diffs): restore wrap icon arrow segment in ToolbarIconName map

The wrap-on and wrap-off SVG paths were missing the original wrap arrow
segment (M14 6h-4V5h4.5...). Restore the exact original path data and
rebuild the viewer runtime bundle.

* build(diffs): refresh viewer runtime after rebase

---------

Co-authored-by: tanshanshan <tanshanshan@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-21 17:39:01 +08:00
..
browser.test.ts test: dedupe diffs browser mock reads 2026-05-12 20:47:25 +01:00
browser.ts
config.test.ts test: guard extension helper null checks 2026-05-11 21:18:51 +01:00
config.ts
http.ts
language-hints.test.ts test: tighten diff language hint assertions 2026-05-11 08:12:34 +01:00
language-hints.ts chore: update dependencies 2026-05-21 08:28:44 +01:00
manifest.test.ts
pierre-themes.ts
plugin.ts Revert "refactor: move runtime state to SQLite" 2026-05-13 13:33:38 +01:00
prompt-guidance.ts
render-target.test.ts
render.test.ts
render.ts
store.test.ts Revert "refactor: move runtime state to SQLite" 2026-05-13 13:33:38 +01:00
store.ts Revert "refactor: move runtime state to SQLite" 2026-05-13 13:33:38 +01:00
test-helpers.ts Revert "refactor: move runtime state to SQLite" 2026-05-13 13:33:38 +01:00
tool-render-output.test.ts
tool.test.ts test: guard multiline helper assertions 2026-05-11 20:49:23 +01:00
tool.ts
types.ts
url.ts
viewer-assets.ts
viewer-client.test.ts fix(diffs): replace iconMarkup string with ToolbarIconName enum to el… (#83955) 2026-05-21 17:39:01 +08:00
viewer-client.ts fix(diffs): replace iconMarkup string with ToolbarIconName enum to el… (#83955) 2026-05-21 17:39:01 +08:00
viewer-payload.ts