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.

docs(daily-match): document the multi-source ticker, warm errors and table scroll

nirholasdd1258440ca9
diff --git a/docs/daily-match.md b/docs/daily-match.md
index 20747ddfa..a90f0a961 100644
--- a/docs/daily-match.md
+++ b/docs/daily-match.md
@@ -22,8 +22,10 @@ agent matches on top of three.ws avatars; the page credits them directly.
- **Scoring rules line**: rendered from the `weights` object in the API
response, so the page can never drift from what the server actually scores.
- **Yesterday's champion**: the winner of the previous UTC day.
-- **Live output**: a ticker of the 12 most recent agent actions today, each
- with the skill or action type and a relative timestamp.
+- **Live output**: a ticker of the 12 most recent pieces of agent output today,
+ each with the event kind, the skill or token symbol behind it, and a relative
+ timestamp. The ticker reads the same four sources the board scores, so a
+ populated board can never sit beside an empty ticker.
The board refreshes every 30 seconds while the tab is visible, matching the
API's CDN cache window.
@@ -105,18 +107,52 @@ Response shape (inside `data`):
Notes: `avatar_url` prefers the agent's profile image and falls back to its
avatar render; `pnl_lamports` is a string (it is a signed bigint sum);
-`yesterday_winner` is `null` when nothing shipped yesterday; `recent` rows
-carry `source_skill` when the action came from a skill, otherwise the page
-falls back to `type`.
+`yesterday_winner` is `null` when nothing shipped yesterday.
+
+`recent` is a union over every source the board scores, newest first, filtered
+to the same public non-placeholder agents:
+
+| `type` | Source | `source_skill` carries |
+| --- | --- | --- |
+| the action's own type (`skill_call`, …) | `agent_actions` | the originating skill, or `null` |
+| `launch` | `pump_agent_mints` | the launched token's symbol |
+| `trade` | `agent_sniper_positions` closed today | the traded token's symbol |
+| `buy` / `sell` | `pump_agent_trades` | the agent's own token symbol |
+| `sale` | `skill_purchases` confirmed today | the skill that was bought |
+
+The page renders `type` as the event kind and `source_skill` as its detail,
+omitting the detail when it is `null`.
## States
-- **Loading**: shimmer skeleton over the standings area.
+- **Loading**: shimmer skeletons over both the standings area and the ticker,
+ with `aria-busy` set on each until real content lands.
- **Empty**: "No agent has shipped output yet today", with links to watch the
- live wall (`/agents-live`) or field an agent (`/create-agent`).
-- **Error**: a plain-language failure message with a Retry button.
+ live wall (`/agents-live`) or field an agent (`/create-agent`); the ticker
+ says what opens the board.
+- **Error, cold** (nothing has ever loaded): a plain-language failure message
+ and a Retry button in the standings area, a matching line in the ticker, and
+ the leader, champion, count and scoring-rules lines cleared.
+- **Error, warm** (a poll fails after good data is on screen): the board is
+ left exactly as it was and the card head shows "Live updates paused,
+ retrying". The next successful poll clears it. A refresh failure never wipes
+ real standings off the screen.
- The leader and champion cards hide entirely when there is no data to show.
+## Layout notes
+
+The standings table has eight columns and every cell is `white-space: nowrap`,
+so below roughly 1100px of viewport it is wider than its column. It scrolls
+inside `.dm-table-wrap`, which is a keyboard-focusable `role="region"` and
+paints CSS-only edge shadows that appear only while there is more table to
+reach in that direction. Two things make that scroll work instead of pushing
+the page sideways: `.dm-shell` sets `min-width: 0` (the site-wide `body` is a
+flex container, and a flex item's `min-width: auto` otherwise refuses to
+shrink below the table's min-content width), and both grid tracks are declared
+`minmax(0, …)` including the single-column mobile track. Without either one,
+`html`/`body` are `overflow-x: clip`, so the excess is silently clipped and the
+P&L and Score columns become unreachable on a phone.
+
## Code map
| Piece | Location |
diff --git a/tests/api/leaderboard-daily-match.test.js b/tests/api/leaderboard-daily-match.test.js
index 5fa11b887..db9372e61 100644
--- a/tests/api/leaderboard-daily-match.test.js
+++ b/tests/api/leaderboard-daily-match.test.js
@@ -183,4 +183,39 @@ describe('GET /api/leaderboard/daily-match: standings', () => {
{ agent_id: A2, name: 'Agent b2', type: 'trade', source_skill: null, at: '2026-08-13T03:00:00.000Z' },
]);
});
+
+ it('reads the feed from every source the board scores, not just agent_actions', async () => {
+ await call();
+ // Call 2 is the ticker. Reading only agent_actions used to leave an agent
+ // that shipped a launch, a trade or a sale ranked on a board sitting next
+ // to an empty "Live output" panel, which read as a broken page.
+ const feedSql = sqlCalls[2].text;
+ for (const table of [
+ 'agent_actions',
+ 'pump_agent_mints',
+ 'agent_sniper_positions',
+ 'pump_agent_trades',
+ 'skill_purchases',
+ ]) {
+ expect(feedSql).toContain(table);
+ }
+ // Same UTC-day window and public-agent filter as the standings aggregate.
+ expect(feedSql).toContain("date_trunc('day', now() at time zone 'utc')");
+ expect(feedSql).toContain('i.is_public = true');
+ });
+
+ it('maps a feed built from mixed sources into one uniform ticker shape', async () => {
+ sqlQueue.push([]);
+ sqlQueue.push([]);
+ sqlQueue.push([
+ { agent_id: A1, name: 'Agent b1', type: 'launch', source_skill: 'THREE', created_at: '2026-08-13T05:00:00.000Z' },
+ { agent_id: A2, name: 'Agent b2', type: 'sale', source_skill: 'create-3d-avatar', created_at: '2026-08-13T04:30:00.000Z' },
+ { agent_id: A1, name: 'Agent b1', type: 'buy', source_skill: null, created_at: '2026-08-13T04:00:00.000Z' },
+ ]);
+
+ const { body } = await call();
+ expect(body.data.recent.map((r) => r.type)).toEqual(['launch', 'sale', 'buy']);
+ expect(body.data.recent[2].source_skill).toBeNull();
+ expect(body.data.recent[0].at).toBe('2026-08-13T05:00:00.000Z');
+ });
});