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
fix: live trader fallback board and hide empty closes ticker
nirholas8110a84ad419
diff --git a/src/leaderboard.css b/src/leaderboard.cssindex 9936dcf0a..b7f34a553 100644--- a/src/leaderboard.css+++ b/src/leaderboard.css@@ -252,6 +252,36 @@.lb-col-num { text-align: right; font-variant-numeric: tabular-nums; }.lb-col-act { text-align: right; }+/* Live top-trader fallback: a leaner 6-column grid (no Score / ROI / Max DD —+ those are ours to compute for agents, not scraped for external wallets). */+.lb-board.is-live .lb-board-head,+.lb-board.is-live .lb-row {+ grid-template-columns: 36px minmax(0, 2.4fr) 1.2fr 0.9fr 0.8fr 96px;+}++/* Contextual banner shown above the board while the live fallback is on screen. */+.lb-live-banner {+ display: flex;+ align-items: center;+ gap: 9px;+ margin: 0 0 12px;+ padding: 9px 13px;+ border: 1px solid color-mix(in srgb, var(--accent, #8c9bff) 32%, var(--line, var(--stroke)));+ background: color-mix(in srgb, var(--accent, #8c9bff) 8%, transparent);+ border-radius: var(--r, 10px);+ font-size: var(--text-xs);+ line-height: 1.4;+ color: var(--ink-dim, #b8b8c4);+ animation: lb-stale-in 0.2s ease both;+}+.lb-live-banner strong { color: var(--ink-bright, #fff); font-weight: 600; }+.lb-live-banner a { color: var(--accent, #8c9bff); text-decoration: none; font-weight: 600; }+.lb-live-banner a:hover { text-decoration: underline; }+.lb-live-banner-text { min-width: 0; }++/* The verified toggle is meaningless for external wallets — dim it in live mode. */+.lb-toggle.is-disabled { opacity: 0.4; pointer-events: none; }+.lb-rows { display: flex; flex-direction: column; }.lb-row {border-bottom: 1px solid var(--hairline);@@ -551,6 +581,8 @@.lb-hide-md { display: none !important; }.lb-board-head,.lb-row { grid-template-columns: 30px minmax(0, 2.2fr) 0.9fr 1.1fr 0.9fr 0.8fr 0.8fr 88px; }+ .lb-board.is-live .lb-board-head,+ .lb-board.is-live .lb-row { grid-template-columns: 30px minmax(0, 2.2fr) 1.1fr 0.9fr 0.8fr 88px; }.lb-oracle-board-head,.lb-oracle-row { grid-template-columns: 30px minmax(0, 2.2fr) 0.9fr 0.8fr 1.1fr 0.8fr 72px; }}@@ -562,6 +594,9 @@.lb-controls { justify-content: center; }.lb-board-head,.lb-row { grid-template-columns: 26px minmax(0, 1.7fr) 0.8fr 1fr 70px; }+ /* Win-rate column is hidden below 620px, so the live grid drops to 5 columns. */+ .lb-board.is-live .lb-board-head,+ .lb-board.is-live .lb-row { grid-template-columns: 26px minmax(0, 1.7fr) 1fr 0.8fr 70px; }.lb-avatar { width: 32px; height: 32px; }.lb-oracle-board-head,.lb-oracle-row { grid-template-columns: 26px minmax(0, 1.7fr) 0.9fr 68px; }diff --git a/src/leaderboard.js b/src/leaderboard.jsindex b8c09f72b..85dcb1146 100644--- a/src/leaderboard.js+++ b/src/leaderboard.js@@ -248,7 +248,15 @@ function renderSummary(data) {function renderTicker(trades) {const el = $('#lb-ticker');- if (!trades || !trades.length) { el.innerHTML = '<span class="lb-muted" style="font-size:var(--text-xs)">No closes yet.</span>'; return; }+ // No internal closes (e.g. while the live fallback board is showing) — hide the+ // whole "Latest closes" aside rather than leave a hollow "No closes yet." panel.+ const wrap = el.closest('.lb-ticker-wrap');+ if (!trades || !trades.length) {+ el.innerHTML = '';+ if (wrap) wrap.hidden = true;+ return;+ }+ if (wrap) wrap.hidden = false;el.innerHTML = trades.slice(0, 16).map((t) => {const url = t.sell_url || t.buy_url || '#';const pnl = t.pnl_sol != null ? `<span class="lb-tick-pnl ${pnlClass(t.pnl_sol)}">${fmtSol(t.pnl_sol)}</span>` : '';@@ -263,25 +271,46 @@ function renderBoard(data) {const board = $('.lb-board');const rows = $('#lb-rows');const stateEl = $('#lb-state');- const list = data.leaderboard || [];+ const agents = data.leaderboard || [];+ const live = data.live_traders || [];board.setAttribute('aria-busy', 'false');- if (!list.length) {- rows.innerHTML = '';- stateEl.innerHTML = `- <div class="lb-state-title">No ranked traders yet</div>- <p>No agent has closed a sniper position in this window${state.verified ? ' that meets the verified bar' : ''}.- Widen the window, turn off “verified only”, or be the first.</p>- <a class="lb-btn lb-btn-primary" href="/create-agent">Launch a trader</a>`;+ // 1. Provable three.ws agent track records take precedence.+ if (agents.length) {+ setBoardMode(false);+ clearLiveBanner();+ stateEl.innerHTML = '';+ rows.innerHTML = agents.map(rowMarkup).join('');+ // Wire the wallet chips' copy + Tip actions. The board is public — viewers+ // don't own these traders' agents — so chips render isOwner:false (◎ Tip).+ wireWalletChips(rows);+ staggerRows(rows);return;}- stateEl.innerHTML = '';- rows.innerHTML = list.map(rowMarkup).join('');- // Wire the wallet chips' copy + Tip actions. The board is public — viewers- // don't own these traders' agents — so chips render isOwner:false (◎ Tip).- wireWalletChips(rows);- // Stagger the entrance subtly.- rows.querySelectorAll('.lb-row').forEach((el, i) => { el.style.animationDelay = `${Math.min(i, 12) * 22}ms`; });++ // 2. Live fallback: real top Solana traders from kolscan, so the flagship is+ // never an empty void before the first agent earns a record.+ if (live.length) {+ setBoardMode(true);+ showLiveBanner(data);+ stateEl.innerHTML = '';+ rows.innerHTML = sortLive(live, state.sort).map(liveRowMarkup).join('');+ staggerRows(rows);+ return;+ }++ // 3. Genuinely nothing — devnet, or the live source is momentarily unreachable.+ setBoardMode(false);+ clearLiveBanner();+ rows.innerHTML = '';+ const liveDown = state.network === 'mainnet';+ stateEl.innerHTML = `+ <div class="lb-state-title">No ranked traders yet</div>+ <p>${liveDown+ ? 'No agent has a track record in this window yet, and the live trader feed is momentarily unreachable.'+ : `No agent has closed a sniper position in this window${state.verified ? ' that meets the verified bar' : ''}.`}+ Widen the window, turn off “verified only”, or be the first.</p>+ <a class="lb-btn lb-btn-primary" href="/create-agent">Launch a trader</a>`;}// --- Fetch -------------------------------------------------------------------