feat(artifacts): add first-class interactive HTML artifacts - #1729
Conversation
…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.
|
@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. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Description
Motivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
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
plans/artifacts/phase-6-html.mdplans/artifacts/artifacts-overhaul.mddocker/sandbox/skills/html/SKILL.mddocker/sandbox/skills/frontend-design/DESIGN.mddocker/sandbox/Dockerfilesurfsense_backend/app/artifacts/verification/formats/html.pysurfsense_backend/app/artifacts/verification/formats/registry.pysurfsense_backend/app/artifacts/persistence/enums.pysurfsense_backend/app/agents/chat/multi_agent_chat/subagents/builtins/deliverables/description.mdsurfsense_backend/app/agents/chat/multi_agent_chat/subagents/builtins/deliverables/system_prompt.mdsurfsense_backend/app/agents/chat/multi_agent_chat/subagents/builtins/deliverables/tools/load_artifact_for_revision.pysurfsense_backend/app/agents/chat/multi_agent_chat/subagents/builtins/deliverables/tools/sandbox.pysurfsense_web/features/file-viewers/html-file-viewer.tsxsurfsense_web/features/file-viewers/viewer-registry.tssurfsense_web/features/artifacts/artifact-format-meta.tssurfsense_web/features/chat-messages/timeline/grouping.tssurfsense_web/features/chat-messages/timeline/interleaved-trace.tsxsurfsense_backend/tests/unit/artifacts/test_html_verification.pysurfsense_backend/tests/integration/artifacts/test_html_artifacts.pysurfsense_backend/tests/unit/routes/test_artifacts_routes.pysurfsense_backend/tests/unit/sandbox/test_deliverables_skill_roster.pydocs/adr/0003-artifacts-as-documents.mdplans/artifacts/phase-1-foundation.mdplans/artifacts/phase-2-sandbox-pdf.mdplans/artifacts/phase-3-docx.mdplans/artifacts/phase-4-pptx.mdplans/artifacts/phase-5-xlsx.mdplans/artifacts/phase-7-demolition.mdplans/artifacts/phase-8-public-and-generic.md