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(ar-studio): return the keyboard to whatever opened a dialog on close

nirholaseb3210de16ba
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9302d311c..32a1c280a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -53,6 +53,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **The background agent mint says out loud whether it ran**: Every avatar that finishes a scan or a prompt is given a draft on-chain identity in the background. That step is deliberately best-effort, so it can never cost you your avatar, but it was also completely silent: whether it minted, was skipped because the deployment holds no minting key, or was switched off entirely, the logs looked identical, which is how a run of avatars can go by without anyone noticing the identity was never created. Each finished avatar now records the outcome of both chains, including the reason a leg was skipped. The documentation for the feature also gained a way to prove the whole path on a machine that cannot reach the public test-network faucet, which is routinely exhausted on shared build machines: run your own node with the real Metaplex programs, and the proof reports which node served it rather than handing back an explorer link that leads nowhere. (`/docs/draft-agent-mint`) `[improvement, docs]`
- **The BNB Chain page now says how many demos are actually live**: The BNB Chain page checks each of its three demo tracks against the running deployment and reports the tally in its header. That line was stuck: it read "Checking which tracks are live" forever, even once all three cards beside it had finished and said Live. The page's own result was being written first and then overwritten by the translation pass that swaps the page into your language, so the finished count never survived. The header now holds its result and reads "3 of 3 demo tracks live now". The same checks were also leaving four cancelled requests in the browser's network log on every visit, which made a healthy page look like it was failing to anyone with developer tools open. They now close cleanly. (`/bnb`) `[fix]`
- **The creations gallery now counts every creation a creator has made, and pages all the way to the end**: The gallery ranked creators and paged the feed over only the newest 120 creations, however many the feed actually held. A creator's older work was invisible in their profile count, the top-creator board scored people on a fraction of their output, and scrolling the gallery dead-ended early with items still left to show. It now reads the full feed depth it always meant to, and does it in two database round trips instead of two per item, so the deeper read loads faster than the shallow one did. (`/creations`) `[fix, improvement]`
+- **The FLAME paper link in the Avatar Engines Atlas opens the paper again**: FLAME is the parametric head model underneath most of the photoreal-head engines in the atlas at /avatar-engines, so its Paper button is one a builder actually follows. It pointed at a Max Planck publication page that answers every visitor, browsers included, with a 403 Forbidden, so the button led to an error page instead of the paper. It now opens the paper PDF that the FLAME project site itself links to. All 68 outbound links on the page were re-checked afterwards and every one of them resolves. (`/avatar-engines`) `[fix]`
- **The Forge community board remembers what you liked**: The community showcase on /forge, and the same feed on the daily page and the model explorer, kept showing your own likes as un-liked. The board is held at the edge for a minute so it loads instantly for everyone, but the copy being held was the one built for a visitor who is not you, and it was handed to you as well. Your like button then started from the wrong state, and pressing it again fought with what the server already knew. The board now keeps a separate copy for a signed browser, so the hearts you filled in stay filled. Alongside it, a security fix on the Game-Ready export: when the export was paid for with $THREE rather than covered by holding, a badly formed payment reference made the server answer with the raw internals of its own database instead of a plain "that payment could not be verified". It now says only what a caller needs, and a database problem is no longer reported as a bad payment, so nobody is told to pay twice for an outage on our side. (`/forge`) `[fix, security]`
- **The KOL, Loom and marketplace MCP servers now tell you why a call failed, and ship runnable examples**: When a market-data provider was rate-limited, these servers passed back only a bare code like provider_unavailable and threw away the sentence explaining it. They now surface the full reason. The KOL portfolio tool used to answer a provider outage with an empty card that read as a quiet wallet with no trades; it now reports the outage as an outage, so nobody sizes up a trader from a blank. The KOL and Loom packages also gained runnable examples that talk to the live public API, and the naming SDK now answers an unregistered .eth name the same way it answers an unclaimed .sol one, with data instead of an exception. `[fix, sdk]`
- **The model viewer tells you when a file will not open, and how to recover**: The viewer at /app had two dead ends. Drop a file that is not a glTF or GLB and nothing happened at all: the rejection went to the browser console, where no one would see it, so the page just sat there looking broken. It now says plainly that no model was found in the drop and offers a button to pick a different file. And when a model failed to download, the error card offered a Retry button only to signed-in members loading their own agent; everyone else got a dead card with no way forward. Retry now works for any load, including a file you dropped yourself. The page title and description in search results also went back to describing the viewer instead of the platform, the keyboard focus outline on the chat box and the animation and share fields is now actually visible rather than a barely-there glow, the scene search and chat boxes gained screen-reader labels, and the footer's GitHub links pointed at a repository that no longer exists and now reach the real one. (`/app`) `[fix, improvement]`
diff --git a/STRUCTURE.md b/STRUCTURE.md
index a68f5f6ec..7543400cf 100644
--- a/STRUCTURE.md
+++ b/STRUCTURE.md
@@ -65,7 +65,7 @@ bottom.
| Conversational refinement + remix economy | Iterate: [api/_mcp-studio/tools.js](api/_mcp-studio/tools.js) `refine_model` (free, on `/api/mcp-studio`) + [mcp-server/src/tools/refine-model.js](mcp-server/src/tools/refine-model.js) (paid stdio, $0.25); shared lineage core [mcp-server/src/tools/_lineage.js](mcp-server/src/tools/_lineage.js). Remix (paid track): feed [api/remix-feed.js](api/remix-feed.js) `→ /api/remix-feed` (free browse/publish/lineage), settlement [api/x402/remix-asset.js](api/x402/remix-asset.js) `→ /api/x402/remix-asset` + core [api/_lib/remix-settlement.js](api/_lib/remix-settlement.js) + split math [api/_lib/remix-royalty.js](api/_lib/remix-royalty.js). Docs [docs/remix.md](docs/remix.md), [docs/mcp-studio.md](docs/mcp-studio.md). | Live | Talk to a model to iterate it ("make it metallic") — real anchored re-generation with a revertable/branchable version lineage rendered as a viewer version strip; free on both the OpenAI 3D Studio and the paid MCP server. Creators publish a finished model as remixable (provenance + license + royalty on the existing `forge_creations` rows — no parallel store); another agent pays $0.25 USDC to remix it and a creator-set royalty (≤20%, capped) routes on-chain to the original creator via the audited `transferSolanaUSDC` rail. Split/caps/payout unit-tested ([tests/remix-settlement.test.js](tests/remix-settlement.test.js), [tests/remix-royalty.test.js](tests/remix-royalty.test.js), [tests/refine-lineage.test.js](tests/refine-lineage.test.js)). Free track stays crypto-free. Prompt 09. |
| Restyle Studio (material/PBR editor + AI restyle + variants) | [pages/restyle.html](pages/restyle.html) `→ /restyle`, [src/restyle.js](src/restyle.js). PBR preset/variant library [packages/viewer-presets/src/materials.js](packages/viewer-presets/src/materials.js) (`@three-ws/viewer-presets`). AI restyle + persistence core [api/_lib/material-studio-store.js](api/_lib/material-studio-store.js), free hosted endpoint [api/material-studio.js](api/material-studio.js) `→ /api/material-studio`; paid agent twin [mcp-server/src/tools/restyle-material.js](mcp-server/src/tools/restyle-material.js) (`restyle_material`, $0.05 stdio MCP), thin core [mcp-server/src/tools/_material-core.js](mcp-server/src/tools/_material-core.js). Shares the `refine_model` lineage core ([mcp-server/src/tools/_lineage.js](mcp-server/src/tools/_lineage.js)) so a restyle/variant is just another kind of version, feeding prompt 09 remix. Docs: [docs/mcp-tools.md](docs/mcp-tools.md). | Live | Re-skin any GLB without regenerating its mesh: live PBR editing (color/metalness/roughness/emissive/texture) with a one-click preset library (14 looks — chrome, gold, glass, wood…), seeded reproducible colorway variants (mulberry32 PRNG — same base+seed → same set), and free-text AI restyle ("make it chrome", "cyberpunk neon") via IBM Granite-proposed PBR factors applied + re-exported server-side. Every AI restyle / saved checkpoint mints a real, `gltf-validator`-checked, durably-stored GLB recorded in an immutable parent→child lineage — non-destructive in the durable sense, not just an in-browser Reset. Roadmap prompt 06. |
| Embodiment: a living agent body in the chat | Hosted embed [pages/embodiment/embed.html](pages/embodiment/embed.html) `→ /embodiment/embed` (Vite input + vercel route, `frame-ancestors *`); engine [apps-sdk/embodiment/embodiment-stage.js](apps-sdk/embodiment/embodiment-stage.js) (`EmbodimentStage`) + [overlay.js](apps-sdk/embodiment/overlay.js); persona tools (free) [api/_mcp-studio/persona-tools.js](api/_mcp-studio/persona-tools.js) → `/api/mcp-studio` (`create_agent_persona`, `get_agent_persona`, `persona_say`) and (paid) [api/_mcp3d/tools/studio.js](api/_mcp3d/tools/studio.js); shared inline-body artifact [api/_lib/embodiment-artifact.js](api/_lib/embodiment-artifact.js); identity store [api/_lib/persona-store.js](api/_lib/persona-store.js) (Postgres `agent_personas` + fs fallback + durable R2 GLB); reload route [api/mcp3d/persona.js](api/mcp3d/persona.js) `→ /api/mcp3d/persona`; live chain-state feed [api/mcp3d/persona-identity.js](api/mcp3d/persona-identity.js) `→ /api/mcp3d/persona-identity` (polled only when the embed is opened with `?wallet=1`). Emotion/rig/lip-sync cores under [src/embodiment/](src/embodiment) + [src/voice/](src/voice). | Live | A generated avatar becomes a persistent, named body that renders inline in ChatGPT/Claude: it lip-syncs each reply, blends the matching expression + gesture, idles between turns, and reloads by `persona_id` in a fresh session (the id is the capability, no sign-in). Rides the universal canonicalize/retarget clip library; a rig without face morphs animates the jaw, a non-humanoid GLB falls back to a gentle idle (`decideRigMode`/`supportsCanonicalClips`), never a bind-pose T-pose. Zero crypto/token surface. Tests: [tests/persona-store.test.js](tests/persona-store.test.js), [tests/api/persona-resolve-route.test.js](tests/api/persona-resolve-route.test.js), [tests/api/persona-identity-route.test.js](tests/api/persona-identity-route.test.js), [tests/mcp-studio.test.js](tests/mcp-studio.test.js), [tests/embodiment-rig-mode.test.js](tests/embodiment-rig-mode.test.js). Evidence: [prompts/store-submissions/_generated/embodiment/](prompts/store-submissions/_generated/embodiment/). Store-submission prompt 07. |
-| Claude.ai artifact embed + builder | Endpoint [api/artifact.js](api/artifact.js) `→ /api/artifact`, prebuilt viewer [public/artifact-viewer.bundle.js](public/artifact-viewer.bundle.js) (source [scripts/artifact-viewer/src.js](scripts/artifact-viewer/src.js), `npm run build:artifact-viewer`), builder page [public/artifact/index.html](public/artifact/index.html) `→ /artifact` + [README](public/artifact/README.md), contract [specs/CLAUDE_ARTIFACT.md](specs/CLAUDE_ARTIFACT.md), vendored sandbox CSP [public/claude-artifact-csp.txt](public/claude-artifact-csp.txt) (refresh: [scripts/refresh-claude-csp.mjs](scripts/refresh-claude-csp.mjs)). | Live | `GET /api/artifact?agent=<uuid>` returns ONE self-contained HTML document with three.js, GLTFLoader, the viewer and the agent GLB all inlined, because Claude's artifact sandbox CSP blocks every external script and fetch. Paste the URL into a Claude conversation and the agent renders inline. The builder page is the pre-flight: it lists real public agents that carry an embeddable avatar (`/api/agents/public?avatar=1`), renders the response in a sandboxed iframe under the same CSP Claude applies, and reports payload size, first paint and sandbox compliance before you paste. `?model=<glb url>` is the viewer-only lane (allowlisted https origins, SSRF-guarded, 6 MB cap). Tests: [tests/api/artifact.test.js](tests/api/artifact.test.js) pins the generated HTML against the vendored Claude CSP. |
+| Claude.ai artifact embed + builder | Endpoint [api/artifact.js](api/artifact.js) `→ /api/artifact`, prebuilt viewer [public/artifact-viewer.bundle.js](public/artifact-viewer.bundle.js) (source [scripts/artifact-viewer/src.js](scripts/artifact-viewer/src.js), `npm run build:artifact-viewer`), builder page [public/artifact/index.html](public/artifact/index.html) `→ /artifact` + [README](public/artifact/README.md), contract [specs/CLAUDE_ARTIFACT.md](specs/CLAUDE_ARTIFACT.md), vendored sandbox CSP [public/claude-artifact-csp.txt](public/claude-artifact-csp.txt) (refresh: [scripts/refresh-claude-csp.mjs](scripts/refresh-claude-csp.mjs)). | Live | `GET /api/artifact?agent=<uuid>` returns ONE self-contained HTML document with three.js, GLTFLoader, the viewer and the agent GLB all inlined, because Claude's artifact sandbox CSP blocks every external script and fetch. Paste the URL into a Claude conversation and the agent renders inline. The builder page is the pre-flight: it lists real public agents that carry an embeddable avatar (`/api/agents/public?avatar=1`), renders the response in a sandboxed iframe under the same CSP Claude applies, and reports payload size, fetch time, frame render time and sandbox compliance before you paste. Size is graded against the ceiling the endpoint can actually emit (a 6 MB model base64-inlines to 8 MB, plus the 565 KB viewer), not against the raw model cap, so a large-but-accepted artifact is not flagged as over budget. `?model=<glb url>` is the viewer-only lane (allowlisted https origins, SSRF-guarded, 6 MB cap). Tests: [tests/api/artifact.test.js](tests/api/artifact.test.js) pins the generated HTML against the vendored Claude CSP. |
| Spatial MCP (3D as a native response type) | Spec [specs/SPATIAL_MCP.md](specs/SPATIAL_MCP.md), pure validator/builder/lint [public/spatial-mcp/spatial-validator.js](public/spatial-mcp/spatial-validator.js) (published at `https://three.ws/spatial-mcp/spatial-validator.js`; server-side re-export [api/_lib/spatial-mcp.js](api/_lib/spatial-mcp.js)), npm package + conformance fixture corpus [packages/spatial-mcp/](packages/spatial-mcp) (`@three-ws/spatial-mcp`, CC0, drift-guarded byte-identical to the published module), validator tool [api/_mcp3d/tools/spatial.js](api/_mcp3d/tools/spatial.js) (`validate_spatial_response`, free), reference renderer [public/spatial-mcp/spatial-renderer.js](public/spatial-mcp/spatial-renderer.js) + demo/checker [public/spatial-mcp/index.html](public/spatial-mcp/index.html) + [public/spatial-mcp/demo.js](public/spatial-mcp/demo.js) `→ /spatial-mcp`, docs [docs/spatial-mcp.md](docs/spatial-mcp.md). | Live · both stores | Open (CC0) shape for returning a live, interactive 3D scene as a first-class MCP tool result (scene GLB, camera, environment, animation, AR handoff, affordances) instead of a URL. Every three.ws 3D generator emits a conformant artifact under `structuredContent.spatial`; the validator returns actionable errors, not a boolean; the framework-free reference renderer displays any conformant payload — including one transformed from a foreign tool result (portability proof at `/spatial-mcp`). The page runs the real validator in the browser: every rendered payload shows its verdict, and a paste-in checker validates arbitrary payloads as you type (with a deliberately broken example) so an implementer debugs an adapter without leaving the page. Zero coin surface — reusable in the OpenAI free app. Tests: [tests/spatial-mcp.test.js](tests/spatial-mcp.test.js), render smoke [tests/e2e/spatial-mcp-render.spec.js](tests/e2e/spatial-mcp-render.spec.js). Evidence: [prompts/store-submissions/_generated/spatial-mcp/](prompts/store-submissions/_generated/spatial-mcp/). Store-submission prompt 20. |
| AR-ready exports ("View in your space") | Device-routing core [api/_lib/ar-launch.js](api/_lib/ar-launch.js), UA-branched launch endpoint [api/ar.js](api/ar.js) `→ /api/ar`, MCP tool [api/_mcp3d/tools/ar.js](api/_mcp3d/tools/ar.js) (`export_ar`, free), in-viewer AR button [public/viewer.html](public/viewer.html), docs [docs/ar.md](docs/ar.md). | Live · both stores | `GET /api/ar?src=<glb>` branches on the request User-Agent server-side: iOS → Apple Quick Look (USDZ generated from the GLB on the fly by model-viewer's three.js USDZExporter — real conversion, no server USD tooling), Android → 302 Google Scene Viewer ARCore intent with browser fallback, desktop → WebGL viewer. Bad input rejected at the boundary with a designed error page. `export_ar` returns the AR launch link + a conformant Spatial-MCP artifact; response is OpenAI-clean (no ids/coin surface). `kind=avatar` is the living-agent lane: the launch page leads with a "Bring it to life" handoff into `/irl?avatar=<glb>` (avatar-producing tools return `irlUrl` automatically), and Android serves the launch page instead of the blind Scene Viewer redirect so the living path stays visible. Shared links unfurl: the launch page's `og:image` points at `GET /api/render/glb?glbUrl=` ([api/render/glb.js](api/render/glb.js), server-side PNG of the actual model, CDN-cached a day) and the page carries "Create your own" → `/ar` conversion CTAs. Tests: [tests/ar-export.test.js](tests/ar-export.test.js). Evidence: [prompts/store-submissions/_generated/ar/](prompts/store-submissions/_generated/ar/). Store-submission prompt 21. |
| AR Forge (prompt → model → your room) | [public/ar-forge.html](public/ar-forge.html) `→ /ar` (self-contained page, CDN model-viewer + local meshopt decoder, no Vite registration needed; vercel route sets `xr-spatial-tracking` permissions-policy) | Live | Mobile-first app: one prompt hits the free NVIDIA lane (`POST /api/forge {backend:"nvidia"}`, poll `?job=`), the result renders in an AR-capable `<model-viewer>` with "View in your space" (WebXR / Scene Viewer / Quick Look). Non-AR devices get a QR handoff to `GET /api/ar?src=` (server-side UA routing) plus a copyable `/viewer?src=` share link. Deep link `/ar?src=<glb>&title=` reopens any shared model; recent forges persist in localStorage. Designed idle/working/failed/result states; https-only GLB guard. |
diff --git a/data/changelog.json b/data/changelog.json
index 712b8076b..49727bab7 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,25 @@
{
"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-08-16",
+ "title": "Crypto Categories is searchable, and loads in a fraction of the time",
+ "summary": "The sector leaderboard at /categories renders every category the market data provider reports, and that number has grown past 750. All of them were being drawn into the page at once, roughly 2,250 coin icons in a single paint, and the only way to find a sector was to scroll past the ones above it. The table now opens with the top 50 and pages in 50 more at a time, and a search box narrows all 751 by name before you ever need to page. The full category name is shown too, instead of being cut off mid-word on a wide screen. The three things that can go wrong now read differently and each offers a way out: a failed load says the data provider did not answer and gives you a Try again button that refetches, a provider that reports nothing says so, and a search that matches nothing offers to clear itself. Sortable column headers now announce themselves to screen readers, and keyboard focus stays on the column you just sorted instead of being dropped back to the top of the page.",
+ "tags": [
+ "improvement",
+ "fix"
+ ],
+ "link": "/categories"
+ },
+ {
+ "date": "2026-08-16",
+ "title": "The FLAME paper link in the Avatar Engines Atlas opens the paper again",
+ "summary": "FLAME is the parametric head model underneath most of the photoreal-head engines in the atlas at /avatar-engines, so its Paper button is one a builder actually follows. It pointed at a Max Planck publication page that answers every visitor, browsers included, with a 403 Forbidden, so the button led to an error page instead of the paper. It now opens the paper PDF that the FLAME project site itself links to. All 68 outbound links on the page were re-checked afterwards and every one of them resolves.",
+ "tags": [
+ "fix"
+ ],
+ "link": "/avatar-engines"
+ },
{
"date": "2026-08-16",
"title": "The model viewer tells you when a file will not open, and how to recover",
diff --git a/pages/ar-studio.html b/pages/ar-studio.html
index 3dd5df5a8..d9a40f83b 100644
--- a/pages/ar-studio.html
+++ b/pages/ar-studio.html
@@ -26,6 +26,10 @@
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />
+ <!-- Shared rooms ("Share live") ride the same Colyseus service as /irl and /agora,
+ in its own studio_world room. Without this tag src/ar/studio-net.js resolves an
+ empty server URL on three.ws and every room silently reports "offline". -->
+ <meta name="studio-server" content="wss://three-ws-multiplayer-93741856042.us-central1.run.app" />
<style>
:root {
--bg: #000;
@@ -260,8 +264,17 @@
@keyframes ars-sheet { from { transform: translateY(24px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
.ars-tray-head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.ars-tray-head h2 { margin: 0; font-size: 15px; flex: 1 1 auto; }
+ /* The strip scrolls at phone widths with the scrollbar hidden, so the only
+ sign that Objects and GLB link exist is an edge fade. Both edges are
+ driven by data-scroll (set in src/ar-studio.js) so the cue points at
+ whichever direction still has tabs, in any translation. */
.ars-tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.ars-tabs::-webkit-scrollbar { display: none; }
+ .ars-tabs[data-scroll~="end"] { mask-image: linear-gradient(to right, #000 82%, transparent 100%); }
+ .ars-tabs[data-scroll~="start"] { mask-image: linear-gradient(to left, #000 82%, transparent 100%); }
+ .ars-tabs[data-scroll~="start"][data-scroll~="end"] {
+ mask-image: linear-gradient(to right, transparent 0%, #000 18%, #000 82%, transparent 100%);
+ }
.ars-tab {
appearance: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 650;
color: var(--ink-dim); background: rgba(255, 255, 255, 0.05);
@@ -429,14 +442,14 @@
<h2 data-i18n="ar_studio.add_models_2">Add models</h2>
<button class="ars-icon-btn" id="ars-tray-close" type="button" aria-label="Close" data-i18n-attr="aria-label:ar_studio.close_arialabel">✕</button>
</div>
- <div class="ars-tabs" role="tablist">
- <button class="ars-tab" type="button" role="tab" data-tab="recent" aria-selected="false" data-i18n="ar_studio.recent_forges">Recent forges</button>
- <button class="ars-tab" type="button" role="tab" data-tab="yours" aria-selected="false" data-i18n="ar_studio.yours">Yours</button>
- <button class="ars-tab" type="button" role="tab" data-tab="community" aria-selected="false" data-i18n="ar_studio.community">Community</button>
- <button class="ars-tab" type="button" role="tab" data-tab="objects" aria-selected="false" data-i18n="ar_studio.objects">Objects</button>
- <button class="ars-tab" type="button" role="tab" data-tab="link" aria-selected="false" data-i18n="ar_studio.glb_link">GLB link</button>
+ <div class="ars-tabs" role="tablist" aria-label="Model sources">
+ <button class="ars-tab" type="button" role="tab" id="ars-tab-recent" data-tab="recent" aria-selected="false" aria-controls="ars-tray-body" data-i18n="ar_studio.recent_forges">Recent forges</button>
+ <button class="ars-tab" type="button" role="tab" id="ars-tab-yours" data-tab="yours" aria-selected="false" aria-controls="ars-tray-body" data-i18n="ar_studio.yours">Yours</button>
+ <button class="ars-tab" type="button" role="tab" id="ars-tab-community" data-tab="community" aria-selected="false" aria-controls="ars-tray-body" data-i18n="ar_studio.community">Community</button>
+ <button class="ars-tab" type="button" role="tab" id="ars-tab-objects" data-tab="objects" aria-selected="false" aria-controls="ars-tray-body" data-i18n="ar_studio.objects">Objects</button>
+ <button class="ars-tab" type="button" role="tab" id="ars-tab-link" data-tab="link" aria-selected="false" aria-controls="ars-tray-body" data-i18n="ar_studio.glb_link">GLB link</button>
</div>
- <div class="ars-tray-body" id="ars-tray-body"></div>
+ <div class="ars-tray-body" id="ars-tray-body" role="tabpanel" tabindex="0" aria-labelledby="ars-tab-recent"></div>
</div>
</div>
diff --git a/pages/atlas.html b/pages/atlas.html
index c632fe9dc..9b8f2d742 100644
--- a/pages/atlas.html
+++ b/pages/atlas.html
@@ -34,6 +34,14 @@
max-width: 1080px;
margin: 0 auto;
padding: calc(var(--space-md) * 2) var(--space-md) calc(var(--space-md) * 4);
+ /* The no-match state echoes whatever the visitor typed, and route paths
+ are single unbreakable tokens. Either can be longer than the line
+ box, and without this a 240-character query gave the whole document
+ a horizontal scrollbar (1912px wide at a 1440px viewport). `anywhere`
+ rather than `break-word` because only `anywhere` also shrinks
+ min-content, which is what keeps <main> and the grid tracks from
+ being pushed past a 320px viewport by the same string. */
+ overflow-wrap: anywhere;
}
.at-crumb {
font: var(--text-sm) var(--font-body);
diff --git a/pages/bundles.html b/pages/bundles.html
index 9980b970d..9caf99166 100644
--- a/pages/bundles.html
+++ b/pages/bundles.html
@@ -533,18 +533,20 @@
res = await apiFetch('/api/agents/' + encodeURIComponent(agentId) + '/bundles?' + qs);
} catch {
if (seq !== pricingSeq) return;
- return priceError('Could not reach the pricing service. Change a skill to retry.');
+ return priceError('<b>Could not reach the pricing service.</b> Your selection is intact.', true);
}
if (seq !== pricingSeq) return; // a newer request already answered
show($('bd-price-loading'), false);
if (!res.ok) {
const b = await res.json().catch(() => null);
- return priceError(esc(b?.error_description || b?.message || ('Pricing failed (HTTP ' + res.status + ').')));
+ // 4xx is the server answering (mixed currencies, unpriced skills); 5xx is
+ // the server failing, which is the only one a retry can fix.
+ return priceError(esc(b?.error_description || b?.message || ('Pricing failed (HTTP ' + res.status + ').')), res.status >= 500);
}
const body = await res.json().catch(() => null);
pricing = body?.data || null;
- if (!pricing) return priceError('The pricing service returned an unreadable response.');
+ if (!pricing) return priceError('The pricing service returned an unreadable response.', true);
decimals = Number(pricing.mint_decimals ?? decimals);
sumOfParts = Number(fromAtomic(pricing.sum_of_parts_atomic));
@@ -553,11 +555,17 @@
renderPricing();
}
- function priceError(msg) {
+ // `retry` is offered only for failures a retry can fix. A 409 on mixed
+ // currencies or a 404 on unpriced skills is the server answering correctly;
+ // asking again would return the same answer, so the seller gets the reason
+ // and no button that pretends otherwise.
+ function priceError(msg, retry) {
show($('bd-price-loading'), false);
show($('bd-price-body'), false);
- $('bd-price-error').innerHTML = msg;
- show($('bd-price-error'), true);
+ const el = $('bd-price-error');
+ el.innerHTML = msg;
+ if (retry) el.appendChild(retryButton(fetchPricing));
+ show(el, true);
}
function renderPricing() {
diff --git a/pages/capture.html b/pages/capture.html
index 3a7616d13..2ff859c19 100644
--- a/pages/capture.html
+++ b/pages/capture.html
@@ -247,14 +247,14 @@
</button>
<!-- Loading -->
- <div class="pc-overlay" id="pc-loading" hidden>
+ <div class="pc-overlay" id="pc-loading" role="status" aria-live="polite" hidden>
<div class="pc-spinner"></div>
<h3 id="pc-loading-title" data-i18n="capture.working">Working…</h3>
<p id="pc-loading-sub"></p>
</div>
<!-- Error -->
- <div class="pc-overlay" id="pc-error" hidden>
+ <div class="pc-overlay" id="pc-error" role="alert" hidden>
<div class="pc-glyph" style="color:#f0f0f0">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M12 9v4 M12 17h.01"/><circle cx="12" cy="12" r="9"/></svg>
</div>
@@ -267,7 +267,7 @@
<!-- HUD -->
<div class="pc-hud" id="pc-hud" hidden>
- <div class="pc-hud-label" id="pc-hud-label"></div>
+ <div class="pc-hud-label" id="pc-hud-label" role="status" aria-live="polite"></div>
<div class="pc-hud-right">
<div class="pc-size-wrap" title="Point size ( [ and ] )">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="7" cy="7" r="1.5" fill="currentColor"/><circle cx="17" cy="17" r="3.5" fill="currentColor"/></svg>
diff --git a/prompts/swarm-100/route-bnb.md b/prompts/swarm-100/route-bnb.md
deleted file mode 100644
index f6d969411..000000000
--- a/prompts/swarm-100/route-bnb.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# Route audit: /bnb (BNB Chain: Three Genuinely-Unique Demos)
-
-How to run: paste this file's repo path into a fresh Claude Code chat in this
-repository and say "run this work order". This file is fully self-contained:
-it depends on no other prompt file anywhere. If neighboring files in
-prompts/swarm-100/ are gone, that work is done; if present, ignore them.
-Every claim below rots; step 0 re-measures, and what you measure wins.
-
-## Operating clause (binding)
-
-- Read CLAUDE.md first. Its rules override everything, including this file.
-- Finish 100% in this session. Never end the turn with a question, an option
- list, or an unexecuted plan. A judgment call goes in one line of the final
- report; it never becomes a question that halts work.
-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real
- funds or any irreversible on-chain write, git push or a production deploy,
- committing content that references a crypto project other than $THREE, and
- destroying unrecoverable data.
-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no
- commented-out code. Real APIs and real integrations only.
-- The em-dash and en-dash characters are banned in everything you write.
-- Concurrent agents share this worktree: stage explicit paths only (never a
- bare add-everything), and commit finished work promptly.
-- Before committing, run: npm run check:rules -- --paths <files you touched>.
- It must exit 0.
-
-## Step 0: re-derive the current state
-
-1. This route's declared entry (path, description, added date):
-
- node -e "const p=require('./data/pages.json');for(const s of p.sections)for(const g of s.pages)if(g.path==='/bnb')console.log(JSON.stringify(g,null,2))"
-
-2. Find the serving implementation: grep "/bnb" in vercel.json (the live
- route table server/index.mjs boots from), then list matching files in
- pages/ and src/. STRUCTURE.md maps every surface to its directory if the
- grep is ambiguous.
-3. Production right now:
-
- curl -so /dev/null -w '%{http_code}\n' https://three.ws/bnb
-
-4. Start (or reuse) the local dev server: npm run dev (vite, port 3000).
-
-## Task: audit this one route end to end, then fix everything found
-
-Route: /bnb ("BNB Chain: Three Genuinely-Unique Demos", section "crypto").
-Declared purpose: The BNB Chain campaign's front door: gasless agent onboarding, an on-chain-gated 3D vault, and a real-time on-chain world, each traced to a capability independently verified live on BNB Chain: plus a live block-time widget proving the ~0.45s block claim on every page load. Cards auto-light-up from coming-soon to live as each track ships.
-
-Drive the page in a real headless browser. Playwright is already a dev
-dependency; keep your probe script in the session scratchpad, never in the
-repo.
-
-1. Load http://localhost:3000/bnb. Record the HTTP status, every console
- error and warning, and every failed network request.
-2. Exercise it like a first-time user: click the primary actions, run the
- primary flow if one exists, follow the page's internal links. Every button
- must do something real; every link must resolve. If the page renders data,
- prove in the network log that it came from a live endpoint, not a baked-in
- fallback array.
-3. States: verify populated, empty, loading, and error states are designed and
- reachable. Block the page's primary fetch in Playwright and confirm an
- actionable error state appears, not a blank void or a raw exception.
-4. Responsive: render at 320, 768, and 1440 px. No horizontal page scroll, no
- overlapping or clipped controls.
-5. Accessibility basics: one h1; interactive elements are real buttons or
- links with visible focus states; images carry alt text; form fields have
- labels.
-6. Head: a specific title tag and meta description that match the declared
- purpose above.
-7. Fix every defect at its root in the page's real source files and re-run the
- probe until clean. Defects in shared modules are in scope when this route
- exercises them.
-
-## Definition of done
-
-- [ ] Local load of /bnb: HTTP 200, zero console errors, zero unhandled
- failed requests (a third-party outage must land in a designed fallback,
- not a broken page).
-- [ ] No dead interactive element on the page: no stub href="#", no button
- without a handler, no link to a missing path.
-- [ ] Empty, loading, error, and populated states verified.
-- [ ] 320 / 768 / 1440 px renders verified clean.
-- [ ] Title and meta description present and specific.
-- [ ] npm test passes; npm run check:rules -- --paths <touched files> exits 0.
-- [ ] Production status from step 0 recorded in the report; if production
- needs a deploy to pick up a fix, the report says so (deploys stay
- owner-gated).
-
-## Never blocked
-
-| Blocker | Resolution (act, do not ask) |
-|---|---|
-| Missing env var or credential | Check .env and .env.local, then the Cloud Run service env, then Secret Manager (the CLAUDE.md self-unblock playbook has the exact commands). If it truly exists nowhere, wire the code fully behind the env var, prove the wiring with a dry run, and name the single missing var in the report. |
-| gcloud not on PATH | Run: export PATH="$HOME/google-cloud-sdk/bin:$PATH" |
-| Dev server port 3000 busy | Another agent may be serving this repo; probe it and reuse if so. Otherwise start your own on a free port: npx vite --port 3101 |
-| Playwright browser missing | npx playwright install chromium |
-| A surface needs a signed-in user | Register a fresh account through the real /register flow against the real API and use it. Never mock the session. |
-| A defect sits in code you did not touch | Fix it if it blocks a Definition of done line (root cause it, never mask it). Otherwise note it in the report and continue. |
-| An unrelated test is red | Same rule. Never pipe npm test through tail; it masks exit codes. |
-
-## Close out (required)
-
-1. Verify every Definition of done line with the actual command output in
- front of you. Never claim a line you did not verify.
-2. Commit with explicit paths and a subject that describes the diff (house
- style: type(scope): what changed and why a reader cares).
-3. Delete this prompt file in that same commit:
-
- git rm prompts/swarm-100/route-bnb.md
-
- The shrinking directory is this campaign's only progress ledger; there is
- no progress log to update.
-4. Final report: what step 0 measured, what changed (file list), evidence per
- Definition of done line, and any one-line judgment calls. No trailing
- questions, no unexecuted plans.
-
-If a line genuinely cannot pass inside this session (an external party must
-respond, or an owner-gated action is the final step), finish everything else,
-leave this file in place, and state exactly which line remains and who owns
-it. Never delete this file on a partial.
diff --git a/public/artifact/README.md b/public/artifact/README.md
index 277f24c40..d020ae8e2 100644
--- a/public/artifact/README.md
+++ b/public/artifact/README.md
@@ -33,12 +33,20 @@ Claude embeds the artifact and the live 3D character renders inline.
- **GLB size cap: 6 MB** — larger avatars return 413. Slimmer GLBs paste faster and render sooner.
- **Viewer overhead: ~565 KB** — three.js + GLTFLoader + viewer code, inlined into every response.
+- **Artifact ceiling: ~8.6 MB** — the model is inlined as base64, which costs four bytes per three, so a 6 MB GLB becomes 8 MB of text before the viewer is added. Budget against this total, not against the 6 MB model cap: it is what Claude actually has to load.
- **Rate limit: 600 req/min per IP** — shared with the widget-read preset.
## How to test before pasting
The page at [`/artifact/`](https://three.ws/artifact/) renders the response inside a sandboxed iframe whose CSP mirrors Claude's. If it works there, it works in Claude.
+It reports three numbers per build. **Artifact** is the size of the whole document, graded
+against the ~8.6 MB ceiling above rather than the 6 MB model cap. **Fetch** is how long
+`/api/artifact` took to return those bytes. **Render** is how long the sandboxed frame then
+took to parse the document and run the inlined viewer, which is the closest measurable
+stand-in for how quickly Claude's panel can show anything: the frame is an opaque origin, so
+the page cannot read paint timing out of it directly.
+
You do not need to know an agent ID to try it: the builder lists real public agents that
carry an embeddable avatar (`GET /api/agents/public?sort=popular&limit=12&avatar=1`), and
clicking one builds its artifact immediately. Typing an ID by hand still works, and the
diff --git a/public/artifact/index.html b/public/artifact/index.html
index 2b0878993..38d7f4b9a 100644
--- a/public/artifact/index.html
+++ b/public/artifact/index.html
@@ -716,8 +716,12 @@
<span class="value" id="statSize">—</span>
</div>
<div class="stat">
- <span class="label" data-i18n="artifact_index.first_paint">First paint</span>
- <span class="value" id="statTtfp">—</span>
+ <span class="label" data-i18n="artifact_index.fetch">Fetch</span>
+ <span class="value" id="statFetch">…</span>
+ </div>
+ <div class="stat">
+ <span class="label" data-i18n="artifact_index.render">Render</span>
+ <span class="value" id="statRender">…</span>
</div>
<div class="stat">
<span class="label" data-i18n="artifact_index.sandbox">Sandbox</span>
@@ -779,9 +783,11 @@
</div>
<div class="fact">
<h3 data-i18n="artifact_index.size_budget">Size budget</h3>
- <p data-i18n="artifact_index.glbs_over_6_mb_are_rejected_because">
- GLBs over 6 MB are rejected, because Claude's artifact panel can hang on huge
- inlined payloads. The viewer adds a flat 565 KB on top of the model.
+ <p data-i18n="artifact_index.models_over_6_mb_are_rejected_because">
+ Models over 6 MB are rejected, because Claude's artifact panel can hang on huge
+ inlined payloads. Inlining base64-encodes the model, which costs four bytes per
+ three, on top of the flat 565 KB viewer: a 6 MB model lands at roughly 8.6 MB of
+ HTML. That total, not the model, is what the size stat grades.
</p>
</div>
</section>
@@ -805,7 +811,8 @@
overlay: $('previewOverlay'),
stats: $('stats'),
statSize: $('statSize'),
- statTtfp: $('statTtfp'),
+ statFetch: $('statFetch'),
+ statRender: $('statRender'),
statSandbox: $('statSandbox'),
snippet: $('claudeSnippet'),
toast: $('toast'),
@@ -814,13 +821,33 @@
bgHint: $('bgHint'),
};
- const state = { url: null, html: null };
+ const state = { url: null, html: null, renderToken: 0 };
// Public directory feed for the picker. `avatar=1` is load-bearing: an agent
// without a publicly readable GLB cannot be rendered as an artifact at all,
// so offering it here would hand the visitor a pick that can only 422.
const AGENTS_ENDPOINT = '/api/agents/public?sort=popular&limit=12&avatar=1';
+ // What the size stat grades against. /api/artifact caps the MODEL at 6 MiB
+ // (MAX_GLB_BYTES) and inlines it as base64, which costs four bytes per three,
+ // on top of the flat 565 KB viewer. So the largest artifact the endpoint can
+ // return is about 8.6 MB, and every byte under that is one it already
+ // approved. Grading those base64 bytes against raw-model numbers is what made
+ // a legal 7 MB artifact read amber and anything from a model over ~5.6 MiB
+ // read red, contradicting the endpoint that had just accepted it.
+ const MAX_MODEL_BYTES = 6 * 1024 * 1024;
+ const VIEWER_BYTES = 565 * 1024;
+ const ARTIFACT_CEILING_BYTES = Math.ceil(MAX_MODEL_BYTES / 3) * 4 + VIEWER_BYTES;
+
+ // An artifact only becomes a problem as it approaches that ceiling, so the
+ // bands are shares of it. Over 100% means the endpoint emitted more than its
+ // own cap allows, which is a server-side change this page should shout about.
+ const SIZE_WARN_RATIO = 0.7;
+
+ // Beyond this the iframe is treated as having failed to come up rather than
+ // leaving the render stat blank forever.
+ const RENDER_TIMEOUT_MS = 30000;
+
// Actionable next step per error code from /api/artifact. The endpoint's own
// error_description says what went wrong; this says what to do about it.
const ERROR_HINTS = {
@@ -919,6 +946,42 @@
}
}
+ // Hand the document to the iframe and time how long the frame takes to
+ // report it loaded: parsed the HTML and ran the inlined three.js + viewer.
+ // That is the honest ceiling on how fast Claude's panel can show anything,
+ // and it is the only render signal the parent can read, because the frame is
+ // a sandboxed opaque origin. The token guards against a second Generate
+ // landing while the first frame is still coming up: only the newest run may
+ // write the stat.
+ function renderIntoFrame(html) {
+ const token = ++state.renderToken;
+ const start = performance.now();
+ els.statRender.textContent = '…';
+ els.statRender.className = 'value';
+ els.statRender.title = 'Time for the sandboxed frame to parse and run the artifact.';
+
+ let settled = false;
+ const settle = (text, cls) => {
+ if (settled || token !== state.renderToken) return;
+ settled = true;
+ clearTimeout(timer);
+ els.frame.removeEventListener('load', onLoad);
+ els.statRender.textContent = text;
+ els.statRender.className = 'value ' + cls;
+ };
+ const onLoad = () => {
+ const ms = performance.now() - start;
+ settle(`${ms.toFixed(0)} ms`, ms > 8000 ? 'bad' : ms > 3000 ? 'warn' : 'ok');
+ };
+ const timer = setTimeout(
+ () => settle(`> ${(RENDER_TIMEOUT_MS / 1000).toFixed(0)} s`, 'bad'),
+ RENDER_TIMEOUT_MS,
+ );
+
+ els.frame.addEventListener('load', onLoad);
+ els.frame.srcdoc = html;
+ }
+
async function generate() {
const agentId = els.agentInput.value.trim();
if (!agentId) {
@@ -937,6 +1000,9 @@
showLoadingOverlay('Fetching artifact…');
setBusy(true);
+ // Retire any frame still coming up from a previous run, so its timing can
+ // never land under the artifact this run is about to fetch.
+ state.renderToken++;
const t0 = performance.now();
let res;
@@ -964,23 +1030,28 @@
}
const html = await res.text();
- const elapsed = performance.now() - t0;
+ const fetchMs = performance.now() - t0;
state.html = html;
const cspHeader = res.headers.get('content-security-policy') || '';
const sandboxOk = /frame-ancestors\s+\*/.test(cspHeader);
const sizeBytes = new Blob([html]).size;
+ const ceilingShare = sizeBytes / ARTIFACT_CEILING_BYTES;
els.statSize.textContent = fmtBytes(sizeBytes);
els.statSize.className =
- 'value ' + (sizeBytes > 8 * 1024 * 1024 ? 'bad' : sizeBytes > 5 * 1024 * 1024 ? 'warn' : 'ok');
- els.statTtfp.textContent = `${elapsed.toFixed(0)} ms`;
- els.statTtfp.className = 'value ' + (elapsed > 5000 ? 'bad' : elapsed > 2000 ? 'warn' : 'ok');
+ 'value ' + (ceilingShare > 1 ? 'bad' : ceilingShare > SIZE_WARN_RATIO ? 'warn' : 'ok');
+ els.statSize.title = `${Math.round(ceilingShare * 100)}% of the ${fmtBytes(
+ ARTIFACT_CEILING_BYTES,
+ )} ceiling a 6 MB model produces once inlined`;
+ els.statFetch.textContent = `${fetchMs.toFixed(0)} ms`;
+ els.statFetch.className = 'value ' + (fetchMs > 5000 ? 'bad' : fetchMs > 2000 ? 'warn' : 'ok');
+ els.statFetch.title = 'Time for /api/artifact to return the whole document.';
els.statSandbox.textContent = sandboxOk ? 'compliant' : 'mismatch';
els.statSandbox.className = 'value ' + (sandboxOk ? 'ok' : 'bad');
els.stats.hidden = false;
- els.frame.srcdoc = html;
+ renderIntoFrame(html);
hideOverlay();
setBusy(false);
diff --git a/public/changelog.json b/public/changelog.json
index aa815d50c..5440490b5 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-16T19:48:54.762Z",
+ "generated_at": "2026-08-16T19:50:05.877Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -503,6 +503,16 @@
"improvement"
]
},
+ {
+ "date": "2026-08-16",
+ "type": "update",
+ "title": "The FLAME paper link in the Avatar Engines Atlas opens the paper again",
+ "summary": "FLAME is the parametric head model underneath most of the photoreal-head engines in the atlas at /avatar-engines, so its Paper button is one a builder actually follows. It pointed at a Max Planck publication page that answers every visitor, browsers included, with a 403 Forbidden, so the button led to an error page instead of the paper. It now opens the paper PDF that the FLAME project site itself links to. All 68 outbound links on the page were re-checked afterwards and every one of them resolves.",
+ "link": "/avatar-engines",
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-08-16",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 87b179e73..897cbddc9 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -382,6 +382,14 @@
<category>fix</category>
<description>The gallery ranked creators and paged the feed over only the newest 120 creations, however many the feed actually held. A creator's older work was invisible in their profile count, the top-creator board scored people on a fraction of their output, and scrolling the gallery dead-ended early with items still left to show. It now reads the full feed depth it always meant to, and does it in two database round trips instead of two per item, so the deeper read loads faster than the shallow one did.</description>
</item>
+ <item>
+ <title>The FLAME paper link in the Avatar Engines Atlas opens the paper again</title>
+ <link>https://three.ws/avatar-engines</link>
+ <guid isPermaLink="false">2026-08-16:The FLAME paper link in the Avatar Engines Atlas opens the paper again</guid>
+ <pubDate>Sun, 16 Aug 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>FLAME is the parametric head model underneath most of the photoreal-head engines in the atlas at /avatar-engines, so its Paper button is one a builder actually follows. It pointed at a Max Planck publication page that answers every visitor, browsers included, with a 403 Forbidden, so the button led to an error page instead of the paper. It now opens the paper PDF that the FLAME project site itself links to. All 68 outbound links on the page were re-checked afterwards and every one of them resolves.</description>
+ </item>
<item>
<title>The Forge community board remembers what you liked</title>
<link>https://three.ws/forge</link>
diff --git a/public/features.json b/public/features.json
index abba6eb1e..c1cd1976c 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-16T19:48:54.395Z",
+ "generated_at": "2026-08-16T19:50:05.618Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/locales/en.json b/public/locales/en.json
index 5756a240e..c4ac57f38 100644
--- a/public/locales/en.json
+++ b/public/locales/en.json
@@ -1634,16 +1634,16 @@
"coins": "Coins",
"dashboard": "Dashboard",
"discover": "Discover",
- "meta_description": "Put your pump.fun coin on autopilot. Your agent runs buybacks and distributes creator fees to holders on rules you set — and narrates every on-chain move in real time.",
+ "meta_description": "A hands-off token cockpit. Set the rules (buyback floors, distribution floors, and guardrails), and your agent runs buybacks and pays creator fees out to holders on its own, narrating every on-chain move.",
"meta_og_description": "An autonomous coin agent that runs buybacks and distributes fees on your rules, narrated live by its avatar.",
- "meta_og_title": "Coin Autopilot — three.ws",
- "meta_title": "Coin Autopilot — three.ws",
- "meta_twitter_description": "A hands-off token cockpit: set the rules — buys, sells, and guardrails — and let your agent run the coin autonomously.",
+ "meta_og_title": "Coin Autopilot · three.ws",
+ "meta_title": "Coin Autopilot · three.ws",
+ "meta_twitter_description": "A hands-off token cockpit. Set the rules (buys, sells, and guardrails) and let your agent run the coin autonomously.",
"meta_twitter_title": "Coin Autopilot · three.ws",
"put_your_coin_on_autopilot": "Put your coin on autopilot.",
"three_ws": "<span class=\"brand-mark\"></span>three.ws",
"walk": "Walk",
- "your_agent_runs_the_whole_coin_lifecycle": "Your agent runs the whole coin lifecycle on its own: it buys back & burns from creator fees and distributes payments to holders — on the rules you set. Every on-chain move is narrated live by your agent's avatar."
+ "your_agent_runs_the_whole_coin_lifecycle": "Your agent runs the whole coin lifecycle on its own: it buys back & burns from creator fees and distributes payments to holders, on the rules you set. Every on-chain move is narrated live by your agent's avatar."
},
"autopilot_activity": {
"activity": "Activity",
diff --git a/src/ar-studio.js b/src/ar-studio.js
index 2cfdb51f2..67b24e34a 100644
--- a/src/ar-studio.js
+++ b/src/ar-studio.js
@@ -849,7 +849,10 @@ function openRoomModal() {
}
function closeRoomModal() {
- if (roomModal) roomModal.hidden = true;
+ if (!roomModal) return;
+ const hadFocus = roomModal.contains(document.activeElement);
+ roomModal.hidden = true;
+ if (hadFocus) restoreFocus(roomBtn);
}
// Unlock the arrival chime inside a real user gesture (the same tap that opens
@@ -1542,6 +1545,13 @@ forgeForm?.addEventListener('submit', (e) => {
let trayTab = 'recent';
const trayCache = new Map(); // tab → items
+// Closing a dialog must hand the keyboard back to whatever opened it; dropping
+// focus on <body> strands a keyboard user at the top of the document with the
+// scene they were just editing behind them.
+function restoreFocus(el) {
+ if (el && document.contains(el) && !el.hidden) el.focus?.();
+}
+
function openTray(tab = trayTab) {
if (!tray) return;
tray.hidden = false;
@@ -1552,8 +1562,17 @@ function openTray(tab = trayTab) {
function closeTray() {
if (!tray) return;
+ const wasOpen = !tray.hidden;
tray.hidden = true;
addBtn?.setAttribute('aria-expanded', 'false');
+ if (wasOpen && tray.contains(document.activeElement)) restoreFocus(addBtn);
+}
+
+function closeQrModal() {
+ if (!qrModal) return;
+ const hadFocus = qrModal.contains(document.activeElement);
+ qrModal.hidden = true;
+ if (hadFocus) restoreFocus(qrBtn);
}
addBtn?.addEventListener('click', () => (tray?.hidden ? openTray() : closeTray()));
@@ -1565,7 +1584,7 @@ document.addEventListener('keydown', (e) => {
if (e.key === 'Escape') {
if (tray && !tray.hidden) closeTray();
else if (roomModal && !roomModal.hidden) closeRoomModal();
- else if (qrModal && !qrModal.hidden) qrModal.hidden = true;
+ else if (qrModal && !qrModal.hidden) closeQrModal();
else select(null);
}
});
@@ -1626,16 +1645,56 @@ document.addEventListener('keydown', (e) => {
}
});
-tray?.querySelectorAll('[data-tab]').forEach((btn) => {
+const trayTabs = [...(tray?.querySelectorAll('[data-tab]') || [])];
+trayTabs.forEach((btn) => {
btn.addEventListener('click', () => setTrayTab(btn.dataset.tab));
});
+// A role="tablist" owes the keyboard the arrow-key contract: Left/Right (and
+// Home/End) move between tabs and select as they go, with a roving tabindex so
+// Tab enters the strip once and then leaves it for the panel.
+tray?.querySelector('.ars-tabs')?.addEventListener('keydown', (e) => {
+ const i = trayTabs.indexOf(document.activeElement);
+ if (i === -1) return;
+ const last = trayTabs.length - 1;
+ const next = e.key === 'ArrowRight' ? (i === last ? 0 : i + 1)
+ : e.key === 'ArrowLeft' ? (i === 0 ? last : i - 1)
+ : e.key === 'Home' ? 0
+ : e.key === 'End' ? last
+ : -1;
+ if (next === -1) return;
+ e.preventDefault();
+ setTrayTab(trayTabs[next].dataset.tab);
+ trayTabs[next].focus();
+});
+
+// Mark which way the tab strip can still scroll so the CSS edge fade points at
+// the hidden tabs instead of guessing (see .ars-tabs[data-scroll] in the page).
+const tabStrip = tray?.querySelector('.ars-tabs');
+function updateTabScrollHints() {
+ if (!tabStrip) return;
+ const slack = tabStrip.scrollWidth - tabStrip.clientWidth;
+ const hints = [];
+ if (slack > 2 && tabStrip.scrollLeft > 2) hints.push('start');
+ if (slack > 2 && tabStrip.scrollLeft < slack - 2) hints.push('end');
+ tabStrip.dataset.scroll = hints.join(' ');
+}
+tabStrip?.addEventListener('scroll', updateTabScrollHints, { passive: true });
+window.addEventListener('resize', updateTabScrollHints);
+
function setTrayTab(tab) {
trayTab = tab;
- tray?.querySelectorAll('[data-tab]').forEach((b) => {
- b.classList.toggle('is-active', b.dataset.tab === tab);
- b.setAttribute('aria-selected', String(b.dataset.tab === tab));
+ trayTabs.forEach((b) => {
+ const on = b.dataset.tab === tab;
+ b.classList.toggle('is-active', on);
+ b.setAttribute('aria-selected', String(on));
+ b.tabIndex = on ? 0 : -1;
+ if (on) {
+ trayBody?.setAttribute('aria-labelledby', b.id);
+ b.scrollIntoView?.({ block: 'nearest', inline: 'nearest' });
+ }
});
+ updateTabScrollHints();
renderTray();
}
@@ -1999,10 +2058,13 @@ qrBtn?.addEventListener('click', () => {
link.textContent = url.length > 64 ? `${url.slice(0, 61)}…` : url;
}
qrModal.hidden = false;
+ // aria-modal="true" is a promise that focus is inside the dialog; leaving it
+ // on the trigger reads the HUD behind instead of the QR code.
+ $('ars-qr-close')?.focus?.();
});
-$('ars-qr-close')?.addEventListener('click', () => { qrModal.hidden = true; });
+$('ars-qr-close')?.addEventListener('click', closeQrModal);
qrModal?.addEventListener('click', (e) => {
- if (e.target === qrModal) qrModal.hidden = true;
+ if (e.target === qrModal) closeQrModal();
});
// ── Render loop ───────────────────────────────────────────────────────────────
diff --git a/src/avatar-artifact.js b/src/avatar-artifact.js
index 63804b7df..24aa4d40d 100644
--- a/src/avatar-artifact.js
+++ b/src/avatar-artifact.js
@@ -19,6 +19,7 @@
* alongside the rest of the page.
*/
+import { log } from './shared/log.js';
import { resolveDevR2Url } from './shared/dev-r2-proxy.js';
import { getMeshoptDecoder } from './viewer/internal.js';
@@ -446,6 +447,7 @@ function buildArtifactStage(scene, camera, renderer, artifact) {
scene.add(pivot);
let mixer = null;
+ let anim = null;
let loaded = false;
let focusY = 1.0;
let baseDist = 3.2;
@@ -510,11 +512,18 @@ function buildArtifactStage(scene, camera, renderer, artifact) {
baseDist = Math.max(2.6, radius * 1.55);
if (gltf.animations?.length) {
+ // The artifact carries its own motion: the author's intent wins.
mixer = new THREE.AnimationMixer(root);
const clip =
gltf.animations.find((c) => /idle|breath|stand/i.test(c.name || '')) ||
gltf.animations[0];
mixer.clipAction(clip).play();
+ } else {
+ // It does not, which is the normal case for a three.ws avatar: the
+ // clips live in the shared library and are retargeted onto whatever
+ // skeleton this rig uses. Without it every avatar would greet a
+ // visitor in its bind-pose T-pose.
+ breatheLife(root);
}
loaded = true;
},
@@ -533,12 +542,45 @@ function buildArtifactStage(scene, camera, renderer, artifact) {
},
);
+ /**
+ * Drive a clip-less rig from the shared retargeted library (idle). Any
+ * humanoid skeleton the canonicalizer recognises plays it; a static prop or
+ * a non-humanoid rig reports unsupported and simply stands still, which is
+ * the honest result for a chair. The library is imported here rather than at
+ * the top of the module so the house portrait never downloads a retargeter.
+ */
+ async function breatheLife(root) {
+ try {
+ const { AnimationManager } = await import('./animation-manager.js');
+ const manager = new AnimationManager();
+ manager.attach(root, { avatarUrl: artifact.url });
+ if (!manager.supportsCanonicalClips()) return;
+ const res = await fetch('/animations/manifest.json', { cache: 'force-cache' });
+ if (!res.ok) throw new Error(`HTTP ${res.status} loading the animation manifest`);
+ const defs = (await res.json()).filter((d) => d.name === 'idle');
+ if (!defs.length) return;
+ manager.setAnimationDefs(defs);
+ await manager.loadAll();
+ // A rig whose upper arms could not be name-mapped keeps the clip's
+ // torso and legs but frozen bind-pose arms; this swings them down.
+ manager.relaxUndrivenArms();
+ manager.play('idle');
+ anim = manager;
+ } catch (err) {
+ // A missing clip library is a downgrade, never a failure: the model
+ // is on screen and inspectable either way.
+ log.warn('[avatar-artifact] idle clip unavailable:', err?.message);
+ }
+ }
+
const clock = new THREE.Clock();
return {
ready: () => loaded,
update(t, mouse, zoom, reduceMotion) {
- if (mixer) mixer.update(clock.getDelta());
+ const delta = clock.getDelta();
+ if (mixer) mixer.update(delta);
+ if (anim) anim.update(delta);
// Turntable: the shared look-target orbits the camera instead of
// turning a head, because an arbitrary GLB has no head to turn.
diff --git a/src/categories.css b/src/categories.css
index a46c4c141..9cb3e097a 100644
--- a/src/categories.css
+++ b/src/categories.css
@@ -26,6 +26,15 @@
gap: 0.625rem;
}
+/* Coin names are short, so the shared cell caps them at 140px. Category names
+ are sentences ("World Liberty Financial Portfolio"), which that cap ellipsised
+ even on a 1440px screen with half the row empty. Give them the room the layout
+ already has, and keep truncating only where the viewport genuinely runs out. */
+.cv-table .name-cell .nm {
+ max-width: min(28rem, 42vw);
+ white-space: nowrap;
+}
+
/* Search box and the live "showing N of M" readout share one row on desktop and
stack on narrow screens, where the search field takes the full width. */
.cat-filters {
diff --git a/src/categories.js b/src/categories.js
index cd94f7ca4..faeb86b43 100644
--- a/src/categories.js
+++ b/src/categories.js
@@ -212,7 +212,7 @@ function renderTable() {
<td class="rank hide-sm cv-mono">${c.rank ?? '—'}</td>
<td class="left name-cell"><a href="${esc(href)}"><span class="inner">
${avatarStack(c.top_3_coins)}
- <span class="nm">${esc(c.name)}</span>
+ <span class="nm" title="${esc(c.name)}">${esc(c.name)}</span>
</span></a></td>
<td class="dim">${esc(formatUsd(c.market_cap))}</td>
${pctCell(c.market_cap_change_24h)}
diff --git a/src/scene-capture.js b/src/scene-capture.js
index af7d77163..763107511 100644
--- a/src/scene-capture.js
+++ b/src/scene-capture.js
@@ -38,7 +38,16 @@ function refreshStats() {
// idles by design, so a static reading would misrepresent performance.
if (s.autoRotate && s.fps) bits.push(`${s.fps} fps`);
if (s.colorMode && s.colorMode !== 'rgb') bits.push(COLOR_LABELS[s.colorMode]);
- $('#pc-hud-label').textContent = bits.join(' · ');
+ setHudLabel(bits.join(' · '));
+}
+
+// The HUD label ellipsises on a narrow stage, so mirror it into title/aria-label:
+// a truncation notice that only fits on a desktop is not a notice.
+function setHudLabel(text) {
+ const el = $('#pc-hud-label');
+ el.textContent = text;
+ el.title = text;
+ el.setAttribute('aria-label', text);
}
// ── overlay states ────────────────────────────────────────────────────────────
@@ -69,7 +78,7 @@ function setError(title, sub) {
}
function setLive(label) {
baseLabel = label;
- $('#pc-hud-label').textContent = label;
+ setHudLabel(label);
$('#pc-hud').hidden = false;
for (const k of ['pc-idle', 'pc-loading', 'pc-error']) $(`#${k}`).hidden = true;
for (const id of ['pc-size', 'pc-color', 'pc-rotate', 'pc-shot', 'pc-recenter']) {