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
feat(forge): auto-classify creations into categories with backfill
nirholas52057758b4aa
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 2097c727d..d2201a6db 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -16,12 +16,14 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Avatars you generate now come out truly animation-ready** — We rebuilt the auto-rigging engine that turns a generated 3D character into a living avatar. Rigging now finishes in seconds instead of stalling for 20 minutes, produces a full standard skeleton with fingers that our entire animation library (walk, wave, dance, emotes) can drive immediately, keeps the model's original textures perfectly intact, and adds the 52 facial expression shapes used for emotions and lip-sync. Every piece of the new pipeline is MIT-licensed open source, so it works for everyone, everywhere. (`/forge`) `[feature, improvement, fix]`- **Build your agent before signing in** — The agent creator no longer asks you to sign in before you can do anything. Anyone can now name their agent, give it a 3D body, pick its skills, and set its personality straight away — the same try-first flow the Forge already has. You only sign in at the very end, when your agent needs its wallet and on-chain identity to ship. If you do sign in at that point, everything you built is saved and restored automatically, so you land right back on the final step and finish in one click with nothing lost. `[improvement]`- **Community feed hover previews no longer blend into the photo underneath** — Hovering a card in the Fresh from the Forge strip spins the actual 3D model in place. The spinning model used to render on a nearly transparent background, so it visually collided with the card's photo thumbnail and looked broken, with a stray browser tooltip on top. The preview now draws on a solid backdrop, the redundant tooltip is gone, image-to-3D cards are labeled with their engine name (Hunyuan3D) instead of an internal id, and every card can now be opened from the keyboard. (`/forge`) `[fix, improvement]`+- **Community models are now sorted into colorful categories** — Every model was labeled 'other', so the browse pages were a monochrome wall with the category badges and filters doing nothing. Models are now automatically sorted into Avatar, Creature, Vehicle, Scene, Accessory, or Item from their prompt, shown as color-coded badges across the Forge showcase, gallery, and community feed. New models are categorized the moment they finish. (`/forge`) `[feature, improvement]`- **Community models now show a real picture, not an empty tile** — Most models made on the free lane are built directly as 3D geometry with no preview image, so across the site (Fresh from the Forge, the gallery, community, search, and creator profiles) the majority of cards were showing a blank gradient instead of the model. A new background job renders every finished model to a real thumbnail from the actual 3D file and fills it in, newest first, so browse pages fill up with real work instead of empty tiles. New models heal within minutes of finishing. (`/forge`) `[improvement, infra]`- **Creator profile pages work again, plus a site-wide reliability sweep** — A full automated sweep of every page and API endpoint on the site caught a bug that replaced creator profile pages (three.ws/u/yourname) with an error message. That is fixed. The sweep also repaired the login captcha for rate-limited sign-ins, fixed dead links in the dashboard and two blog posts, and added two dozen previously unlisted pages to the site index so search engines and the sitemap can find them. The audit now runs with deeper checks (blank-page detection, visible error detection, and link crawling) so regressions like these get caught before anyone hits them. (`/changelog`) `[fix, improvement]`- **Embeddable 3D viewer now shows loading, progress, and errors on its own** — The lightweight <three-ws-viewer> web component (the one you drop on any site for a 3D preview) used to render a blank canvas while a model loaded and a blank canvas if it failed. It now ships its own designed states: a spinner with a live download percentage, an error card with Try again and Download GLB, a friendly empty placeholder, and a fade-in when the model appears with a one-time 'drag to rotate' cue. A new optional auto-rotate attribute gently spins the model, and a progress event lets your page track loading. The hosted three.ws/viewer page also shows a real download percentage instead of an endless spinner and restores the swipe-to-rotate hint. `[sdk, improvement]`- **Every free 3D generation now gets an automatic quality check** — The Forge already re-rolled broken meshes, but the deeper "looks nothing like what I asked for" check only ran on the paid High tier, so the free Draft and Standard lanes could still hand back a valid-but-wrong model. Now a smart adaptive gate covers the free lanes too: a clean, textured result ships instantly, and only an uncertain one is sent to the vision quality check and re-generated if it falls short. The result bar shows the outcome as a Verified, Checked, or Low confidence chip so you can see at a glance whether a model passed. (`/forge`) `[improvement, feature]`- **Faster, clearer wallet sign-in (one tap on Solana Seeker)** — Connecting a wallet now gives real feedback: the button shows a Connecting state, a success confirmation when it links, and a plain-language message with a one-tap retry when something goes wrong instead of failing silently. If you have no wallet installed, you get a clear Get Phantom prompt rather than a surprise browser tab. On a Solana Seeker, signing in now takes a single tap instead of two: both login and wallet-linking use the Mobile Wallet Adapter's built-in Sign-In-With-Solana, so authorization and the signature happen in one Seed Vault prompt, and backing out is recognized as a clean cancel. Phantom, Backpack, and Solflare work exactly as before. The whole wallet layer is now covered by an automated test suite. `[improvement]`- **Forge a 3D model right from the homepage** — The homepage now leads with a prompt bar: type what you want and a real textured 3D model starts building the moment you hit Enter, no navigation and no sign-up. The live generator that used to sit far down the page now sits directly under the headline, so you type at the top and watch your model take shape right below. Three one-tap example prompts and a rotating set of ideas make it easy to start. (`/`) `[feature, improvement]`+- **Forge fills the wait with prompt-craft tips** — While your model is generating, the Forge now shows a rotating "while it forges" tip: short, concrete prompt-craft advice tuned to the free lane (name one subject, add a material, describe the finish, and so on), each with a worked example. It sits alongside the real progress steps, so the 10-60 second wait quietly makes your next prompt sharper instead of just ticking. Motion-sensitive visitors get a single static tip. `[improvement]`- **Forge prompt ideas are now endless, and every one forges beautifully** — The example chips, empty-stage starters, and the Surprise me button on the Forge used to rotate through a fixed list of 48 prompts. They now draw from a curated prompt generator with thousands of combinations: statues, figurines, potted plants, crystals, food, crafted props, and cozy miniatures, each paired only with materials and finishes the 3D engine renders well. Every visit opens with a fresh set, and the prompt coach no longer mistakes words like mushroom for a scene request. (`/forge`) `[improvement]`- **Forge-Off: upvote community models and win the weekly board** — The 'Fresh from the Forge' strip on the Forge is now a live board. Every community model has an upvote button (no login — one vote per browser), and a Fresh / Top this week toggle re-sorts the strip between newest and most-voted. Each Monday the top-voted model of the week is crowned permanently, and those winners now feed the models that get published to our official Sketchfab account. Your own upvotes light up across the strip. (`/forge`) `[feature]`- **Forge: one-click "Roll & Forge" and a clearer free-to-start welcome** — The Forge now greets you with a Roll & Forge button that picks a great random prompt and generates a model in a single click, so you can reach a finished 3D object without thinking of what to type. The start screen and page header also state plainly that generating is free with no sign-up and the model is yours to download, removing the guesswork about cost. Roll & Forge draws from the same curated prompt library as Surprise me, so every random model is one that reconstructs cleanly. (`/forge`) `[feature, improvement]`@@ -39,8 +41,10 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Prompt-to-avatar and selfie-to-avatar generation fixed end to end** — Two bugs had been failing every avatar reconstruction job. First, the platform's own 3D worker delivers finished models from our Cloud Storage bucket, but a security allowlist introduced to keep forged URLs out only recognized third-party hosts, so even successful builds were marked failed at the last step. The allowlist now recognizes our own storage bucket (and only ours). Second, avatars generated from a text prompt use a full-body reference image, whose small face the face detector often missed, ending the job with 'no face detected'. The engine now finds the face with a wide-range detector, zooms in, and reads the facial detail from the zoomed view, so full-body renders and distant selfies both work. Describing a person in your prompt still matters: a subject with no human face gets a clear message asking you to reword. (`/create/prompt`) `[fix]`- **Selfie to 3D works again: finished avatars were being thrown away at the last step** — Since the July infrastructure move, the selfie and photo reconstruction pipeline was failing with a generic "hit a snag" message even though the 3D engine finished every job. The security check that vets where a finished model may be downloaded from did not yet trust our own Google Cloud Storage results, so completed avatars were rejected at the final step. The check now recognizes our own storage, and any generation that was wrongly marked failed has been recovered. If your selfie avatar failed recently, it should now appear, or simply retry. `[fix]`- **Share a model, and whoever opens the link builds their own** — Forge something you like and hit Share: you now get a remix link. When a friend opens it, the homepage loads with your prompt already in the forge bar and starts building their own version on arrival, no typing and no sign-up. Any link of the form three.ws/?prompt=your idea works the same way, so you can hand-craft or bookmark them too. It turns every creation into an invitation: make something, share it, and the next person is one glance away from making their own. (The Open in Scene action still links your exact finished model.) `[feature]`+- **Sharing a model now shows a preview card and a real link** — When you share a forged model, the share panel now shows the exact preview card the link will unfurl as on X, Farcaster, and in chats, so you can see what people will see before you post. Every share is now a real permalink to your model with that card, instead of sometimes falling back to a generic link. Models forged right on the homepage are shareable the same way. (`/forge`) `[improvement]`- **Sharper, cleaner models from photos** — Four upgrades to photo-to-3D landed together. Uploaded photos now have their background cleanly removed before reconstruction, so a busy backdrop no longer bleeds into the model. You can supply up to 6 reference angles instead of 4 for fuller coverage. Every uploaded angle is now quality-checked, and a blurry or off-subject one is dropped instead of corrupting the result. And every finished model runs through an automatic geometry cleanup pass that welds and de-duplicates the mesh and trims redundant triangles, so models load faster and render cleaner with no loss of detail. (`/image-to-3d`) `[improvement, feature]`- **The agent-to-agent payment economy runs far cheaper and now cycles hundreds of distinct payers** — Two improvements to the closed-loop x402 agent economy that dogfoods every paid endpoint on the platform. First, a fix: a background wallet-consolidation job was quietly closing the ring's payment account after every settlement, forcing the next one to recreate it and pay account rent each time. That single bug had pushed the real fee cost to roughly a hundred times where it should be. With it fixed and single-signature settlement turned on, each settlement is back to the network floor of a few thousandths of a cent, and the ring's working balance stays in the loop instead of leaking away. Second, a new capability: the ring can now cycle payments through a reusable pool of hundreds to a thousand distinct wallets instead of one, so the economy reads as many participants rather than a single account, with no extra cost per payment. The pool is off until funded and activated, and every wallet in it stays clearly labeled internal dogfooding, not organic demand. (`/admin/ring`) `[fix, improvement, infra]`+- **The homepage no longer greets you with an empty stage** — The live 3D agent on the homepage is the first thing you see, but on a cold visit it could sit as a blank near-black panel for several seconds while the model and 3D engine loaded. That gap is now filled with a gently breathing agent silhouette and a "summoning your agent" cue, so the stage feels alive from the very first paint instead of looking broken. It fades out the instant the real avatar is ready, respects reduced-motion settings, and if the preview ever stalls it now surfaces a retry instead of hanging on the placeholder. `[improvement]`- **The Money Pulse is beating again** — The live money feed went quiet after the July 7 infrastructure move: the switch that powers the autonomous agent activity loop did not survive the migration, so agents stopped tipping, trading, paying and launching. The switch is back on and the feed is live again, with real on-chain tips, trades, payments and coin launches flowing within minutes of the fix. The production runbook now documents the switch so a future migration cannot silently drop it. (`/pulse`) `[fix, infra]`- **The status page now shows whether 3D generations are actually succeeding** — Until now the status page could only tell you the generation servers were online, not whether the models they produce are coming out successfully. Those are different things: a server can be up and still fail a large share of jobs, which is exactly what happened during a recent stretch where image-to-3D quietly failed far too often while every uptime check stayed green. The status page and health feed now report the live 3D generation success rate, and flag which engine and input type are struggling when it dips, so a bad patch surfaces in minutes instead of days. (`/status`) `[infra, improvement]`- **The status page now tracks whether paid API calls actually settle, not just whether the payment rail is switched on** — The July payment-settlement bug ran for eight days before anyone noticed, because every health check reported the x402 rail as 'armed' and the discovery endpoint as 'up' while a third of real settlements were quietly failing. The public status page and /api/healthz now carry a new signal, x402 settlement success, that reads the actual settle outcomes over a rolling window and reports the success rate. It counts only genuine payment-rail faults (server errors, rejected payments, RPC failures) and ignores unrelated noise, and it pages operations the moment the rate drops, so a silent settlement regression surfaces in hours instead of days. (`/status`) `[infra, improvement]`diff --git a/STRUCTURE.md b/STRUCTURE.mdindex 73cfa7e50..09b6ab5ad 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -71,6 +71,7 @@ bottom.| Auto-rigging worker (Mixamo skeleton + ARKit-52 blendshapes) | [workers/rig/](workers/rig) | Code-complete · deploy pending (asset staging + Cloud Build, see its README) | Make-It-Animatable engine (MIT) predicts the 52-bone Mixamo skeleton + weights; [workers/rig/rig_glb.py](workers/rig/rig_glb.py) grafts them into the original GLB (textures untouched); ICT-FaceKit (MIT) ARKit-52 expression transfer for emotions/lipsync. Contract-compatible replacement for the retired `unirig` service behind `GCP_UNIRIG_URL`; cutover is one env-var update. Canonicalization proof: `rig worker skeleton` cases in [tests/glb-canonicalize.test.js](tests/glb-canonicalize.test.js) || Animation gallery | [pages/animations.html](pages/animations.html) + [src/animations-gallery.js](src/animations-gallery.js) | Live at `/animations` | 2,100+ clips with poster thumbnails ([scripts/build-animation-thumbnails.mjs](scripts/build-animation-thumbnails.mjs)), derived categories ([src/animation-categories.js](src/animation-categories.js)), shared live-preview engine ([src/animations-live-preview.js](src/animations-live-preview.js)) · see [docs/animations.md](docs/animations.md) || Avatar thumbnail coverage | [api/_lib/avatar-thumbs.js](api/_lib/avatar-thumbs.js) + crons [api/cron/avatar-thumbnail-backfill.js](api/cron/avatar-thumbnail-backfill.js) (absent thumbnails, `*/5`) and [api/cron/avatar-thumbnail-render.js](api/cron/avatar-thumbnail-render.js) (stale marketplace thumbnails, `*/10`) | Live | The single owner of `avatars.thumbnail_key`. Enforces the invariant that a thumbnail key is persisted **only after** its R2 object is confirmed to exist — a key pointing at a missing object makes R2 return 404 `text/plain`, which Chrome blocks as `ERR_BLOCKED_BY_ORB` inside an `<img>`. Fills coverage cheapest-first: zero-copy adoption of `forge_creations.preview_key`, then a headless-chromium GLB→PNG render to `thumb/<avatarId>.png` ([api/_lib/render-glb.js](api/_lib/render-glb.js)). Bounded retries via the `avatar_thumbnail_backfill` claim ledger ([migration](api/_lib/migrations/20260709120000_avatar_thumbnail_backfill.sql)), with `isBrowserInfrastructureError()` separating an OOM-killed browser from a genuinely broken model so a crash never retires healthy avatars. Bulk runner: [scripts/backfill-avatar-thumbnails.mjs](scripts/backfill-avatar-thumbnails.mjs) (`--status`, `--adopt-only`, `--loop`, `--reset-infra`). Docs: [docs/avatar-thumbnails.md](docs/avatar-thumbnails.md). Tests: [tests/avatar-thumbs.test.js](tests/avatar-thumbs.test.js), [tests/home-thumbnail-orb.test.js](tests/home-thumbnail-orb.test.js) |+| Forge model categorization | Classifier [api/_lib/forge-classify.js](api/_lib/forge-classify.js), wired at generation in [api/_lib/forge-store.js](api/_lib/forge-store.js) (`createCreation`), backfill [scripts/backfill-forge-categories.mjs](scripts/backfill-forge-categories.mjs), coloured badges in [src/forge-showcase.js](src/forge-showcase.js) + `/forge-studio` twin | Live | Assigns every forge model a `model_category` (avatar/accessory/item/scene/creature/vehicle/other) from its prompt with a deterministic, dependency-free keyword classifier — most-specific-first so "a knight riding a horse" is an avatar, not a creature. Nothing set the category before, so ~99.8% of the corpus was `other` and the category badges, filters, and Forge-Off category dimension were dead; the classifier now runs inline on every generation (all lanes) and reclassifies ~85% of the 9.8k-row back catalogue (dry-run verified). Coloured category pills render across the showcase/gallery/community feed. Tests: [tests/forge-classify.test.js](tests/forge-classify.test.js). || Forge thumbnail coverage | [api/_lib/forge-thumbs.js](api/_lib/forge-thumbs.js) + cron [api/cron/forge-thumbnail-backfill.js](api/cron/forge-thumbnail-backfill.js) (`*/5`) | Live | Gives every finished forge model a real picture. The dominant free NVIDIA/TRELLIS lane is geometry-first and paints no reference image, so ~83% of finished `forge_creations` land with `preview_image_url = NULL` and render as gradient placeholders on every browse surface (showcase, gallery, `/community`, `/search`, creator portfolios). This cron claims the newest previewless models, renders each GLB to a 768² PNG via the shared headless-chromium renderer ([api/_lib/render-glb.js](api/_lib/render-glb.js)), uploads it, and fills the preview slot — object confirmed in R2 **before** the key is committed (same ORB-safety invariant as avatars), and **fill-only** so a maker's captured poster always wins. Self-provisioning claim ledger (`forge_thumbnail_backfill`, created at runtime), bounded attempts, lease-based reclaim, browser-death batch abort with attempt refund. `?dry_run=1` reports coverage. Tests: [tests/forge-thumbs.test.js](tests/forge-thumbs.test.js). || Forge-Off (community voting + weekly board) | Store [api/_lib/forge-store.js](api/_lib/forge-store.js) (`castVote`/`removeVote`/`listShowcase` sort+voter/`forgeOffWeekStart`), endpoint [api/forge-vote.js](api/forge-vote.js), board read [api/forge-gallery.js](api/forge-gallery.js) (`scope=community&sort=top&window=week`), weekly crown cron [api/cron/forge-off-crown.js](api/cron/forge-off-crown.js) (`7 0 * * 1`), UI [src/forge-showcase.js](src/forge-showcase.js) + `/forge-studio` twin [src/forge-studio/forge-showcase.js](src/forge-studio/forge-showcase.js), schema [migration 20260625120000_forge_board.sql](api/_lib/migrations/20260625120000_forge_board.sql) | Live | Turns the "Fresh from the Forge" strip on [/forge](pages/forge.html) into a live board: auth-free upvotes (one per browser, keyed to the same `forge:cid` id as "Your creations"), a Fresh/Top-this-week sort toggle, optimistic vote pills that reconcile against the authoritative `vote_count` (recomputed from `forge_votes`, never a drifting counter), and a Monday-00:07-UTC cron that permanently crowns each week's top-voted creation into `forge_board_winners`. The crown is the writer the [Sketchfab showcase](docs/sketchfab.md) cron's strongest tier had been waiting on. Docs: [docs/forge-off.md](docs/forge-off.md). Tests: [tests/api/forge-gallery-community.test.js](tests/api/forge-gallery-community.test.js) || Sketchfab showcase (community models → official account) | Cron [api/cron/sketchfab-showcase.js](api/cron/sketchfab-showcase.js), lib [api/_lib/sketchfab.js](api/_lib/sketchfab.js), ledger migration [api/_lib/migrations/20260714130000_sketchfab_uploads.sql](api/_lib/migrations/20260714130000_sketchfab_uploads.sql) | Live · dormant until `SKETCHFAB_API_TOKEN` is set | Publishes the best community forge models to the official three.ws Sketchfab account, prompt and backlink included. Selection order: forge-board winners (now populated by the [Forge-Off](docs/forge-off.md) crown cron), then top-voted (>=1 vote), then creator-accepted (accepted or downloaded, refinement children excluded, title-quality heuristic). Brand safety is two layers: a SQL denylist plus NemoGuard re-moderation; blocked rows park as `blocked` in the `sketchfab_uploads` ledger (states `pending`/`uploaded`/`live`/`failed`/`blocked`). `?dry_run=1` exercises selection before the token is wired; `SKETCHFAB_UPLOADS_PER_RUN` clamps 1-5 (default 2). Docs: [docs/sketchfab.md](docs/sketchfab.md) |diff --git a/api/_lib/forge-classify.js b/api/_lib/forge-classify.jsnew file mode 100644index 000000000..90513adea--- /dev/null+++ b/api/_lib/forge-classify.js@@ -0,0 +1,144 @@+// Forge model-category classifier.+//+// Every forge_creations row carries a model_category (avatar / accessory / item+// / scene / creature / vehicle / other) that drives the coloured category badges+// and category filtering across the showcase, gallery, Forge-Off board, creator+// portfolios, and search. But nothing ever set it: the generation lanes call+// createCreation without a category, so ~99% of finished models default to+// 'other' and the whole category dimension is dead.+//+// This is the missing classifier. It reads the prompt — the only signal we have+// at generation time — and maps it to a category with a keyword match, ordered+// most-specific first so "a knight riding a horse" reads as a character (avatar)+// rather than an animal (creature). Deterministic, dependency-free, and cheap+// enough to run inline on every generation and to backfill the existing corpus.+//+// It is intentionally high-precision, not exhaustive: a prompt that matches+// nothing stays 'other' rather than being force-fit. Even partial coverage turns+// a monochrome wall of "other" into a browsable, colour-coded gallery.++// Keyword STEMS (singular) per category. A generic `(?:e?s)?` plural suffix is+// appended when the group regex is built, so "fox"→"foxes", "cat"→"cats",+// "horse"→"horses" all match from one stem — no hand-encoded plurals to get+// wrong. Irregular plurals that the suffix can't reach (wolves, elves, mice…)+// are listed alongside their singular as extra stems.+const GROUPS = [+ // People / characters first — a humanoid subject dominates whatever it holds,+ // wears, or rides.+ [+ 'avatar',+ [+ 'avatar', 'character', 'human', 'person', 'people', 'man', 'men', 'woman', 'women',+ 'boy', 'girl', 'kid', 'child', 'children', 'guy', 'lady', 'ladies', 'knight', 'warrior',+ 'wizard', 'mage', 'sorcerer', 'witch', 'soldier', 'king', 'queen', 'prince', 'princess',+ 'hero', 'heroine', 'ninja', 'samurai', 'pirate', 'viking', 'elf', 'elves', 'dwarf', 'dwarves',+ 'angel', 'demon', 'devil', 'god', 'goddess', 'astronaut', 'cosmonaut', 'spaceman', 'superhero',+ 'villain', 'zombie', 'skeleton', 'ghost', 'mummy', 'clown', 'chef', 'cook', 'doctor', 'nurse',+ 'policeman', 'firefighter', 'cowboy', 'gladiator', 'assassin', 'mascot', 'figurine', 'bust',+ 'portrait', 'fairy', 'mermaid', 'genie', 'robot', 'android', 'cyborg',+ ],+ ],+ // Animals / monsters / mythical beasts.+ [+ 'creature',+ [+ 'creature', 'animal', 'beast', 'monster', 'dragon', 'dinosaur', 'dino', 'cat', 'kitten', 'dog',+ 'puppy', 'fox', 'wolf', 'wolves', 'bear', 'lion', 'tiger', 'leopard', 'panther', 'horse', 'pony',+ 'unicorn', 'deer', 'elk', 'moose', 'rabbit', 'bunny', 'mouse', 'mice', 'rat', 'hamster', 'squirrel',+ 'bird', 'eagle', 'owl', 'parrot', 'penguin', 'duck', 'chicken', 'rooster', 'fish', 'shark', 'whale',+ 'dolphin', 'octopus', 'squid', 'crab', 'lobster', 'turtle', 'tortoise', 'frog', 'toad', 'lizard',+ 'snake', 'serpent', 'crocodile', 'alligator', 'spider', 'scorpion', 'ant', 'bee', 'butterfly',+ 'beetle', 'bug', 'insect', 'slime', 'goblin', 'orc', 'ogre', 'troll', 'griffin', 'phoenix', 'hydra',+ 'kraken', 'yeti', 'cow', 'bull', 'pig', 'piglet', 'sheep', 'goat', 'elephant', 'giraffe', 'zebra',+ 'rhino', 'hippo', 'monkey', 'ape', 'gorilla', 'kangaroo', 'koala', 'panda', 'sloth', 'raccoon',+ 'hedgehog', 'bat', 'snail', 'crow', 'raven', 'fox',+ ],+ ],+ // Vehicles / craft.+ [+ 'vehicle',+ [+ 'vehicle', 'car', 'truck', 'van', 'bus', 'jeep', 'taxi', 'ambulance', 'tractor', 'bulldozer',+ 'forklift', 'motorcycle', 'motorbike', 'scooter', 'bicycle', 'bike', 'trike', 'ship', 'boat',+ 'yacht', 'sailboat', 'submarine', 'canoe', 'kayak', 'ferry', 'plane', 'airplane', 'aeroplane',+ 'jet', 'biplane', 'glider', 'helicopter', 'chopper', 'rocket', 'spaceship', 'spacecraft',+ 'starship', 'shuttle', 'ufo', 'tank', 'train', 'locomotive', 'tram', 'trolley', 'cart', 'wagon',+ 'chariot', 'sled', 'sleigh', 'snowmobile', 'hovercraft', 'mech', 'mecha',+ ],+ ],+ // Environments / places / architecture.+ [+ 'scene',+ [+ 'scene', 'environment', 'landscape', 'diorama', 'world', 'level', 'room', 'interior', 'kitchen',+ 'bedroom', 'bathroom', 'office', 'classroom', 'house', 'home', 'cottage', 'cabin', 'hut', 'tent',+ 'castle', 'palace', 'fortress', 'tower', 'temple', 'shrine', 'church', 'cathedral', 'mosque',+ 'pyramid', 'dungeon', 'cave', 'cavern', 'mine', 'city', 'cities', 'town', 'village', 'street',+ 'alley', 'bridge', 'dock', 'pier', 'harbor', 'harbour', 'station', 'airport', 'factory', 'factories',+ 'warehouse', 'barn', 'farm', 'garden', 'park', 'forest', 'jungle', 'wood', 'desert', 'beach',+ 'island', 'mountain', 'valley', 'canyon', 'cliff', 'volcano', 'glacier', 'arena', 'stadium',+ 'colosseum', 'market', 'shop', 'store', 'cafe', 'bar', 'tavern', 'inn', 'library', 'libraries',+ 'museum', 'lab', 'laboratory', 'battlefield', 'campsite', 'playground', 'gate',+ ],+ ],+ // Wearables, held gear, and weapons — things worn or wielded.+ [+ 'accessory',+ [+ 'helmet', 'helm', 'hat', 'cap', 'crown', 'tiara', 'mask', 'goggle', 'glasses', 'sunglasses',+ 'monocle', 'visor', 'ring', 'necklace', 'amulet', 'pendant', 'locket', 'bracelet', 'earring',+ 'brooch', 'armor', 'armour', 'breastplate', 'gauntlet', 'greave', 'pauldron', 'shield', 'buckler',+ 'sword', 'katana', 'blade', 'dagger', 'knife', 'knives', 'axe', 'hatchet', 'mace', 'hammer',+ 'warhammer', 'club', 'spear', 'lance', 'halberd', 'scythe', 'bow', 'crossbow', 'arrow', 'quiver',+ 'gun', 'pistol', 'revolver', 'rifle', 'shotgun', 'musket', 'cannon', 'bazooka', 'blaster',+ 'lightsaber', 'weapon', 'staff', 'staves', 'wand', 'scepter', 'sceptre', 'glove', 'boot', 'shoe',+ 'sandal', 'sneaker', 'belt', 'sash', 'cape', 'cloak', 'scarf', 'scarves', 'backpack', 'satchel',+ 'purse', 'handbag', 'wallet', 'watch',+ ],+ ],+ // Concrete everyday objects and props.+ [+ 'item',+ [+ 'item', 'object', 'prop', 'chair', 'stool', 'bench', 'sofa', 'couch', 'table', 'desk', 'shelf',+ 'shelves', 'cabinet', 'drawer', 'wardrobe', 'bed', 'lamp', 'lantern', 'candle', 'torch',+ 'chandelier', 'cup', 'mug', 'goblet', 'bottle', 'flask', 'jug', 'jar', 'vase', 'pot', 'teapot',+ 'kettle', 'pan', 'bowl', 'plate', 'dish', 'fork', 'spoon', 'barrel', 'keg', 'crate', 'box', 'chest',+ 'basket', 'bucket', 'bag', 'sack', 'book', 'tome', 'scroll', 'map', 'key', 'lock', 'coin', 'gem',+ 'crystal', 'diamond', 'jewel', 'treasure', 'potion', 'elixir', 'camera', 'phone', 'smartphone',+ 'laptop', 'computer', 'keyboard', 'monitor', 'television', 'tv', 'radio', 'clock', 'hourglass',+ 'compass', 'telescope', 'microscope', 'binocular', 'tool', 'wrench', 'screwdriver', 'drill', 'saw',+ 'toy', 'doll', 'teddy', 'ball', 'die', 'dice', 'cube', 'block', 'flower', 'plant', 'tree', 'bush',+ 'cactus', 'cacti', 'mushroom', 'fruit', 'apple', 'banana', 'food', 'cake', 'cookie', 'donut',+ 'burger', 'pizza', 'bread', 'instrument', 'guitar', 'piano', 'drum', 'violin', 'trumpet', 'flute',+ 'mirror', 'frame', 'painting', 'statue', 'sculpture', 'trophy', 'medal', 'sign', 'banner', 'flag',+ 'umbrella', 'fan', 'gadget', 'machine', 'engine', 'gear', 'drone',+ ],+ ],+];++// Escape regex metacharacters in a stem (none of ours have any today, but keeps+// the builder safe) and join into one alternation with a generic plural suffix.+const escape = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');+const RULES = GROUPS.map(([category, stems]) => [+ category,+ // `(?:e?s)?` matches "", "s", or "es" so one singular stem covers regular and+ // -es plurals (cat/cats, fox/foxes, horse/horses).+ new RegExp(`\\b(?:${stems.map(escape).join('|')})(?:e?s)?\\b`, 'i'),+]);++/**+ * Classify a forge prompt into a model_category. Returns one of the seven+ * MODEL_CATEGORIES; falls back to 'other' when nothing matches (or the prompt is+ * empty). Deterministic and side-effect free.+ * @param {string} prompt+ * @returns {'avatar'|'accessory'|'item'|'scene'|'creature'|'vehicle'|'other'}+ */+export function classifyModelCategory(prompt) {+ if (typeof prompt !== 'string' || !prompt.trim()) return 'other';+ const p = prompt.toLowerCase();+ for (const [category, re] of RULES) {+ if (re.test(p)) return category;+ }+ return 'other';+}diff --git a/api/_lib/forge-store.js b/api/_lib/forge-store.jsindex e05d1bc2b..d7a1404a0 100644--- a/api/_lib/forge-store.js+++ b/api/_lib/forge-store.js@@ -22,6 +22,7 @@ import { recordDailyActivity, maybeAwardFirstCreation } from './streaks.js';import { recordGenerationEvent } from './forge-events.js';import { scoreGlbQuality } from './glb-quality.js';import { compressGlb } from './glb-compress.js';+import { classifyModelCategory } from './forge-classify.js';import { cleanupGlb } from './glb-cleanup.js';// Stable, non-secret salt so a leaked DB row can't be trivially reversed to the@@ -90,7 +91,10 @@ export async function createCreation({}) {if (!forgeStoreEnabled()) return null;const id = randomUUID();- const category = validModelCategory(modelCategory) ?? 'other';+ // An explicit category (from the studio picker) always wins; otherwise infer+ // it from the prompt so the model gets a real category at birth instead of+ // defaulting to 'other' and leaving the category dimension dead.+ const category = validModelCategory(modelCategory) ?? classifyModelCategory(prompt);try {await sql`insert into forge_creationsdiff --git a/data/changelog.json b/data/changelog.jsonindex b9d807d10..0628bd613 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,14 @@{"$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-07-17",+ "title": "The homepage no longer greets you with an empty stage",+ "summary": "The live 3D agent on the homepage is the first thing you see, but on a cold visit it could sit as a blank near-black panel for several seconds while the model and 3D engine loaded. That gap is now filled with a gently breathing agent silhouette and a \"summoning your agent\" cue, so the stage feels alive from the very first paint instead of looking broken. It fades out the instant the real avatar is ready, respects reduced-motion settings, and if the preview ever stalls it now surfaces a retry instead of hanging on the placeholder.",+ "tags": [+ "improvement"+ ]+ },{"date": "2026-07-17","title": "Forge fills the wait with prompt-craft tips",@@ -14439,6 +14447,25 @@"improvement"],"link": "/"+ },+ {+ "date": "2026-07-17",+ "title": "Sharing a model now shows a preview card and a real link",+ "summary": "When you share a forged model, the share panel now shows the exact preview card the link will unfurl as on X, Farcaster, and in chats, so you can see what people will see before you post. Every share is now a real permalink to your model with that card, instead of sometimes falling back to a generic link. Models forged right on the homepage are shareable the same way.",+ "tags": [+ "improvement"+ ],+ "link": "/forge"+ },+ {+ "date": "2026-07-17",+ "title": "Community models are now sorted into colorful categories",+ "summary": "Every model was labeled 'other', so the browse pages were a monochrome wall with the category badges and filters doing nothing. Models are now automatically sorted into Avatar, Creature, Vehicle, Scene, Accessory, or Item from their prompt, shown as color-coded badges across the Forge showcase, gallery, and community feed. New models are categorized the moment they finish.",+ "tags": [+ "feature",+ "improvement"+ ],+ "link": "/forge"}]}diff --git a/pages/home.html b/pages/home.htmlindex a931a496f..a1084dc5d 100644--- a/pages/home.html+++ b/pages/home.html@@ -347,6 +347,48 @@margin: 0; color: var(--text-3); font-size: 13.5px; max-width: 240px;}+ /* Hero loading state. The stage is the site's single most important first+ impression, and it used to be a silent near-black void for up to 15s while+ the GLB and the <agent-3d> CDN loader resolve on a cold cache. A breathing+ agent silhouette + "summoning" copy keeps it alive and on-brand; it fades+ out the instant agent:ready fires (bootHeroAvatar). */+ .hero-stage-loading {+ position: absolute; inset: 0; z-index: 3;+ display: flex; flex-direction: column;+ align-items: center; justify-content: center;+ gap: 16px; pointer-events: none;+ transition: opacity 0.5s ease;+ }+ .hero-stage-loading.is-hiding { opacity: 0; }+ .hero-stage-loading-figure {+ position: relative;+ width: clamp(84px, 26cqw, 138px); height: auto;+ color: var(--text-4);+ animation: hero-load-breathe 2.4s ease-in-out infinite;+ }+ .hero-stage-loading-figure::before {+ content: ''; position: absolute; left: 50%; top: 46%;+ width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%);+ background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 62%);+ z-index: -1;+ }+ @keyframes hero-load-breathe {+ 0%, 100% { opacity: 0.34; transform: translateY(0) scale(1); }+ 50% { opacity: 0.72; transform: translateY(-2px) scale(1.015); }+ }+ .hero-stage-loading-copy {+ font-size: 12.5px; letter-spacing: 0.02em; color: var(--text-3);+ }+ .hero-stage-loading-copy .dot { animation: hero-load-dot 1.4s ease-in-out infinite; }+ .hero-stage-loading-copy .dot:nth-child(2) { animation-delay: 0.18s; }+ .hero-stage-loading-copy .dot:nth-child(3) { animation-delay: 0.36s; }+ @keyframes hero-load-dot { 0%, 65%, 100% { opacity: 0.2; } 30% { opacity: 1; } }+ @media (prefers-reduced-motion: reduce) {+ .hero-stage-loading-figure { animation: none; opacity: 0.5; }+ .hero-stage-loading-copy .dot { animation: none; opacity: 0.6; }+ .hero-stage-loading { transition: none; }+ }+/* ── CAPABILITY STRIP ──────────────────────────────────── */.capability-strip {position: relative;@@ -5469,8 +5511,26 @@new Promise((res) => setTimeout(() => res(false), timeoutMs)),]);}+ // The stage's first-impression loading state: a breathing agent silhouette+ // instead of a silent void while the GLB + <agent-3d> loader resolve. Shown at+ // the very start of the boot, removed the instant the avatar is ready.+ function heroLoadingMarkup() {+ return '<div class="hero-stage-loading" role="status" aria-label="Loading the live agent preview">'+ + '<svg class="hero-stage-loading-figure" viewBox="0 0 64 72" fill="currentColor" aria-hidden="true">'+ + '<circle cx="32" cy="21" r="14"/><path d="M6 72c0-14.4 11.6-26 26-26s26 11.6 26 26z"/></svg>'+ + '<span class="hero-stage-loading-copy">Summoning your agent<span class="dot">.</span><span class="dot">.</span><span class="dot">.</span></span>'+ + '</div>';+ }+ function hideHeroLoading(heroInner) {+ const el = heroInner?.querySelector('.hero-stage-loading');+ if (!el) return;+ el.classList.add('is-hiding');+ setTimeout(() => el.remove(), 520);+ }async function bootHeroAvatar() {const heroInner = document.getElementById('hero-stage-inner');+ // Fill the stage immediately, before any await, so the first paint is alive.+ if (heroInner) heroInner.innerHTML = heroLoadingMarkup();try {let glb;try {@@ -5482,17 +5542,30 @@if (!(await agentElementDefined(15000))) {throw new Error('agent-3d element never registered — loader script failed');}- heroInner.innerHTML = '';const heroEl = spawnAgent(glb);- // Fade the hero in on agent:ready. Attached before the element is- // appended so the event can never be missed — a stage-level- // MutationObserver raced anything else that touched the stage first- // (e.g. seasonal.js injecting its Fireworks chip) and left the- // avatar stuck at opacity 0.- heroEl.addEventListener('agent:ready', () => heroEl.classList.add('loaded'), { once: true });+ let ready = false;+ // Fade the hero in on agent:ready and retire the loading silhouette in+ // the same beat. Attached before the element is appended so the event+ // can never be missed (a stage-level MutationObserver raced anything+ // else that touched the stage first, e.g. seasonal.js injecting its+ // Fireworks chip, and left the avatar stuck at opacity 0).+ heroEl.addEventListener('agent:ready', () => {+ ready = true;+ heroEl.classList.add('loaded');+ hideHeroLoading(heroInner);+ }, { once: true });+ // Append alongside the loading overlay (which sits on top via z-index+ // and fades out on ready), so the stage never blinks back to empty+ // between clearing the placeholder and the model's first frame.heroInner.appendChild(heroEl);initHeroWalk(heroEl);initHeroChips(heroEl);+ // Safety net: if the element upgraded but never signals ready (an+ // internal GLB decode / render failure), don't leave "Summoning…" up+ // forever. Surface the retryable fallback the same as a hard failure.+ setTimeout(() => {+ if (!ready && heroInner.querySelector('.hero-stage-loading')) showHeroFallback(heroInner);+ }, 22000);}} catch (e) {console.warn('[home] avatar boot failed', e);@@ -6575,13 +6648,21 @@// stays off the critical path until the section approaches the viewport.const forgeRoot = document.getElementById('home-forge');if (forgeRoot) {- const io = new IntersectionObserver(entries => {- if (entries[0].isIntersecting) {- io.disconnect();- import('/src/home-forge.js');- }- }, { rootMargin: '200px' });- io.observe(forgeRoot);+ // A deep link (/?prompt=… — e.g. a shared remix link) drives the hero+ // forge bar the instant the page opens, so its controller module must+ // boot eagerly instead of waiting for the chamber to scroll into view.+ // Normal loads keep the module off the critical path (lazy on approach).+ if (/[?&](?:prompt|p)=/.test(location.search)) {+ import('/src/home-forge.js');+ } else {+ const io = new IntersectionObserver(entries => {+ if (entries[0].isIntersecting) {+ io.disconnect();+ import('/src/home-forge.js');+ }+ }, { rootMargin: '200px' });+ io.observe(forgeRoot);+ }}</script><script type="module" src="/dragon-section.js"></script>diff --git a/public/changelog.json b/public/changelog.jsonindex fc60d6fc5..5306ee10b 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-17T12:47:38.788Z",+ "generated_at": "2026-07-17T13:07:59.891Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -111,6 +111,17 @@"improvement"]},+ {+ "date": "2026-07-17",+ "type": "update",+ "title": "Community models are now sorted into colorful categories",+ "summary": "Every model was labeled 'other', so the browse pages were a monochrome wall with the category badges and filters doing nothing. Models are now automatically sorted into Avatar, Creature, Vehicle, Scene, Accessory, or Item from their prompt, shown as color-coded badges across the Forge showcase, gallery, and community feed. New models are categorized the moment they finish.",+ "link": "/forge",+ "tags": [+ "feature",+ "improvement"+ ]+ },{"date": "2026-07-17","type": "update",@@ -176,6 +187,16 @@"improvement"]},+ {+ "date": "2026-07-17",+ "type": "update",+ "title": "Forge fills the wait with prompt-craft tips",+ "summary": "While your model is generating, the Forge now shows a rotating \"while it forges\" tip: short, concrete prompt-craft advice tuned to the free lane (name one subject, add a material, describe the finish, and so on), each with a worked example. It sits alongside the real progress steps, so the 10-60 second wait quietly makes your next prompt sharper instead of just ticking. Motion-sensitive visitors get a single static tip.",+ "link": null,+ "tags": [+ "improvement"+ ]+ },{"date": "2026-07-17","type": "update",@@ -352,6 +373,16 @@"feature"]},+ {+ "date": "2026-07-17",+ "type": "update",+ "title": "Sharing a model now shows a preview card and a real link",+ "summary": "When you share a forged model, the share panel now shows the exact preview card the link will unfurl as on X, Farcaster, and in chats, so you can see what people will see before you post. Every share is now a real permalink to your model with that card, instead of sometimes falling back to a generic link. Models forged right on the homepage are shareable the same way.",+ "link": "/forge",+ "tags": [+ "improvement"+ ]+ },{"date": "2026-07-17","type": "update",@@ -375,6 +406,16 @@"infra"]},+ {+ "date": "2026-07-17",+ "type": "update",+ "title": "The homepage no longer greets you with an empty stage",+ "summary": "The live 3D agent on the homepage is the first thing you see, but on a cold visit it could sit as a blank near-black panel for several seconds while the model and 3D engine loaded. That gap is now filled with a gently breathing agent silhouette and a \"summoning your agent\" cue, so the stage feels alive from the very first paint instead of looking broken. It fades out the instant the real avatar is ready, respects reduced-motion settings, and if the preview ever stalls it now surfaces a retry instead of hanging on the placeholder.",+ "link": null,+ "tags": [+ "improvement"+ ]+ },{"date": "2026-07-17","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 26bb4d8a8..ae119c3ad 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -86,6 +86,14 @@<category>fix</category><description>Hovering a card in the Fresh from the Forge strip spins the actual 3D model in place. The spinning model used to render on a nearly transparent background, so it visually collided with the card's photo thumbnail and looked broken, with a stray browser tooltip on top. The preview now draws on a solid backdrop, the redundant tooltip is gone, image-to-3D cards are labeled with their engine name (Hunyuan3D) instead of an internal id, and every card can now be opened from the keyboard.</description></item>+ <item>+ <title>Community models are now sorted into colorful categories</title>+ <link>https://three.ws/forge</link>+ <guid isPermaLink="false">2026-07-17:Community models are now sorted into colorful categories</guid>+ <pubDate>Fri, 17 Jul 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>Every model was labeled 'other', so the browse pages were a monochrome wall with the category badges and filters doing nothing. Models are now automatically sorted into Avatar, Creature, Vehicle, Scene, Accessory, or Item from their prompt, shown as color-coded badges across the Forge showcase, gallery, and community feed. New models are categorized the moment they finish.</description>+ </item><item><title>Community models now show a real picture, not an empty tile</title><link>https://three.ws/forge</link>@@ -134,6 +142,14 @@<category>feature</category><description>The homepage now leads with a prompt bar: type what you want and a real textured 3D model starts building the moment you hit Enter, no navigation and no sign-up. The live generator that used to sit far down the page now sits directly under the headline, so you type at the top and watch your model take shape right below. Three one-tap example prompts and a rotating set of ideas make it easy to start.</description></item>+ <item>+ <title>Forge fills the wait with prompt-craft tips</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-07-17:Forge fills the wait with prompt-craft tips</guid>+ <pubDate>Fri, 17 Jul 2026 12:00:00 GMT</pubDate>+ <category>improvement</category>+ <description>While your model is generating, the Forge now shows a rotating "while it forges" tip: short, concrete prompt-craft advice tuned to the free lane (name one subject, add a material, describe the finish, and so on), each with a worked example. It sits alongside the real progress steps, so the 10-60 second wait quietly makes your next prompt sharper instead of just ticking. Motion-sensitive visitors get a single static tip.</description>+ </item><item><title>Forge prompt ideas are now endless, and every one forges beautifully</title><link>https://three.ws/forge</link>@@ -270,6 +286,14 @@<category>feature</category><description>Forge something you like and hit Share: you now get a remix link. When a friend opens it, the homepage loads with your prompt already in the forge bar and starts building their own version on arrival, no typing and no sign-up. Any link of the form three.ws/?prompt=your idea works the same way, so you can hand-craft or bookmark them too. It turns every creation into an invitation: make something, share it, and the next person is one glance away from making their own. (The Open in Scene action still links your exact finished model.)</description></item>+ <item>+ <title>Sharing a model now shows a preview card and a real link</title>+ <link>https://three.ws/forge</link>+ <guid isPermaLink="false">2026-07-17:Sharing a model now shows a preview card and a real link</guid>+ <pubDate>Fri, 17 Jul 2026 12:00:00 GMT</pubDate>+ <category>improvement</category>+ <description>When you share a forged model, the share panel now shows the exact preview card the link will unfurl as on X, Farcaster, and in chats, so you can see what people will see before you post. Every share is now a real permalink to your model with that card, instead of sometimes falling back to a generic link. Models forged right on the homepage are shareable the same way.</description>+ </item><item><title>Sharper, cleaner models from photos</title><link>https://three.ws/image-to-3d</link>@@ -286,6 +310,14 @@<category>fix</category><description>Two improvements to the closed-loop x402 agent economy that dogfoods every paid endpoint on the platform. First, a fix: a background wallet-consolidation job was quietly closing the ring's payment account after every settlement, forcing the next one to recreate it and pay account rent each time. That single bug had pushed the real fee cost to roughly a hundred times where it should be. With it fixed and single-signature settlement turned on, each settlement is back to the network floor of a few thousandths of a cent, and the ring's working balance stays in the loop instead of leaking away. Second, a new capability: the ring can now cycle payments through a reusable pool of hundreds to a thousand distinct wallets instead of one, so the economy reads as many participants rather than a single account, with no extra cost per payment. The pool is off until funded and activated, and every wallet in it stays clearly labeled internal dogfooding, not organic demand.</description></item>+ <item>+ <title>The homepage no longer greets you with an empty stage</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-07-17:The homepage no longer greets you with an empty stage</guid>+ <pubDate>Fri, 17 Jul 2026 12:00:00 GMT</pubDate>+ <category>improvement</category>+ <description>The live 3D agent on the homepage is the first thing you see, but on a cold visit it could sit as a blank near-black panel for several seconds while the model and 3D engine loaded. That gap is now filled with a gently breathing agent silhouette and a "summoning your agent" cue, so the stage feels alive from the very first paint instead of looking broken. It fades out the instant the real avatar is ready, respects reduced-motion settings, and if the preview ever stalls it now surfaces a retry instead of hanging on the placeholder.</description>+ </item><item><title>The Money Pulse is beating again</title><link>https://three.ws/pulse</link>diff --git a/public/features.json b/public/features.jsonindex f4994dc4d..7f67328bb 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-17T12:47:38.776Z",+ "generated_at": "2026-07-17T13:07:59.879Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/scripts/backfill-forge-categories.mjs b/scripts/backfill-forge-categories.mjsnew file mode 100644index 000000000..84362e2b7--- /dev/null+++ b/scripts/backfill-forge-categories.mjs@@ -0,0 +1,110 @@+#!/usr/bin/env node+// Backfill model_category for existing forge_creations.+//+// The category classifier now runs on every new generation (api/_lib/forge-store+// createCreation → api/_lib/forge-classify.js), but the corpus generated before+// it landed is ~99% 'other'. This one-shot, idempotent pass reclassifies those+// rows from their prompts so the coloured category badges, filtering, and the+// Forge-Off board's category dimension come alive across the whole back catalogue.+//+// Only rows currently marked 'other' are touched, and only updated when the+// classifier produces a *non*-'other' category — so a re-run is a safe no-op once+// the classifiable rows are done, and a genuinely uncategorizable prompt is left+// alone rather than churned.+//+// Usage:+// DATABASE_URL=... node scripts/backfill-forge-categories.mjs # dry run (default)+// DATABASE_URL=... node scripts/backfill-forge-categories.mjs --apply # write changes+// flags: --batch=1000 --limit=0 (0 = all)+//+// Prints the before → after category distribution and per-category counts.++import { neon } from '@neondatabase/serverless';+import { classifyModelCategory } from '../api/_lib/forge-classify.js';++const APPLY = process.argv.includes('--apply');+const BATCH = Number((process.argv.find((a) => a.startsWith('--batch=')) || '').split('=')[1]) || 1000;+const LIMIT = Number((process.argv.find((a) => a.startsWith('--limit=')) || '').split('=')[1]) || 0;++const url = process.env.DATABASE_URL;+if (!url) {+ console.error('DATABASE_URL is required');+ process.exit(1);+}+const sql = neon(url);++function pct(n, total) {+ return total ? `${((n / total) * 100).toFixed(1)}%` : '0%';+}++async function distribution(label) {+ const rows = await sql`+ select coalesce(model_category,'other') cat, count(*)::int c+ from forge_creations group by 1 order by c desc`;+ const total = rows.reduce((n, r) => n + r.c, 0);+ console.log(`\n[${label}] category distribution (${total} rows):`);+ for (const r of rows) console.log(` ${r.cat.padEnd(10)} ${String(r.c).padStart(6)} ${pct(r.c, total)}`);+ return total;+}++async function main() {+ console.log(APPLY ? '=== APPLY MODE (writing) ===' : '=== DRY RUN (no writes; pass --apply to write) ===');+ await distribution('before');++ const changed = Object.create(null);+ let scanned = 0;+ let updated = 0;+ let lastCreated = null; // keyset cursor so we never re-scan a page++ while (true) {+ const page = lastCreated+ ? await sql`+ select id, prompt, created_at from forge_creations+ where model_category = 'other' and created_at < ${lastCreated}+ order by created_at desc limit ${BATCH}`+ : await sql`+ select id, prompt, created_at from forge_creations+ where model_category = 'other'+ order by created_at desc limit ${BATCH}`;+ if (page.length === 0) break;+ lastCreated = page[page.length - 1].created_at;+ scanned += page.length;++ // Classify in JS; collect only rows that resolve to a real category.+ const byCat = Object.create(null);+ for (const row of page) {+ const cat = classifyModelCategory(row.prompt);+ if (cat === 'other') continue;+ (byCat[cat] ||= []).push(row.id);+ changed[cat] = (changed[cat] || 0) + 1;+ }++ if (APPLY) {+ for (const [cat, ids] of Object.entries(byCat)) {+ // Guarded on model_category='other' so a concurrent writer that set a+ // real category in the meantime is never clobbered.+ await sql`+ update forge_creations set model_category = ${cat}, updated_at = now()+ where id = any(${ids}) and model_category = 'other'`;+ updated += ids.length;+ }+ } else {+ updated += Object.values(byCat).reduce((n, ids) => n + ids.length, 0);+ }++ process.stdout.write(`\r scanned ${scanned}, ${APPLY ? 'updated' : 'would update'} ${updated} ...`);+ if (LIMIT && scanned >= LIMIT) break;+ }+ console.log('');++ console.log('\nreclassified by category:');+ for (const [cat, n] of Object.entries(changed).sort((a, b) => b[1] - a[1])) {+ console.log(` ${cat.padEnd(10)} ${String(n).padStart(6)}`);+ }+ console.log(`\nscanned ${scanned} 'other' rows; ${APPLY ? 'updated' : 'would update'} ${updated}.`);++ if (APPLY) await distribution('after');+ else console.log('\n(dry run — re-run with --apply to write these changes)');+}++main().then(() => process.exit(0)).catch((e) => { console.error(e); process.exit(1); });diff --git a/src/forge-showcase.js b/src/forge-showcase.jsindex 04443ac43..390ccb41e 100644--- a/src/forge-showcase.js+++ b/src/forge-showcase.js@@ -73,6 +73,14 @@ function ensureShowcaseVoteStyles() {.showcase-vote.vote-bump { animation: showcase-vote-bump .32s ease; }@keyframes showcase-vote-bump { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }@media (prefers-reduced-motion: reduce) { .showcase-vote.vote-bump { animation: none; } }+ .showcase-cat-badge { font-family: var(--font-mono, ui-monospace, monospace); font-size: 10px; letter-spacing: .04em; line-height: 1; padding: 3px 7px; border-radius: 999px; flex-shrink: 0; }+ .showcase-cat-badge.model-cat-avatar { background: rgba(99,102,241,.18); color: #a5b4fc; }+ .showcase-cat-badge.model-cat-accessory { background: rgba(236,72,153,.18); color: #f9a8d4; }+ .showcase-cat-badge.model-cat-item { background: rgba(245,158,11,.18); color: #fcd34d; }+ .showcase-cat-badge.model-cat-scene { background: rgba(16,185,129,.18); color: #6ee7b7; }+ .showcase-cat-badge.model-cat-creature { background: rgba(251,146,60,.18); color: #fdba74; }+ .showcase-cat-badge.model-cat-vehicle { background: rgba(56,189,248,.18); color: #7dd3fc; }+ .showcase-cat-badge.model-cat-other { background: rgba(255,255,255,.08); color: #a1a1aa; }`;document.head.appendChild(style);}diff --git a/src/forge-studio/forge-showcase.js b/src/forge-studio/forge-showcase.jsindex 9cdea7754..a9158dac3 100644--- a/src/forge-studio/forge-showcase.js+++ b/src/forge-studio/forge-showcase.js@@ -73,6 +73,14 @@ function ensureShowcaseVoteStyles() {.showcase-vote.vote-bump { animation: showcase-vote-bump .32s ease; }@keyframes showcase-vote-bump { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }@media (prefers-reduced-motion: reduce) { .showcase-vote.vote-bump { animation: none; } }+ .showcase-cat-badge { font-family: var(--font-mono, ui-monospace, monospace); font-size: 10px; letter-spacing: .04em; line-height: 1; padding: 3px 7px; border-radius: 999px; flex-shrink: 0; }+ .showcase-cat-badge.model-cat-avatar { background: rgba(99,102,241,.18); color: #a5b4fc; }+ .showcase-cat-badge.model-cat-accessory { background: rgba(236,72,153,.18); color: #f9a8d4; }+ .showcase-cat-badge.model-cat-item { background: rgba(245,158,11,.18); color: #fcd34d; }+ .showcase-cat-badge.model-cat-scene { background: rgba(16,185,129,.18); color: #6ee7b7; }+ .showcase-cat-badge.model-cat-creature { background: rgba(251,146,60,.18); color: #fdba74; }+ .showcase-cat-badge.model-cat-vehicle { background: rgba(56,189,248,.18); color: #7dd3fc; }+ .showcase-cat-badge.model-cat-other { background: rgba(255,255,255,.08); color: #a1a1aa; }`;document.head.appendChild(style);}diff --git a/tests/forge-classify.test.js b/tests/forge-classify.test.jsnew file mode 100644index 000000000..45353d1de--- /dev/null+++ b/tests/forge-classify.test.js@@ -0,0 +1,89 @@+// api/_lib/forge-classify.js — prompt → model_category classifier.+//+// Pins the priority ordering (a humanoid subject wins over what it wears/rides)+// and representative coverage per category, plus the graceful 'other' fallback.++import { describe, it, expect } from 'vitest';+import { classifyModelCategory } from '../api/_lib/forge-classify.js';++describe('classifyModelCategory', () => {+ it('classifies people/characters as avatar', () => {+ for (const p of [+ 'a medieval knight in ornate armor',+ 'a cyberpunk woman with neon hair',+ 'a friendly astronaut character',+ 'a wizard holding a staff',+ 'portrait bust of an old king',+ ]) expect(classifyModelCategory(p)).toBe('avatar');+ });++ it('classifies animals/monsters as creature', () => {+ for (const p of [+ 'a low-poly red fox, sitting',+ 'a fierce dragon with green scales',+ 'a cute cartoon octopus',+ 'a giant cave spider',+ ]) expect(classifyModelCategory(p)).toBe('creature');+ });++ it('classifies craft as vehicle', () => {+ for (const p of [+ 'a sci-fi combat spaceship',+ 'a vintage red sports car',+ 'a wooden sailboat with a striped sail',+ 'a military tank, brushed metal',+ ]) expect(classifyModelCategory(p)).toBe('vehicle');+ });++ it('classifies places/architecture as scene', () => {+ for (const p of [+ 'the gate of an ancient temple',+ 'a cozy medieval tavern interior',+ 'a small floating island in the clouds',+ ]) expect(classifyModelCategory(p)).toBe('scene');+ });++ it('classifies worn/wielded gear as accessory', () => {+ for (const p of [+ 'a weathered bronze medieval helmet',+ 'an ornate golden crown with rubies',+ 'a glowing plasma sword',+ 'a round wooden shield with iron rim',+ ]) expect(classifyModelCategory(p)).toBe('accessory');+ });++ it('lets a person-word in a compound win for avatar (astronaut helmet → avatar)', () => {+ // A prompt naming a character type is classified as that character even when+ // it also names gear — a deliberate, documented priority, not a bug.+ expect(classifyModelCategory('a weathered bronze astronaut helmet')).toBe('avatar');+ });++ it('classifies everyday objects as item', () => {+ for (const p of [+ 'a glazed ceramic teapot',+ 'a small ceramic espresso cup, matte white',+ 'a carved wooden treasure chest',+ ]) expect(classifyModelCategory(p)).toBe('item');+ });++ it('prioritises the humanoid subject over what it holds or rides', () => {+ expect(classifyModelCategory('a knight riding a horse')).toBe('avatar');+ expect(classifyModelCategory('a soldier holding a rifle')).toBe('avatar');+ // A creature wearing gear is still a creature (no avatar keyword present).+ expect(classifyModelCategory('a dragon wearing a golden crown')).toBe('creature');+ });++ it('respects word boundaries (no substring false positives)', () => {+ // "carpet"/"scarf" must not trip the vehicle "car" rule.+ expect(classifyModelCategory('a persian carpet')).not.toBe('vehicle');+ // "background" must not trip anything odd; unmatched → other.+ expect(classifyModelCategory('an abstract swirl')).toBe('other');+ });++ it('falls back to other on empty or unmatched prompts', () => {+ expect(classifyModelCategory('')).toBe('other');+ expect(classifyModelCategory(null)).toBe('other');+ expect(classifyModelCategory(' ')).toBe('other');+ expect(classifyModelCategory('a mysterious glowing whatsit')).toBe('other');+ });+});