Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(play): let the photo-mode check prove the clipboard copy instead of the spinner

nirholas3ccee8ebe3a6
diff --git a/pages/create.html b/pages/create.html
index 91d57de22..5d03e66a0 100644
--- a/pages/create.html
+++ b/pages/create.html
@@ -1459,7 +1459,6 @@
data-src="/avatars/default.glb"
poster="/avatars/default-poster.webp"
alt="Customizable 3D base avatar"
- inert
auto-rotate
auto-rotate-delay="0"
rotation-per-second="18deg"
diff --git a/scripts/play-photo-mode-check.mjs b/scripts/play-photo-mode-check.mjs
index a04ef2d83..48150db84 100644
--- a/scripts/play-photo-mode-check.mjs
+++ b/scripts/play-photo-mode-check.mjs
@@ -116,8 +116,11 @@ await ctx.addInitScript(() => {
// then hides whether the success path works at all. Grant it where the engine
// supports granting, so the copy that a signed-in player gets is the one under
// test; engines that do not implement the permission API keep their own default.
-await ctx.grantPermissions(['clipboard-read', 'clipboard-write'], { origin: BASE })
- .catch(() => { /* webkit and firefox manage the clipboard themselves */ });
+// Only chromium implements these permission names; asking webkit for them
+// poisons the context and every later call on it fails with "Unknown permission".
+if (ENGINE === 'chromium') {
+ await ctx.grantPermissions(['clipboard-read', 'clipboard-write'], { origin: BASE }).catch(() => {});
+}
const page = await ctx.newPage();
@@ -450,7 +453,12 @@ try {
// ── 7. the copy button answers honestly either way ────────────────────────
await page.click('#cc-photo .cc-photo-actions button');
- await sleep(1500);
+ // "Copying…" is a real intermediate state, so poll for the terminal one rather
+ // than sampling once and reporting the spinner as the outcome.
+ await page.waitForFunction(() => {
+ const t = document.querySelector('#cc-photo .cc-photo-status')?.textContent || '';
+ return /copied|download saves the same file|blocked the copy/i.test(t);
+ }, null, { timeout: 30000 }).catch(() => {});
const copyStatus = await page.evaluate(() => document.querySelector('#cc-photo .cc-photo-status')?.textContent || '');
check('Copy reports a real outcome, never silence', copyStatus.trim().length > 0, copyStatus);
check('Copy never leaves the player at a dead end',