Open published artifacts in a dedicated side panel - #456
Merged
Conversation
Detect artifacts an agent publishes to claude.ai during a Claude session (Artifact tool result, the frame-link entry, or a bare artifact URL in the transcript) and surface them behind an Artifact button in the card header. - Artifacts are keyed by URL id, so a republish updates the entry and bumps a revision instead of duplicating it; the open panel reloads on the bump. - The web view uses the persistent data store: artifact pages are private to the account, so the sign-in has to survive a panel close and a relaunch. A signed-out load is bannered as Anthropic's sign-in, not AgentHub's. - Claude only; Codex has no artifact surface.
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.
Artifacts an agent publishes to claude.ai during a session (
/designcanvases, reports, mockups) now open in their own side panel, on the same rails as localhost web preview: passive detection from the session JSONL, a header button that appears only once there's something to show, toggled open/closed.Detection (
SessionJSONLParser, Claude only — Codex has no artifact surface):Artifacttool call → its result (title + source path from the call, URL from the result)frame-linkentry Claude Code writes alongside itclaude.ai/code/artifact/…URL in the transcript, filed untitledArtifacts are keyed by the id in the URL, so a republish updates the existing entry and bumps
revision— which is what makes an open panel reload — rather than duplicating it. The canonical URL drops query/fragment (?via=…is provenance, not identity).Panel: picker when a session published several, reload, open in browser, expand (⌘⇧O), close, and a load-failure state with retry. The web view uses the persistent website data store, since artifact pages are private to the account and the sign-in has to survive a panel close and a relaunch. A signed-out load lands on Anthropic's sign-in page, which the panel banners as Anthropic's — not AgentHub's — and tells the user to sign in in the panel: a browser session is a different cookie jar and never carries over.
Tests: 13 new tests over URL canonicalization/sign-in detection and the three parse paths (publish, frame-link, bare mention, republish, lenient
frame-linkfield decoding). TargetedAgentHubCoresuites and the app build pass; not yet exercised in the running UI.