feat(canvas): render inline HTML canvas via sanitized Shadow DOM#517
Open
beruro wants to merge 1 commit into
Open
feat(canvas): render inline HTML canvas via sanitized Shadow DOM#517beruro wants to merge 1 commit into
beruro wants to merge 1 commit into
Conversation
- Replace the sandboxed-iframe HTML path with a sanitized Shadow DOM renderer
(`staticHtmlCanvas`): styles are preserved while scripts and event-handler
attributes are stripped. `url` mode becomes an external-open action instead
of being embedded in chat.
- `render_inline_canvas` now returns an honest acceptance acknowledgment
("accepted ...; visual output not verified") rather than claiming it
rendered, since the tool execution path cannot inspect the card.
Adds unit tests for the acceptance message and the static HTML sanitizer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
staticHtmlCanvas): styles preserved,<script>and event-handler attributes stripped.urlmode becomes an external-open action instead of being embedded in chat.render_inline_canvastool now returns an honest acceptance acknowledgment ("accepted ...; visual output not verified") rather than claiming it rendered — the tool path cannot inspect the card.Test plan
tsc --noEmitandcargo clippy -p agent_corepass (pre-commit hook).pnpm vitest runforstaticHtmlCanvas.test.ts;cargo test -p agent_corefor the acceptance-message tests.urlmode shows an external-open action.Based on latest
develop.