Skip to content

feat(chat): render charts and HTML reports in an artifact panel#9

Merged
hostomani merged 1 commit into
17.0from
feat/chart-report-rendering
Jun 15, 2026
Merged

feat(chat): render charts and HTML reports in an artifact panel#9
hostomani merged 1 commit into
17.0from
feat/chart-report-rendering

Conversation

@hostomani

Copy link
Copy Markdown
Contributor

Assistant replies can now produce visual output instead of raw markup. HTML in a fenced ```html block (or an untagged fence whose content is HTML) renders as a CSS/SVG chart or report inside a sandboxed iframe (sandbox="allow-same-origin", no scripts: styles are isolated and the markup's own JS never runs).

Rendered output opens in a dedicated artifact panel on the right: the latest chart auto-opens, and inline "Chart" cards reopen any previous one. A new report message role plus a session._post_report(html) helper let server-side code push a full report into the conversation.

Tool-call chips are now collapsed by default behind a per-message toggle (with a running spinner), reducing noise in long replies.

What does this PR do?

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Refactor / chore

Checklist

  • Targets Odoo 18.0 and follows the existing code style
  • Added/updated tests under tests/ (tagged codexoo) and they pass locally
  • Updated CHANGELOG.md (bullet under ## [Unreleased])
  • Updated SECURITY.md if this touches a safety-critical path (else N/A)
  • All commits are signed off (git commit -s → DCO)
  • I am the author and have reviewed/understand all code here, including any AI-assisted parts, and it is mine to license
  • Tool endpoints still run as the user, never superuser
  • Did not alter Codex engine references (ChatGPT/device-code login, CODEX_HOME,
    CLI glob, codex_thread_id / codex_item_id)
  • For security-sensitive changes: invariants in SECURITY.md are preserved

Assistant replies can now produce visual output instead of raw markup.
HTML in a fenced ```html block (or an untagged fence whose content is
HTML) renders as a CSS/SVG chart or report inside a sandboxed iframe
(sandbox="allow-same-origin", no scripts: styles are isolated and the
markup's own JS never runs).

Rendered output opens in a dedicated artifact panel on the right: the
latest chart auto-opens, and inline "Chart" cards reopen any previous
one. A new `report` message role plus a session._post_report(html)
helper let server-side code push a full report into the conversation.

Tool-call chips are now collapsed by default behind a per-message
toggle (with a running spinner), reducing noise in long replies.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Ahmed <ahmed@electroon.com>
@hostomani hostomani merged commit 92ae8aa into 17.0 Jun 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants