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(coincommunities): finish the stats panel and rebuild the changelog feeds

nirholas0907ba8ec23c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53b60749b..c42b1ea2c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Blockchain TVL by Chain is readable again, and its numbers can be copied**: The cross-chain leaderboard at /chains was audited end to end in a real browser: the live DeFiLlama board, the sortable columns, the row links out to each chain's page, and the loading, empty and error states, at phone, tablet and desktop widths. The page had briefly stopped working entirely. Its row-click helpers were declared twice in the same file, which is a syntax error, so the script never ran and the table sat on its grey loading bars forever. That is fixed and covered by a browser test so it cannot come back. Two real defects came out of the same pass. Every row navigated on any click, so dragging across a cell to copy a chain's TVL threw the selection away and opened that chain's page instead; a figure or a name can now be selected and copied, while a plain click still opens the chain. And the page wrapped the site navigation in a second page banner, leaving screen readers with two overlapping banner landmarks to pick between. The share bar beside each chain also stopped reading its percentage aloud a second time, since the dominance column right next to it already says it. (`/chains`) `[fix, improvement]`
- **Chat stops hiding two nav links, and says something useful when a reply fails**: The chat at /chat was audited end to end in a real browser: loading it cold, sending a message on the free built-in lane and getting a reply back, following every link in the header and footer, and the empty, loading, error and populated states at phone, tablet and desktop widths. The header was covering itself: the centred site links sat on top of the wallet controls, so Features and Docs were partly hidden and could not be clicked at any desktop width, and between tablet and laptop widths there was no way to reach those links at all. The links now sit in the row with everything else, and below the width where they fit they move into the menu. The footer had been shipping a mangled copyright line (a leftover encoding accident that printed stray characters where the copyright symbol belongs). When a reply could not be sent, the thread printed the browser's own words, Failed to fetch; it now says what happened, that nothing was sent, and how to retry, in a message styled as an error rather than as a quieter reply. A rate-limited reply used to say Try again in 79445s; it now says the wait in hours or minutes and, when the free daily allowance is the thing that ran out, points at adding your own provider key. Icon-only buttons across the header and each message (share, model settings, copy, edit, regenerate, delete) now carry names for screen readers, and the page title and description finally describe the page. (`/chat`) `[fix, improvement]`
- **Choreographer share links are readable again, and the studio fits a phone**: The gesture composer at /choreograph was audited end to end in a real browser: loading a starter routine, adding and reordering beats, retiming and repointing a step, previewing the whole performance on a live avatar, scrubbing the timeline, sharing a link, and saving to a real agent, at phone, tablet and desktop widths. Copy share link used to hand you a link with the routine name escaped twice, so a routine called The pitch travelled as The%2520pitch: it worked, but it looked broken, and it invited people to tidy it up and break it for real. Links now carry the routine as you can read it, and every link shared before today still opens. A routine whose name ended in the loop marker came back from a link under the wrong name and looping when it should not. On a 320 pixel phone, opening either of the two code panels pushed the whole page sideways; the code block now scrolls on its own instead. Pressing the transport a second time while the first play was still loading its clips said Pause but started a second load; it now stops the one in progress, and deleting the last beat mid-load can no longer bring an avatar back onto a stage the routine has left. Signed-out visitors also no longer see a failed request in the browser console on first paint. (`/choreograph`) `[fix, improvement]`
+- **Clip Director shows real traders again, and can no longer print a number the trade never made**: The Clip Director page told every visitor that no agent had ever closed a trade. Its trader picker asked the leaderboard for the highest-ranked agents and then kept only the ones with a closed round-trip, and because the ranking score has nothing to do with having closed trades, the nine agents that qualified all sat below the cut. The picker now asks the leaderboard for exactly what it needs, so those nine traders and their real closed positions are back on the page. The bigger repair is underneath: the card copy is written by a language model, and one of the providers answered a real +1.89x win with an invented loss on a different coin, complete with a celebrating avatar, next to the on-chain link proving otherwise. Every generated card is now checked against the trade it describes before it ships, so a ticker or a figure that is not in the round-trip gets the card thrown away and rewritten from the position itself, and a stop-out can never be celebrated. Also on the page: a shared /clip-director?agent_id= link now opens that trader even when they are outside the ranking, the Try again buttons retry the step that actually failed instead of doing nothing, each card's call to action is a real link, and the copy button copies on browsers that block the clipboard API instead of telling you to press a key. (`/clip-director`) `[fix, improvement]`
- **Coin Clash stops claiming it is connecting when it has gone offline**: The live indicator at the top of Coin Clash sat on a pulsing amber "connecting" forever, even once the page had established that the battle service was offline and had stopped trying to reach it. The cause was the page's own translation pass: the line of copy holding the indicator is translatable, and applying it rewrote that whole line back to the wording it shipped with, wiping out the status the page had just worked out. The indicator now survives a translation pass, so it reads offline when the arena is offline and live when battles are running. The same fault was quietly affecting the leaderboard, labor market and signals pages, and is fixed for all four. Two more repairs on Coin Clash: when the arena cannot be reached at all, the error card now explains that in words you can act on and offers Try again, instead of showing the browser's raw "Failed to fetch"; and on a narrow phone the Arena, War Records and Communities tabs wrap onto a second row rather than running off the right edge, where the Communities tab was cut in half and unreachable. (`/clash`) `[fix, improvement]`
- **Crypto Categories reads correctly in all 84 languages**: The sector leaderboard at /categories was audited end to end in a real browser: the table, the search box, the sortable columns, the paging, and the loading, empty, error and rate-limited states all behave, at phone, tablet and desktop widths. One real defect turned up, and it only showed outside English. The page's own summary line and the description search engines and link previews read were translated once against an older wording and had kept a dash where the English now uses a colon, so every non-English visitor saw punctuation the platform does not use, in the headline copy and in the shared-link preview. All 83 translated catalogs are corrected, with the full-width colon that Japanese, Korean and Chinese actually want rather than a Latin one. (`/categories`) `[fix]`
- **My Collection loads visibly, keeps its counts, and never mangles an agent's name**: The collection page had a loading state nobody could see: the shimmer placeholders were drawn inside a container the page kept hidden until the data had already arrived, so a slow connection got a blank stretch of nothing instead. The tabs, the placeholders and the counts now appear from the first frame. The counts next to Skills and Subscriptions used to vanish at random, because the page's own translation pass could overwrite the tab label a split second after the number was written into it; the count now lives in its own slot and survives. A skill published by an agent whose name contains a quotation mark or an angle bracket rendered as broken markup rather than as the name, and a publisher who earned a vanity wallet address had it shown as an ordinary one, because the card was reading a field the collection endpoint does not return. Both are fixed, so tipping a creator from your collection now shows the wallet they actually have. Empty states are centred under the tabs instead of squeezed into the first column, both of them now point you at the marketplace, the Retry button on a failed load is a real button rather than a raw grey box, and the whole page is keyboard-navigable: arrow keys move between tabs, Home and End jump to the ends, and every link and button shows a clear focus ring. (`/collection`) `[fix, improvement]`
diff --git a/public/changelog.json b/public/changelog.json
index 89ff7e9d0..4bb4fd4e8 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-17T03:09:22.113Z",
+ "generated_at": "2026-08-17T03:12:36.210Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -92,6 +92,17 @@
"improvement"
]
},
+ {
+ "date": "2026-08-17",
+ "type": "update",
+ "title": "Clip Director shows real traders again, and can no longer print a number the trade never made",
+ "summary": "The Clip Director page told every visitor that no agent had ever closed a trade. Its trader picker asked the leaderboard for the highest-ranked agents and then kept only the ones with a closed round-trip, and because the ranking score has nothing to do with having closed trades, the nine agents that qualified all sat below the cut. The picker now asks the leaderboard for exactly what it needs, so those nine traders and their real closed positions are back on the page. The bigger repair is underneath: the card copy is written by a language model, and one of the providers answered a real +1.89x win with an invented loss on a different coin, complete with a celebrating avatar, next to the on-chain link proving otherwise. Every generated card is now checked against the trade it describes before it ships, so a ticker or a figure that is not in the round-trip gets the card thrown away and rewritten from the position itself, and a stop-out can never be celebrated. Also on the page: a shared /clip-director?agent_id= link now opens that trader even when they are outside the ranking, the Try again buttons retry the step that actually failed instead of doing nothing, each card's call to action is a real link, and the copy button copies on browsers that block the clipboard API instead of telling you to press a key.",
+ "link": "/clip-director",
+ "tags": [
+ "fix",
+ "improvement"
+ ]
+ },
{
"date": "2026-08-17",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 579d3b768..329d1eeac 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -70,6 +70,14 @@
<category>fix</category>
<description>The gesture composer at /choreograph was audited end to end in a real browser: loading a starter routine, adding and reordering beats, retiming and repointing a step, previewing the whole performance on a live avatar, scrubbing the timeline, sharing a link, and saving to a real agent, at phone, tablet and desktop widths. Copy share link used to hand you a link with the routine name escaped twice, so a routine called The pitch travelled as The%2520pitch: it worked, but it looked broken, and it invited people to tidy it up and break it for real. Links now carry the routine as you can read it, and every link shared before today still opens. A routine whose name ended in the loop marker came back from a link under the wrong name and looping when it should not. On a 320 pixel phone, opening either of the two code panels pushed the whole page sideways; the code block now scrolls on its own instead. Pressing the transport a second time while the first play was still loading its clips said Pause but started a second load; it now stops the one in progress, and deleting the last beat mid-load can no longer bring an avatar back onto a stage the routine has left. Signed-out visitors also no longer see a failed request in the browser console on first paint.</description>
</item>
+ <item>
+ <title>Clip Director shows real traders again, and can no longer print a number the trade never made</title>
+ <link>https://three.ws/clip-director</link>
+ <guid isPermaLink="false">2026-08-17:Clip Director shows real traders again, and can no longer print a number the trade never made</guid>
+ <pubDate>Mon, 17 Aug 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>The Clip Director page told every visitor that no agent had ever closed a trade. Its trader picker asked the leaderboard for the highest-ranked agents and then kept only the ones with a closed round-trip, and because the ranking score has nothing to do with having closed trades, the nine agents that qualified all sat below the cut. The picker now asks the leaderboard for exactly what it needs, so those nine traders and their real closed positions are back on the page. The bigger repair is underneath: the card copy is written by a language model, and one of the providers answered a real +1.89x win with an invented loss on a different coin, complete with a celebrating avatar, next to the on-chain link proving otherwise. Every generated card is now checked against the trade it describes before it ships, so a ticker or a figure that is not in the round-trip gets the card thrown away and rewritten from the position itself, and a stop-out can never be celebrated. Also on the page: a shared /clip-director?agent_id= link now opens that trader even when they are outside the ranking, the Try again buttons retry the step that actually failed instead of doing nothing, each card's call to action is a real link, and the copy button copies on browsers that block the clipboard API instead of telling you to press a key.</description>
+ </item>
<item>
<title>Coin Clash stops claiming it is connecting when it has gone offline</title>
<link>https://three.ws/clash</link>
diff --git a/public/features.json b/public/features.json
index 678efac3d..8ee04c8ec 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-17T03:09:21.887Z",
+ "generated_at": "2026-08-17T03:12:36.088Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/src/game/coincommunities-ui.js b/src/game/coincommunities-ui.js
index 7d23f6dd6..fa5bd5f7c 100644
--- a/src/game/coincommunities-ui.js
+++ b/src/game/coincommunities-ui.js
@@ -1219,13 +1219,124 @@ export class CommunityUI {
return;
}
if (featured) this.grid.appendChild(this._coinCard(featured, true));
- for (const c of list) this.grid.appendChild(this._coinCard(c, false));
+ for (const c of this._sortCoins(list)) this.grid.appendChild(this._coinCard(c, false));
+ // Entrance: cards fade up in reading order, capped so a 50-card grid does
+ // not crawl in. The delay is a custom property the stylesheet reads, and
+ // the whole animation is off under prefers-reduced-motion.
+ [...this.grid.children].forEach((card, i) => {
+ card.style.setProperty('--cc-in-delay', `${Math.min(i * 22, 320)}ms`);
+ });
// Searching beyond the trending grid while results are already showing.
if (this.searching) this.grid.appendChild(el('div', { class: 'cc-search-more' }, [
el('span', { class: 'cc-spinner' }), document.createTextNode('Searching all of pump.fun…'),
]));
}
+ // The hero counters and the result count over the grid. Only measured values
+ // land here: the market-cap total sums the coins actually on screen, and the
+ // headcount stat stays hidden until a real population read has arrived.
+ _paintStats(list, featured) {
+ const shown = list.length + (featured ? 1 : 0);
+ const cap = list.reduce((sum, c) => sum + (Number(c.marketCap) || 0), 0) + (Number(featured?.marketCap) || 0);
+ const q = this.searchInput.value.trim();
+ this.feedCount.textContent = shown ? `${shown} ${shown === 1 ? 'world' : 'worlds'}${q ? ' matching' : ''}` : '';
+ countUp(this.statWorlds, Number(this.statWorlds.dataset.v) || 0, shown, { format: (n) => String(Math.round(n)) });
+ this.statWorlds.dataset.v = String(shown);
+ countUp(this.statCap, Number(this.statCap.dataset.v) || 0, cap, { format: (n) => fmtMc(n) || '$0' });
+ this.statCap.dataset.v = String(cap);
+ if (this.popTotal !== null) {
+ this.statPeopleWrap.hidden = false;
+ countUp(this.statPeople, Number(this.statPeople.dataset.v) || 0, this.popTotal, { format: (n) => String(Math.round(n)) });
+ this.statPeople.dataset.v = String(this.popTotal);
+ }
+ }
+
+ // ------------------------------------------------------- live headcounts
+ // Poll the matchmaker-backed population endpoint and paint the result on the
+ // cards in place, without rebuilding the grid (a rebuild would drop hover and
+ // keyboard focus every 20 seconds). A failed or unavailable read leaves the
+ // last real numbers alone: the count is either measured or absent.
+ _startPopulation() {
+ this._readPopulation();
+ this._popTimer = setInterval(() => {
+ if (document.hidden || this.lobby.hidden) return;
+ this._readPopulation();
+ }, POPULATION_POLL_MS);
+ // A tab that comes back after minutes away should not show a stale count
+ // until the next tick.
+ document.addEventListener('visibilitychange', () => {
+ if (!document.hidden && !this.lobby.hidden) this._readPopulation();
+ });
+ }
+
+ async _readPopulation() {
+ if (this._popBusy) return;
+ this._popBusy = true;
+ try {
+ const r = await fetch(POPULATION_URL, { headers: { accept: 'application/json' } });
+ if (!r.ok) throw new Error('HTTP ' + r.status);
+ const body = await r.json();
+ if (body?.ok !== true) return; // multiplayer server down: keep what we had
+ this.popTotal = Math.max(0, Math.floor(Number(body.players) || 0));
+ this.popByCoin = body.byCoin && typeof body.byCoin === 'object' ? body.byCoin : null;
+ this._paintPopulation();
+ } catch (err) {
+ log.info('[coincommunities] population read failed:', err?.message);
+ } finally {
+ this._popBusy = false;
+ }
+ }
+
+ _paintPopulation() {
+ if (this.popTotal !== null && this.statPeopleWrap) {
+ this.statPeopleWrap.hidden = false;
+ countUp(this.statPeople, Number(this.statPeople.dataset.v) || 0, this.popTotal, { format: (n) => String(Math.round(n)) });
+ this.statPeople.dataset.v = String(this.popTotal);
+ }
+ for (const card of this.grid.querySelectorAll('.cc-card[data-mint]')) {
+ const pill = card.querySelector('.cc-card-pop');
+ if (!pill) continue;
+ const n = this._popFor(card.dataset.mint);
+ pill.hidden = !n;
+ if (n) {
+ pill.querySelector('.cc-card-pop-n').textContent = String(n);
+ pill.querySelector('.cc-card-pop-l').textContent = n === 1 ? 'person inside' : 'people inside';
+ }
+ }
+ // "Most people" is an ordering over numbers that just changed.
+ if (this.sort === 'people') this._renderGrid();
+ }
+
+ // ------------------------------------------------------- coin enrichment
+ // Second read of the same trending feed for the fields the thin projection
+ // drops (launch time, replies, bonding-curve completion). Best effort by
+ // design: on failure the cards keep exactly the data they already had.
+ async _enrichCoins() {
+ if (this._enrichDone || this._enrichBusy) return;
+ this._enrichBusy = true;
+ try {
+ const r = await fetch(ENRICH_URL, { headers: { accept: 'application/json' } });
+ if (!r.ok) throw new Error('HTTP ' + r.status);
+ const body = await r.json();
+ const rows = Array.isArray(body) ? body : body?.data || [];
+ for (const row of rows) {
+ const mint = row?.mint || row?.address;
+ if (!mint) continue;
+ this.enriched.set(mint, {
+ createdAt: Number(row.created_timestamp) || 0,
+ replies: Math.max(0, Math.floor(Number(row.reply_count) || 0)),
+ graduated: row.complete === true,
+ });
+ }
+ this._enrichDone = this.enriched.size > 0;
+ if (this._enrichDone) this._renderGrid();
+ } catch (err) {
+ log.info('[coincommunities] coin enrichment skipped:', err?.message);
+ } finally {
+ this._enrichBusy = false;
+ }
+ }
+
// Build one lobby card. The featured (official) town gets a distinct frame, an
// OFFICIAL badge, and a "home town" call to action so it reads as the flagship.
_coinCard(c, featured) {
@@ -1250,9 +1361,25 @@ export class CommunityUI {
// the lobby's primary action, and a bare div with onclick left it
// unreachable by Tab and invisible to screen readers.
const cardName = c.name || (c.symbol ? '$' + c.symbol : 'this coin');
+ const extra = this.enriched.get(c.mint);
+ const age = fmtAge(extra?.createdAt);
+ const fresh = !featured && extra?.createdAt > 0 && Date.now() - extra.createdAt < NEW_COIN_MS;
+ // Live headcount, painted here on first render and updated in place by
+ // _paintPopulation on every poll. Hidden while it reads zero: an empty
+ // world is the normal state and "0 people inside" is discouraging noise.
+ const here = this._popFor(c.mint);
+ const popPill = el('div', { class: 'cc-card-pop', hidden: !here }, [
+ el('span', { class: 'cc-card-pop-dot', 'aria-hidden': 'true' }),
+ el('strong', { class: 'cc-card-pop-n', text: String(here || 0) }),
+ el('span', { class: 'cc-card-pop-l', text: here === 1 ? 'person inside' : 'people inside' }),
+ ]);
+ // Whatever the artwork does, the card keeps an identity mark: the monogram
+ // sits under the background image, so a dead IPFS gateway leaves the coin's
+ // initial rather than an empty grey box.
+ const mono = el('span', { class: 'cc-card-mono', 'aria-hidden': 'true', text: (c.symbol || c.name || '?').replace(/^\$/, '').charAt(0).toUpperCase() });
return el('div', {
class: 'cc-card' + (featured ? ' cc-card-featured' : ''),
- role: 'button', tabindex: '0',
+ role: 'button', tabindex: '0', 'data-mint': c.mint || '',
'aria-label': `Enter the ${cardName} community world`,
onclick: () => this.h.onEnter(c, ''),
onkeydown: (e) => {
@@ -1264,16 +1391,27 @@ export class CommunityUI {
// so anchoring there stranded the Holders badge in the middle of the
// card, floating over the seam. Hang them off the card instead, which
// is also position:relative, so they land on its real top corners.
- el('div', { class: 'cc-card-img', style: cssBgImage(c.image) }, featured ? [] : [liveBadge, holdersBadge]),
+ el('div', { class: 'cc-card-img', style: cssBgImage(c.image) }, featured ? [mono] : [mono, liveBadge, holdersBadge, popPill]),
el('div', { class: 'cc-card-body' }, [
el('div', { class: 'cc-card-name', text: c.name || 'Unnamed coin' }),
el('div', { class: 'cc-card-meta' }, [
el('span', { class: 'cc-card-sym', text: c.symbol ? '$' + c.symbol : '' }),
mc ? el('span', { text: mc + ' mcap' }) : null,
+ age ? el('span', { class: 'cc-card-age', text: age }) : null,
]),
+ // Signals worth one glance each, and only when they are true of this
+ // coin: a launch inside the last day, a completed bonding curve, and
+ // how much the coin's own board is talking.
+ (fresh || extra?.graduated || extra?.replies)
+ ? el('div', { class: 'cc-card-tags' }, [
+ fresh ? el('span', { class: 'cc-tag cc-tag-new', title: 'Launched in the last 24 hours', text: 'NEW' }) : null,
+ extra?.graduated ? el('span', { class: 'cc-tag', title: 'Bonding curve complete, trading on a DEX', text: 'Graduated' }) : null,
+ extra?.replies ? el('span', { class: 'cc-tag cc-tag-quiet', title: `${extra.replies} replies on the coin's pump.fun board`, text: `${fmtCompact(extra.replies)} replies` }) : null,
+ ])
+ : null,
el('div', { class: 'cc-card-cta', text: featured ? 'Enter home town →' : 'Enter community →' }),
]),
- ...(featured ? [liveBadge, holdersBadge] : []),
+ ...(featured ? [liveBadge, holdersBadge, popPill] : []),
]);
}