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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
docs(event): close out the /play polish sweep with its measurements and dead ends
nirholas19906ce528c4
diff --git a/prompts/finish/event-PROGRESS.md b/prompts/finish/event-PROGRESS.mdindex c7a858081..36ed1e12e 100644--- a/prompts/finish/event-PROGRESS.md+++ b/prompts/finish/event-PROGRESS.md@@ -553,3 +553,40 @@ other session's `tests/e2e/play-photo-mode.spec.js`. A real GPU, a quiet machinebuild is not the one this Playwright expects).Sample cards for eyeballing: `photo-scene-chromium/card.png` and `photo-scene-webkit/card.png` under`/tmp/claude-1000/-workspaces-three-ws/ca2699d0-9f18-493e-ad30-4677e38f0a7f/scratchpad/`.++## 2026-09-02 · Order 02 · /play polish sweep, the in-world half, closed++**Shipped.** Three clean harness runs (desktop, 375, 320) on a quiet box, run sequentially, all three ending: **0 page errors, 0 touch targets under 40px, 0 focus stops without a ring, 0 network failures.** CLS 0.009 / 0.0045 / 0.0053. Logs in the session scratchpad as `final-{desktop,375,320}.log`; load at start of the set was 11.2 on 16 cores, so every wait ran at the harness's 1x scale.++**What the sweep found and fixed, worst first.**++- **The world's join snapshot never reached a client that was still starting up.** Everything `WalkRoom.onJoin` sends a new arrival (guest token, profile, quests, build permissions, the King of the Totem sync) went out while the client was still inside `await joinRoomWithTimeout`, before one `onMessage` handler existed. Colyseus drops a message nothing claims. This was not console noise: `guestToken` is the credential a guest device replays to reclaim its progression, and it was being thrown away. `onJoin` now queues the snapshot; it is sent when the client says `ready`, and after `JOIN_SETTLE_MS` regardless for a client on an older bundle. Backwards-safe in both deploy directions: the room advertises support through a new append-only `acceptsReady` schema field and the client checks it, because an older room build answers an unknown message type by closing the socket with 4002 and would kick every player on a client-first rollout. `311bf8d3e`, `db189da99`, `d344945ee`.+- **Two dead ends worth not repeating.** A 1.2s fallback for clients that never say `ready` re-created the original bug 1.2s later, because a loaded client is not listening by then either; the fallback now matches the broadcast window. And a one-shot flush could be spent by the timer on a client that could not yet hear it, losing the data again, so `ready` always sends (every payload is a full snapshot, so a second copy is a repaint).+- **The friends drawer ignored a cancel and opened seconds later against the player's intent.** `_openFriends` was async and set `_friendsOpen` only after awaiting its chunk, so `_closeFriends` (Escape, J) short-circuited during the load. Reproduced live: `is-open` present with `transform: matrix(1,0,0,1,380,0)`. The frame is now built synchronously with a skeleton roster, a cancel is honoured, and a failed chunk gets a designed error with a retry instead of an unhandled rejection on a dead button. `3d46c7981`, `2921793a2`.+- **Three uncaught TypeErrors, all the same shape:** a `requestAnimationFrame` callback dereferencing state that `close()` had already nulled. The onboarding card threw on every Escape (`aeed7bea1`), and the avatar gallery picker threw when dismissed on the frame it opened (`3a053d758`). The third was ours by proxy: `_warmShaders` called `compileAsync` even without `KHR_parallel_shader_compile`, which buys no parallelism and leaves three.js polling `checkMaterialsReady` over a captured material set on its own rAF loop after our timeout race stopped awaiting it; a material disposed by world entry in that window throws from inside three's callback where no `try/catch` of ours can reach it (`36ed209bf`).+- **Touch targets.** The entire world HUD, the reaction pills, every panel closer, the shop chips, the onboarding skip cross, the jobs board tabs and Accept button, the lobby sort chips and the 31px-wide footer links were all under 40px at 375. Raised under `(pointer: coarse)` and the economy panel's narrow-width block only; desktop density is untouched. `2921793a2`.+- **Layout shift.** 0.2491 at 320 came almost entirely from the economy panel card: centred and content-sized, so swapping a five-row skeleton for a full jobs board grew it and its top edge climbed. At phone widths it now takes the height it was going to reach anyway and the body scrolls inside it. The lobby's preset row (0 to 50px when saved avatars land, shoving the community grid down) and the emote tray (an empty bordered pill before it fills) are reserved and `:empty`-hidden. 0.055 to 0.0045 at 375, 0.2491 to 0.0053 at 320.+- **Billboards flashing in the top-left corner.** Name plates, chat bubbles, mob health bars and the tag marker are anchored at `left:0` with a `-50%` shift, so they sit half over the screen edge for the frames between being created and first projected. Parked off-screen until placed. `44fc9d26e`.+- **Copy.** Banned dashes cleared from the cold-open intro and the onboarding card.++**The harness was lying, in four separate ways, and that is why this order was still open.** Fixed in `a1c7b0c71` and `908f5f8b4`:++- Any agent saving under `src/` hot-reloads every open page, which resets the run mid-journey. The 2026-09-02 desktop run read 0 results for a search term with hits and 8 for a nonsense term, and nothing in the output said why. The audit's context now refuses Vite's HMR socket specifically (same origin, its `?token=`, root path), leaving the world's Colyseus connection alone. `ALLOW_HMR=1` opts back in. **This is the single most important change for anyone running this harness here.**+- Fixed wall-clock waits made a busy box lie rather than run slow. Waits now scale with the load measured at start-up, printed in the run header.+- Every wait failure printed one sentence, so a crashed renderer, a destroyed context and a real timeout were indistinguishable, and the number it reported was the budget rather than the time actually spent.+- The overflow scan counted anything crossing the viewport edge, including labels the projection parks off camera, buttons scrolled out of the mobile emote tray, and closed drawers; the touch scan measured controls inside a closed, fully transparent overlay, and reported a control sitting exactly on 40px as under it. Both now judge what a player can actually see.++Also: the wheel probe matched "emote wheel" before the Wheel of Fortune and silently measured the wrong panel; the leave step referenced a Node binding inside the page and threw, so the journey never once verified the lobby came back (it does: `{"leaveButton":true,"lobbyVisible":true,"worldGone":true}`); and the `NO_WEBGL` comment claimed it measures the lobby cheaply, which it cannot, because the renderer is built in the constructor so nothing paints.++**Measured, and deliberately not "fixed".**++- `game:king` and `floor:beat` still warn 4 to 7 times per run. They arrive in a single burst at one timestamp (all nine at +230.8s in the desktop run, 156s after world entry), which is the signature of a reconnect during a multi-second software-renderer freeze: the socket buffers, and on resume Colyseus dispatches into a room that has not re-attached handlers. Holding broadcasts back further would trade real players' responsiveness for a symptom of this box. Every targeted join message (`guestToken`, `profile`, `quests`, `build-perms`, `tag`) is gone from the warning list.+- `div.cc-label.npc-name` crossing a screen edge is a nameplate tracking an NPC that is itself at the edge. Clamping it would detach it from its subject.+- `[panel:bank]` and `[panel:wheel]` reporting "no trigger visible" is correct, and is now honest: the wheel probe used to match the emote wheel and pass.+- The no-WebGL path degrades to its designed card ("WebGL unavailable", how to re-enable hardware acceleration, Try again, a way home), not a dead loader.++**Evidence.** `npm run check:rules` clean on every touched path. The 22 world-room suites pass (223 tests) and the 11 suites covering the touched client files pass (123 tests). The join handshake was verified in a real browser against the local world server: the same probe that reported nine `onMessage() not registered` warnings and no stored guest token now reports zero warnings and the token in `localStorage`. Changelog entry landed and the feeds rebuilt (`c9892dc8d`).++**Remains.** Nothing in this order. Not deployed: pushes and production deploys are owner-gated, and the world-server change needs the multiplayer service redeployed for the handshake to take effect in production (the client half is inert until then, by design).++**Not mine.** The full `vitest run` has 12 failures across 10 files, none in /play; `tests/cron-scheduler-sync.test.js` (documented cron count vs `vercel.json`) and `tests/api/x402-discovery-parity.test.js` sit on peers' in-flight work, and the latter passes in isolation. Every file I touched was swept into other agents' commits by their `git add -A` runs before I could stage it, which is why the SHAs above are mostly not mine; content verified intact at HEAD in each case.