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(yields): make the pool toggle a real button and restore the head copy the catalog was overwriting
nirholas3e06b22f158c
diff --git a/docs/coin-pages.md b/docs/coin-pages.mdindex 7b4ed10c6..86699d0fc 100644--- a/docs/coin-pages.md+++ b/docs/coin-pages.md@@ -278,7 +278,8 @@ one-click reset.Files: [`pages/screener.html`](../pages/screener.html) (shell, controls, SEO),[`src/screener.js`](../src/screener.js) (state, filtering, sorting,-rendering), [`src/screener.css`](../src/screener.css), with shared formatters+rendering), [`src/filter-controls.css`](../src/filter-controls.css) (the+labelled filter row, shared with `/yields`), with shared formattersfrom [`src/shared/coin-format.js`](../src/shared/coin-format.js) and the tablepattern from [`src/coins-index.js`](../src/coins-index.js).@@ -550,7 +551,7 @@ text before they reach the client.| Exchange detail | [`pages/exchange.html`](../pages/exchange.html) + `src/exchange-page.js` + `src/exchange-page.css`, API [`api/coin/exchange.js`](../api/coin/exchange.js) || Converter | `pages/converter.html` + `src/converter.js` + `src/converter.css` || DeFi / Chains / Stablecoins | `pages/{defi,chains,stablecoins}.html` (+ `src/*.js`, `src/*.css`), APIs in [`api/defi/`](../api/defi) |-| DeFi Yields | [`pages/yields.html`](../pages/yields.html) + `src/yields.js` + `src/yields.css`, API [`api/defi/yields.js`](../api/defi/yields.js) |+| DeFi Yields | [`pages/yields.html`](../pages/yields.html) + `src/yields.js` + `src/yields.css` + [`src/filter-controls.css`](../src/filter-controls.css), API [`api/defi/yields.js`](../api/defi/yields.js) || Protocol detail | [`pages/protocol.html`](../pages/protocol.html) + `src/protocol-page.js` + `src/protocol-page.css`, API [`api/defi/protocol.js`](../api/defi/protocol.js) || Chain detail | [`pages/chain.html`](../pages/chain.html) + `src/chain-page.js` + `src/chain-page.css`, API [`api/defi/chain.js`](../api/defi/chain.js) || Stablecoin detail | [`pages/stablecoin.html`](../pages/stablecoin.html) + `src/stablecoin-page.js` + `src/stablecoin-page.css`, API [`api/defi/stablecoin.js`](../api/defi/stablecoin.js) |diff --git a/public/locales/en.json b/public/locales/en.jsonindex d4aa62309..70b45b27d 100644--- a/public/locales/en.json+++ b/public/locales/en.json@@ -20235,12 +20235,12 @@"markets": "Markets","markets_2": "Markets","median_apy": "Median APY",- "meta_description": "Explore live DeFi yield pools across every chain and protocol — filter by chain, project, stablecoins and TVL, sort by APY or size, and open any pool for its full APY and TVL history. Data from DeFiLlama.",- "meta_og_description": "Explore live DeFi yield pools across every chain and protocol — filter by chain, project, stablecoins and TVL, sort by APY or size, and chart any pool's APY and TVL history.",- "meta_og_title": "DeFi Yields · three.ws",- "meta_title": "DeFi Yields · three.ws",- "meta_twitter_description": "Explore live DeFi yield pools across every chain and protocol — filter by chain, project, stablecoins and TVL, sort by APY or size, and chart any pool's history.",- "meta_twitter_title": "DeFi Yields · three.ws",+ "meta_description": "Explore roughly 15,000 live DeFi yield pools across every chain and protocol: filter by chain, project, stablecoin exposure and minimum TVL, sort by APY or TVL, and open any pool to see its full APY and TVL history. Live from DeFiLlama, no key required.",+ "meta_og_description": "Explore roughly 15,000 live DeFi yield pools across every chain and protocol: filter by chain, project, stablecoin exposure and minimum TVL, sort by APY or TVL, and chart any pool's APY and TVL history.",+ "meta_og_title": "DeFi Yields Explorer · three.ws",+ "meta_title": "DeFi Yields Explorer · three.ws",+ "meta_twitter_description": "Explore roughly 15,000 live DeFi yield pools across every chain and protocol: filter by chain, project, stablecoin exposure and minimum TVL, sort by APY or TVL, and chart any pool's history.",+ "meta_twitter_title": "DeFi Yields Explorer · three.ws","min_tvl": "Min TVL","pools_tracked": "Pools Tracked","project": "Project",@@ -20249,6 +20249,6 @@"stablecoins_only": "Stablecoins only","total_tvl": "Total TVL","tvl": "TVL",- "yield_data_from_defillama_apy_figures_are": "Yield data from <a href=\"https://defillama.com/yields\" rel=\"noopener noreferrer\" target=\"_blank\">DeFiLlama</a>. APY figures are protocol-reported and vary with pool conditions — not financial advice."+ "yield_data_from_defillama_apy_figures_are": "Yield data from <a href=\"https://defillama.com/yields\" rel=\"noopener noreferrer\" target=\"_blank\">DeFiLlama</a>. APY figures are protocol-reported and vary with pool conditions. Not financial advice."}}diff --git a/src/yields.css b/src/yields.cssindex 3a2382725..dd4624ba4 100644--- a/src/yields.css+++ b/src/yields.css@@ -1,10 +1,12 @@/*- * /yields — DeFi yield-pool explorer. Reuses cv-container, cv-stats-grid,- * cv-stat-card, cv-table, cv-search, hm-seg, cv-empty, cv-skel and the- * scr-controls / scr-field / scr-reset filter chrome from screener.css's- * siblings. This file styles only what is unique to the yields page: the- * stablecoin toggle, the wide pool table's pool/APY/chip cells, and the- * per-row expansion drawer with its dual-axis APY/TVL chart.+ * /yields: DeFi yield-pool explorer. Reuses cv-container, cv-stats-grid,+ * cv-stat-card, cv-table, cv-search, hm-seg, cv-empty and cv-skel from+ * coin-pages.css, and the scr-controls / scr-field / scr-reset filter row from+ * filter-controls.css. BOTH of those must be linked by pages/yields.html; the+ * page shipped without the second one and the whole filter row rendered as bare+ * inline markup. This file styles only what is unique to the yields page: the+ * stablecoin toggle, the wide pool table's pool/APY/chip cells, and the per-row+ * expansion drawer with its dual-axis APY/TVL chart.** Chart axis colors are theme-aware custom properties so the SVG strokes and* the legend swatches always agree.@@ -141,18 +143,33 @@.yl-row td {transition: background 0.12s;}-.yl-row:focus-visible {- outline: 2px solid var(--cv-accent);- outline-offset: -2px;-}.yl-row.is-open td {background: var(--cv-surface-2);}-.yl-pool {+/* The pool cell's toggle is a real <button> so the row keeps table semantics and+ keyboard users get native Enter/Space plus aria-expanded. It is painted as+ plain cell content, not as a control. */+.yl-pool-btn {+ appearance: none;+ background: none;+ border: 0;+ margin: 0;+ padding: 0;+ font: inherit;+ color: inherit;+ text-align: left;+ cursor: pointer;display: flex;align-items: baseline;gap: 0.5rem;+ width: 100%;+ min-width: 0;+}+.yl-pool-btn:focus-visible {+ outline: 2px solid var(--cv-accent);+ outline-offset: 2px;+ border-radius: var(--cv-radius-sm);}.yl-pool .chev {color: var(--cv-text-3);diff --git a/src/yields.js b/src/yields.jsindex ef7f699b6..89fdadf04 100644--- a/src/yields.js+++ b/src/yields.js@@ -258,14 +258,17 @@ function rowHtml(p) {const meta = p.pool_meta ? `<span class="meta">${esc(p.pool_meta)}</span>` : '';const stableTag = p.stablecoin ? '<span class="yl-tag">stable</span>' : '';return `- <tr class="yl-row${expanded ? ' is-open' : ''}" data-pool="${esc(p.pool)}" tabindex="0" role="button"- aria-expanded="${expanded ? 'true' : 'false'}" aria-label="Toggle history for ${esc(p.symbol)} on ${esc(p.project)}">+ <tr class="yl-row${expanded ? ' is-open' : ''}" data-pool="${esc(p.pool)}"><td class="left yl-pool">- <span class="chev" aria-hidden="true">▸</span>- <span class="pool-inner">- <span class="sym">${esc(p.symbol)}${stableTag}</span>- ${meta}- </span>+ <button type="button" class="yl-pool-btn" data-toggle="${esc(p.pool)}"+ aria-expanded="${expanded ? 'true' : 'false'}" aria-controls="drawer-${esc(p.pool)}"+ aria-label="Show APY and TVL history for ${esc(p.symbol)} on ${esc(p.project)}">+ <span class="chev" aria-hidden="true">▸</span>+ <span class="pool-inner">+ <span class="sym">${esc(p.symbol)}${stableTag}</span>+ ${meta}+ </span>+ </button></td><td class="left hide-md yl-project">${p.project ? `<a class="yl-link" href="/protocol/${encodeURIComponent(p.project)}">${esc(p.project)}</a>` : '—'}</td><td class="left hide-sm yl-chain">${p.chain ? `<a class="yl-link" href="/chain/${encodeURIComponent(p.chain)}">${esc(p.chain)}</a>` : '—'}</td>@@ -330,21 +333,21 @@ function renderTable() {</table></div>`;+ // The pool cell holds the real <button>: it is what keyboard and screen-reader+ // users operate, and it owns aria-expanded/aria-controls. The row-wide click+ // below is a pointer convenience on top of it, not the control itself, so the+ // <tr> keeps its table-row semantics.el.querySelectorAll('tr.yl-row').forEach((tr) => {- const toggle = () => toggleRow(tr.dataset.pool);tr.addEventListener('click', (e) => {- // A click on the project/chain cross-link navigates; it must not- // also toggle the pool's history drawer.- if (e.target.closest('a.yl-link')) return;- toggle();- });- tr.addEventListener('keydown', (e) => {- if ((e.key === 'Enter' || e.key === ' ') && !e.target.closest('a.yl-link')) {- e.preventDefault();- toggle();- }+ // A click on the project/chain cross-link navigates; it must not also+ // toggle the drawer. A click on the button is the button's own job.+ if (e.target.closest('a.yl-link') || e.target.closest('.yl-pool-btn')) return;+ toggleRow(tr.dataset.pool);});});+ el.querySelectorAll('.yl-pool-btn').forEach((btn) => {+ btn.addEventListener('click', () => toggleRow(btn.dataset.toggle));+ });// Re-open drawer content if one was expanded before a re-render.if (state.expanded) renderDrawer(state.expanded);@@ -356,13 +359,16 @@ function renderTable() {// ── Row expansion + chart ───────────────────────────────────────────────────function toggleRow(pool) {- if (state.expanded === pool) {- state.expanded = null;- renderTable();- return;- }- state.expanded = pool;+ // Toggling re-renders the whole table, which destroys the node the keyboard+ // was on. Put focus back on the same pool's button afterwards, or a keyboard+ // user is dumped to the top of the document on every open and close.+ const refocus = document.activeElement?.classList.contains('yl-pool-btn');+ const collapse = state.expanded === pool;+ state.expanded = collapse ? null : pool;renderTable();+ const btn = $('yl-table').querySelector(`.yl-pool-btn[data-toggle="${cssEsc(pool)}"]`);+ if (refocus) btn?.focus({ preventScroll: true });+ if (collapse) return;loadChart(pool);// Bring the freshly-opened drawer into view on small screens.const row = $('yl-table').querySelector(`tr.yl-row[data-pool="${cssEsc(pool)}"]`);