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: integrate ui-juice for live updates and improved data rendering in labor market
qbdzacb67b49b456
diff --git a/pages/labor-market.html b/pages/labor-market.htmlindex 56e5b80d2..06241a459 100644--- a/pages/labor-market.html+++ b/pages/labor-market.html@@ -32,6 +32,7 @@<link rel="manifest" href="/site.webmanifest" /><link rel="stylesheet" href="/fonts/fonts.css" /><link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/src/ui-juice.css" /><link rel="stylesheet" href="/src/labor-market.css" /><link rel="stylesheet" href="/footer.css" /><link rel="canonical" href="https://three.ws/labor-market" />@@ -47,7 +48,7 @@<main class="lm-shell" aria-labelledby="lm-title"><section class="lm-hero"><p class="lm-kicker">- <span class="lm-live-dot" aria-hidden="true"></span>+ <span id="lm-live" class="juice-live" data-state="connecting"><span class="juice-live-dot" aria-hidden="true"></span><span class="juice-live-txt">connecting</span></span>Autonomous A2A economy · real $THREE, settled on-chain</p><h1 id="lm-title" class="lm-title">The Agent Labor Market</h1>diff --git a/src/labor-market.js b/src/labor-market.jsindex af3752a0c..9e7f342a5 100644--- a/src/labor-market.js+++ b/src/labor-market.js@@ -9,6 +9,7 @@// through the real /api/labor endpoints with CSRF on mutations.import { apiFetch } from './api.js';+import { updateValue, setLiveDot } from './ui-juice.js';const $ = (sel, root = document) => root.querySelector(sel);const $$ = (sel, root = document) => [...root.querySelectorAll(sel)];@@ -86,13 +87,16 @@ const ownsAgent = (id) => state.myAgents.some((a) => a.id === id);function renderSummary() {const t = state.feed?.totals || {};- $('#lm-sum-volume').textContent = t.volume_three != null ? fmtThree(t.volume_three) : '0';- $('#lm-sum-jobs').textContent = (t.settled_jobs ?? 0).toLocaleString();- $('#lm-sum-open').textContent = (t.open_bounties ?? 0).toLocaleString();+ // Count the headline tiles from their previously-shown real values, flashing the+ // direction as the market polls (the #lm-sum-* nodes persist across refreshes).+ updateValue($('#lm-sum-volume'), Number(t.volume_three || 0), fmtThree);+ updateValue($('#lm-sum-jobs'), Number(t.settled_jobs || 0), (n) => Math.round(n).toLocaleString());+ updateValue($('#lm-sum-open'), Number(t.open_bounties || 0), (n) => Math.round(n).toLocaleString());const escrow = $('#lm-sum-escrow');escrow.textContent = state.escrowConfigured ? 'Live' : 'Offline';escrow.classList.toggle('lm-bad', !state.escrowConfigured);escrow.classList.toggle('lm-good', state.escrowConfigured);+ setLiveDot($('#lm-live'), 'live', 'live');}function renderTicker() {@@ -592,6 +596,7 @@ async function refresh() {} catch {const list = $('#lm-list');if (!state.feed) list.innerHTML = `<div class="lm-empty"><h3>Market unavailable</h3><p>Couldn't reach the labor market. <button type="button" class="lm-btn" data-retry>Retry</button></p></div>`;+ setLiveDot($('#lm-live'), state.feed ? 'connecting' : 'error', state.feed ? 'reconnecting' : 'offline');}}diff --git a/src/radar.js b/src/radar.jsindex 781cb56fd..feeb0fb2b 100644--- a/src/radar.js+++ b/src/radar.js@@ -692,7 +692,9 @@ function renderListRow(coin) {if (coin.net_volume_sol == null) net.textContent = '—';else {net.textContent = (coin.net_volume_sol > 0 ? '+' : '') + fmtSol(coin.net_volume_sol) + ' ◎';- net.classList.add(coin.net_volume_sol > 0 ? 'rc-pos' : coin.net_volume_sol < 0 ? 'rc-neg' : '');+ // Exactly-zero net flow has no directional class — adding '' throws on DOMTokenList.+ if (coin.net_volume_sol > 0) net.classList.add('rc-pos');+ else if (coin.net_volume_sol < 0) net.classList.add('rc-neg');}// signals (badges + flags, condensed)@@ -891,7 +893,9 @@ function netStat(net) {if (net == null) { v.textContent = '—'; }else {v.textContent = (net > 0 ? '+' : '') + fmtSol(net) + ' ◎';- v.classList.add(net > 0 ? 'rc-pos' : net < 0 ? 'rc-neg' : '');+ // Exactly-zero net flow has no directional class — adding '' throws on DOMTokenList.+ if (net > 0) v.classList.add('rc-pos');+ else if (net < 0) v.classList.add('rc-neg');}s.append(v);return s;