Repository navigation
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
CodeRabbit Verify
|
|
| if (data?.type !== ARTIFACT_ERROR_MESSAGE || typeof data.message !== 'string') return; | ||
| setError({ srcDoc, message: data.message }); | ||
| }; | ||
| window.addEventListener('message', onMessage); |
This branch was successfully deployed
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.




Overview
Shows the artifacts the notebook and assistant chat agents make: a card in the activity feed that opens a near full-screen viewer with Preview and Code, version stepping, copy and download.
Backend PR: ResearchHub/researchhub-backend#4473
<iframe sandbox="allow-scripts">fromsrcdoc, so they get an opaque origin with no access to the app's cookies, storage or DOM. A CSP in the page allows scripts only from cdnjs, jsdelivr, unpkg, esm.sh and the Tailwind CDN and has noconnect-src, so model-written code can't send data anywhere. Uncaught errors are posted to the parent and shown over the preview.New network request
GET /api/research_ai/artifacts/<id>/?version=n(ArtifactService.getArtifact, viauseArtifact), made only when a user opens an artifact in the viewer, once per version: versions never change, so they're cached for the session. The content isn't in the chat response because that would bloat every activity poll.Testing
lint, type-check and Prettier pass. Checked every kind on a local stack against seeded artifacts, including version switching, a component that throws, an HTML page probing storage and network (both blocked), and the draft-to-saved handoff. The first React or Mermaid open takes a few seconds while the CDN libraries load; a loading line shows meanwhile.
🤖 Generated with Claude Code