Repository navigation
fix(editor): load authored objects in the public embed - #1299
Open
AleeAbdullah wants to merge 1 commit into
Open
AleeAbdullah wants to merge 1 commit into
AleeAbdullah wants to merge 1 commit into
Conversation
The embed page never configured an artifact store, so every artifact:// reference resolved against core's empty in-memory default and authored objects drew as placeholder boxes. Use the same local store the editor uses; the artifacts route already serves a shared scene's artifacts without a sign-in. Fixes pascalorg#1298 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Aymericr
approved these changes
Nov 22, 2026
Aymericr
left a comment
Member
There was a problem hiding this comment.
Thanks @AleeAbdullah, nice catch and a clean diagnosis in #1298. EmbedViewer was the only scene entry point without useLocalArtifactStore(), so artifact:// refs fell through to core's empty in-memory store. I checked the server side too: GET /api/artifacts/[sha256] lets an unauthenticated request through only when isArtifactShared(sha256) is true, and proxy.ts already treats /api/artifacts as self-guarded. So the embed can load shared artifacts without opening up private ones. The before/after screenshots make the fix obvious.
LGTM. CI for this fork is waiting on maintainer approval to run; it can merge once that's green.
This branch has not been 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.


What does this PR do?
Fixes #1298. The public link
/embed/<id>drew every authored object as an empty placeholder box.EmbedViewernever configured an artifact store, soartifact://references resolved against core's empty in-memory default, and the page never requested/api/artifacts/*.EmbedViewernow callsuseLocalArtifactStore(), asSceneLoaderdoes in the editor. No server change is needed: the artifacts route already lets an unauthenticatedGETthrough for an artifact referenced by a shared scene (isArtifactShared). An artifact that isn't shared still returns 401.How to test
add_object) and turn on Share./embed/<id>. Before this change the objects are red placeholder boxes; with it they render as they do in the editor.Verified locally on
main+ this commit:bun dev: the embed went from placeholder boxes to the rendered objects (screenshots below).next build+next start) withPASCAL_ADMIN_PASSWORDset, in a browser that never signed in: the embed renders the objects, and every/api/artifacts/*request returns 200. Without a session, a shared artifact returns 200, while an unknown hash and/api/scenesreturn 401.apps/editorcheck-typesand Biome pass.Unrelated, seen while testing: with
PASCAL_ADMIN_PASSWORDset underbun dev,/embed/<id>reloads itself in a loop, with or without this change. The production build doesn't. There is also an existing hydration warning on the sky control's clock (11:45vs11:45 AM).Screenshots / screen recording
Screenshots added below.
Checklist
bun devbun checkto verify)mainbranch🤖 Generated with Claude Code
Note
Low Risk
Single hook addition aligning embed with existing editor artifact loading; no auth or API behavior changes.
Overview
Fixes public
/embed/<id>views showing red placeholder boxes for authored objects instead of real geometry.EmbedViewernow callsuseLocalArtifactStore(), matching the editor’sSceneLoader, soartifact://references resolve via/api/artifacts/*(including unauthenticated access for artifacts tied to a shared scene) rather than core’s default empty in-memory store.Reviewed by Cursor Bugbot for commit d107536. Bugbot is set up for automated code reviews on this repo. Configure here.