Skip to content

feat(artifacts): add first-class interactive HTML artifacts - #1729

Merged
AnishSarkar22 merged 13 commits into
MODSetter:devfrom
AnishSarkar22:feat/html-artifact
Aug 31, 2026
Merged

feat(artifacts): add first-class interactive HTML artifacts#1729
AnishSarkar22 merged 13 commits into
MODSetter:devfrom
AnishSarkar22:feat/html-artifact

Conversation

@AnishSarkar22

@AnishSarkar22 AnishSarkar22 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Add first-class interactive HTML artifacts with intent-based generation, structural verification, shared design guidance, secure sandboxed right-panel rendering, revision support, and comprehensive tests.
  • Disable timeline expansion on desktop and mobile only when no renderable child steps exist.

Motivation and Context

FIX #

Screenshots

API Changes

  • This PR includes API changes

Change Type

  • Bug fix
  • New feature
  • Performance improvement
  • Refactoring
  • Documentation
  • Dependency/Build system
  • Breaking change
  • Other (specify):

Testing Performed

  • Tested locally
  • Manual/QA verification

Checklist

  • Follows project coding standards and conventions
  • Documentation updated as needed
  • Dependencies updated as needed
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR implements interactive HTML artifacts as a new deliverable format within the existing artifact system. Users can now request interactive calculators, configurators, dashboards, and widgets which are generated as self-contained HTML fragments and rendered in a sandboxed iframe viewer. The implementation includes structural verification (fragment contract enforcement, external resource detection), intent-based routing (selecting HTML automatically for interactive requests), a shared design skill system (composing frontend-design guidance into format skills at Docker build time), and comprehensive security controls (attachment-only serving, sandboxed iframe with no same-origin capability, viewer-controlled CSP). The change follows the established format-agnostic artifact architecture with no schema, persistence, or API modifications required, and generation sources remain transient sandbox inputs rather than persisted artifact files.

⏱️ Estimated Review Time: 1-3 hours

💡 Review Order Suggestion
Order File Path
1 plans/artifacts/phase-6-html.md
2 plans/artifacts/artifacts-overhaul.md
3 docker/sandbox/skills/html/SKILL.md
4 docker/sandbox/skills/frontend-design/DESIGN.md
5 docker/sandbox/Dockerfile
6 surfsense_backend/app/artifacts/verification/formats/html.py
7 surfsense_backend/app/artifacts/verification/formats/registry.py
8 surfsense_backend/app/artifacts/persistence/enums.py
9 surfsense_backend/app/agents/chat/multi_agent_chat/subagents/builtins/deliverables/description.md
10 surfsense_backend/app/agents/chat/multi_agent_chat/subagents/builtins/deliverables/system_prompt.md
11 surfsense_backend/app/agents/chat/multi_agent_chat/subagents/builtins/deliverables/tools/load_artifact_for_revision.py
12 surfsense_backend/app/agents/chat/multi_agent_chat/subagents/builtins/deliverables/tools/sandbox.py
13 surfsense_web/features/file-viewers/html-file-viewer.tsx
14 surfsense_web/features/file-viewers/viewer-registry.ts
15 surfsense_web/features/artifacts/artifact-format-meta.ts
16 surfsense_web/features/chat-messages/timeline/grouping.ts
17 surfsense_web/features/chat-messages/timeline/interleaved-trace.tsx
18 surfsense_backend/tests/unit/artifacts/test_html_verification.py
19 surfsense_backend/tests/integration/artifacts/test_html_artifacts.py
20 surfsense_backend/tests/unit/routes/test_artifacts_routes.py
21 surfsense_backend/tests/unit/sandbox/test_deliverables_skill_roster.py
22 docs/adr/0003-artifacts-as-documents.md
23 plans/artifacts/phase-1-foundation.md
24 plans/artifacts/phase-2-sandbox-pdf.md
25 plans/artifacts/phase-3-docx.md
26 plans/artifacts/phase-4-pptx.md
27 plans/artifacts/phase-5-xlsx.md
28 plans/artifacts/phase-7-demolition.md
29 plans/artifacts/phase-8-public-and-generic.md

Need help? Join our Discord

…act handling

- Changed artifact document paths from `documents/Artifacts/<title>.md` to `documents/<title>.md` for consistency.
- Clarified the roles and responsibilities of `Document`, `Artifact`, and `ArtifactFile` in the context of artifact management.
- Enhanced descriptions of artifact creation, revision processes, and API interactions to reflect the updated structure and functionality.
- Revised the status and scope of phases 6, 7, and 8 in the artifacts overhaul documentation.
- Introduced a new document for Phase 6 detailing interactive HTML artifacts and their specifications.
- Added a new document for Phase 7 outlining the demolition of legacy deliverables.
- Created a new document for Phase 8 focusing on public access, generic formats, and XLSX hardening.
- Updated existing documentation to reflect changes in phase statuses and dependencies.
- Clarified the separation of mechanics and aesthetics in HTML artifact generation by introducing a shared design skill.
- Implemented intent-based routing for interactive requests, allowing users to create HTML artifacts without explicitly stating the format.
- Updated documentation to reflect changes in routing behavior and the role of the HTML skill in the deliverables prompt.
- Ensured that static requests retain their existing formats while interactive requests are prioritized for HTML generation.
- Introduced `getTraceLeafKind` to determine the type of trace part (reasoning or activity).
- Added `hasExpandableTraceDetails` to check for expandable details in trace parts.
- Updated `TraceLeaf` and `TurnSegment` components to utilize new functions for improved rendering logic based on trace part types.
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a15536c9-f11e-4d01-b959-dbecbe40d913

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AnishSarkar22 AnishSarkar22 changed the title Feat/html artifact Aug 31, 2026
@AnishSarkar22
AnishSarkar22 merged commit b54fa4f into MODSetter:dev Aug 31, 2026
7 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant