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(arena): tighten the house bracket copy and the share page it renders

nirholascfe59baa0d35
diff --git a/api/_lib/arena-house.js b/api/_lib/arena-house.js
index 8165e6c4a..a49e34364 100644
--- a/api/_lib/arena-house.js
+++ b/api/_lib/arena-house.js
@@ -169,6 +169,11 @@ export async function ensureHouseArenas({ network = 'mainnet', now = Date.now()
* (an armed sniper strategy) or a demonstrated one (a real position opened in
* the recent past). Both arms require a resolvable Solana wallet, because an
* entry without one can never produce a verifiable row.
+ *
+ * Public agents only (`is_public is not false`, the same filter the public trader
+ * leaderboard uses). That is what makes the "auto-entry publishes nothing new"
+ * promise above true: an owner who kept an agent private never finds its name,
+ * wallet and P&L on a public board because a cron entered it overnight.
*/
export async function eligibleAgents({ network = 'mainnet', lookbackDays = 14 } = {}) {
const rows = await sql`
@@ -198,7 +203,7 @@ export async function eligibleAgents({ network = 'mainnet', lookbackDays = 14 }
) as wallet
from candidates c
join agent_identities a on a.id = c.agent_id
- where a.deleted_at is null
+ where a.deleted_at is null and a.is_public is not false
`;
return rows.filter((r) => r.wallet);
}
diff --git a/api/arena-share.js b/api/arena-share.js
index 10913e642..0363ef776 100644
--- a/api/arena-share.js
+++ b/api/arena-share.js
@@ -69,11 +69,17 @@ export default wrap(async (req, res) => {
const trades = standings.reduce((a, s) => a + (s.metrics?.closed_count ?? s.in_window_trades ?? 0), 0);
const leader = podium[0];
+ // Three descriptions, because an unfurl has to say something true in each
+ // case: a board with a leader, a board with entrants but no ranked trades
+ // yet, and one nobody has entered. "0 agents entered" reads as a dead link,
+ // so an empty bracket describes what it IS rather than counting to zero.
const description = leader
? `${stateWord(status)}. ${leader.agent_name || 'An agent'} leads on ${fmtSol(
leader.metrics?.realized_pnl_sol,
)} across ${standings.length} agents and ${trades} trades opened inside the window. Every row verifiable on-chain.`
- : `${stateWord(status)}. ${standings.length} agents entered, ranked on real pump.fun P&L from trades opened inside the window. Every row verifiable on-chain.`;
+ : standings.length
+ ? `${stateWord(status)}. ${standings.length} agents entered, ranked on real pump.fun P&L from trades opened inside the window. Every row verifiable on-chain.`
+ : `${stateWord(status)}. AI agents ranked on real pump.fun P&L from trades opened inside the window, with every row verifiable on-chain.`;
res.statusCode = 200;
res.setHeader('content-type', 'text/html; charset=utf-8');
diff --git a/src/arena/arena.js b/src/arena/arena.js
index 069217e32..4813ce064 100644
--- a/src/arena/arena.js
+++ b/src/arena/arena.js
@@ -599,9 +599,17 @@ async function renderNotFound() {
}
}
-/** Share the deep link to a tournament (native share sheet, with clipboard fallback). */
+/**
+ * Share a tournament (native share sheet, with clipboard fallback).
+ *
+ * Shares the crawlable /arena/t/<id> twin rather than the hash route the browser
+ * is sitting on. A fragment is invisible to every unfurler, so the hash link
+ * previewed as the generic site card; /arena/t/<id> carries the bracket's own
+ * Open Graph tags and the live standings image, and forwards a human straight
+ * back to this same live view.
+ */
function shareTournament(t) {
- const url = `${location.origin}/arena#/t/${t.id}`;
+ const url = `${location.origin}/arena/t/${t.id}`;
if (navigator.share) {
navigator.share({ title: `${t.name} · The Arena`, url }).catch(() => {});
return;