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.

feat(charts): add the chart-source switcher to /trades and Mission Control, and give the Trade Terminal its missing palette

nirholasd45d5eb59743
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c7d60dc0a..4b3b481f8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,10 +6,12 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
## 2026-09-18
+- **Choose your chart everywhere a coin is charted, now including DEXTools**: Every place three.ws draws a coin's price chart now lets you switch to the chart you trust. The Trade Terminal at /trades and Mission Control used to show only the platform's own live candles; both now have a source bar with DexScreener, Birdeye, GMGN, DEXTools and GeckoTerminal one click away, the same choice already offered on coin pages and launch pages. DEXTools is new on all four. Your pick is remembered and follows you from coin to coin, the bar works from the keyboard with the arrow keys, and each chart comes with a link that opens the same market on the provider's own site. If a provider cannot draw a coin yet, or its chart is blocked by your browser or network, you get a plain explanation with a retry and a working alternative instead of an empty box. (`/trades`) `[feature, improvement]`
- **Granite Guardian now answers on three.ws, not just in the docs**: The governance check that screens what an agent is asked to do, and vetoes it when the request is a jailbreak, harmful, or fraudulent, runs on IBM Granite Guardian. It was built to call IBM's hosted watsonx.ai service, so on our live site it answered with a not-configured error, and the new agent identity check quietly skipped itself for the same reason. IBM publishes Granite Guardian's weights openly, so we now run the model ourselves on a dedicated GPU as a second lane: watsonx still leads wherever it is set up, and our own copy answers whenever it is not. Every verdict now says which model and which lane produced it. The identity check also compares a new agent against existing ones using the site's regular embedding service when Granite embeddings are unavailable; it lists the look-alikes it finds but only scores them on Granite, because that is what its thresholds were tuned on. (`/docs/ibm`) `[fix, infra]`
- **Paid endpoints now describe themselves the way marketplaces expect**: When an agent or a marketplace asks one of our paid endpoints what it costs, the answer also explains how to call it and what comes back. Around sixty endpoints were sending that explanation in an older layout, or in one that did not match its own rules, which is enough for a marketplace to skip the listing without saying why. Every paid endpoint now sends it in the current standard layout, checked against its own rules. We also added a tool that tests our endpoints with the same checklist a marketplace validator uses, so a listing problem shows up on our side first. (`/docs/x402-dev-tools`) `[improvement, fix]`
- **Paid x402 endpoints are answering again**: For several hours on September 18, nearly every paid endpoint on three.ws, the x402 discovery document at /.well-known/x402, the payment facilitator and the MCP server answered with a server error instead of a price. A routine update to the library behind wallet sign-in changed what it needs at startup, and our code tripped over it the moment it loaded, before any request could be served. Agents and marketplace validators that probed us saw a broken seller. The sign-in code now supplies what the library expects, returning buyers can sign back in to what they already paid for exactly as before, and the deploy checks now refuse to ship when the tested dependencies differ from the ones the live site will run, which is how this got past us. (`/docs/x402`) `[fix, infra]`
- **The $THREE page now has a live DEXTools chart and the Social Boost wins**: The $THREE page shows a live candle chart of the three / SOL pair, drawn by DEXTools. Below the platform's own buybacks there is a new section for the community's: the three DEXTools Social Boost prizes $THREE has won so far, $11,382 of buybacks in total, each with a link to its receipt on DEXTools. Social Boost ranks tokens by visits to their DEXTools page, so the section also links straight there. Every visit counts toward the next win. (`/three-token`) `[feature, improvement]`
+- **The Trade Terminal finally looks the way it was designed**: The Trade Terminal at /trades was written against a set of colors and fonts that the page itself never defined, so browsers quietly fell back to their defaults: Times New Roman text, oversized controls and missing panel colors. The page now defines its own palette, in both dark and light themes, and renders as the dense, monospaced trading terminal it was meant to be. (`/trades`) `[fix]`
## 2026-09-17
diff --git a/data/changelog.json b/data/changelog.json
index 3e12c5031..b00e1bc1c 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,25 @@
{
"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-09-18",
+ "title": "Choose your chart everywhere a coin is charted, now including DEXTools",
+ "summary": "Every place three.ws draws a coin's price chart now lets you switch to the chart you trust. The Trade Terminal at /trades and Mission Control used to show only the platform's own live candles; both now have a source bar with DexScreener, Birdeye, GMGN, DEXTools and GeckoTerminal one click away, the same choice already offered on coin pages and launch pages. DEXTools is new on all four. Your pick is remembered and follows you from coin to coin, the bar works from the keyboard with the arrow keys, and each chart comes with a link that opens the same market on the provider's own site. If a provider cannot draw a coin yet, or its chart is blocked by your browser or network, you get a plain explanation with a retry and a working alternative instead of an empty box.",
+ "tags": [
+ "feature",
+ "improvement"
+ ],
+ "link": "/trades"
+ },
+ {
+ "date": "2026-09-18",
+ "title": "The Trade Terminal finally looks the way it was designed",
+ "summary": "The Trade Terminal at /trades was written against a set of colors and fonts that the page itself never defined, so browsers quietly fell back to their defaults: Times New Roman text, oversized controls and missing panel colors. The page now defines its own palette, in both dark and light themes, and renders as the dense, monospaced trading terminal it was meant to be.",
+ "tags": [
+ "fix"
+ ],
+ "link": "/trades"
+ },
{
"date": "2026-09-18",
"title": "The $THREE page now has a live DEXTools chart and the Social Boost wins",
diff --git a/docs/coin-pages.md b/docs/coin-pages.md
index 041a74b1b..da2da3e3d 100644
--- a/docs/coin-pages.md
+++ b/docs/coin-pages.md
@@ -52,15 +52,24 @@ Grotesk display face).
contract address, for coins with a Solana mint or a supported EVM contract
(GMGN indexes Solana, Ethereum, Base and BSC only, so it is offered only
there).
- - **GeckoTerminal**: the on-chain chart keyed by the token's most-liquid
- pool, resolved server-side via `GET /api/coin/pool` (below).
+ - **DEXTools** and **GeckoTerminal**: on-chain charts keyed by the token's
+ most-liquid pool rather than the token, resolved server-side via
+ `GET /api/coin/pool` (below). Each resolves the pool its own way
+ (`resolveChartPool()` in the shared module): GeckoTerminal is also asked
+ whether it has indexed that pool, because its embed is a 404 page until it
+ has, while DEXTools charts any pair it is handed. DEXTools is embedded
+ through its published `/widget-chart/` route only; its normal `/app/` pages
+ refuse framing and are used just for the "Open in DEXTools" link.
The picked source is remembered across coins and visits (localStorage
`tws_coin_chart_source`), and the embeds follow the site's light/dark theme.
Every embed URL shape lives once in
- [`src/shared/chart-embeds.js`](../src/shared/chart-embeds.js), so this page and
- the launch coin page `/launches/<mint>` build identical embeds and a provider
- changing its format is a one-file fix. Providers that refuse cross-origin
+ [`src/shared/chart-embeds.js`](../src/shared/chart-embeds.js), so this page,
+ the launch coin page `/launches/<mint>`, the `/trades` deep-dive and Mission
+ Control (the last two through the compact switcher in
+ [`src/shared/chart-switcher.js`](../src/shared/chart-switcher.js)) build
+ identical embeds and a provider changing its format is a one-file fix. Adding
+ a provider there adds its tab on all four surfaces. Providers that refuse cross-origin
framing or need a key are left out rather than offered as a tab that can only
fail.
@@ -544,7 +553,7 @@ All data is real and fetched at runtime — nothing is hardcoded or sampled:
| `/api/coin/detail` | CoinGecko `/coins/{id}` or `/coins/solana/contract/{mint}` (with community + developer blocks) | 60 s |
| `/api/coin/tickers` | CoinGecko `/coins/{id}/tickers` (exchange listings, ±2% depth) | 120 s |
| `/api/coin/ohlc` | CoinGecko `/coins/{id}/market_chart` | 120 s |
-| `/api/coin/pool` | GeckoTerminal top-pool lookup by token address (feeds the GeckoTerminal chart embed) | 60 s + 300 s CDN |
+| `/api/coin/pool` | Top-pool lookup by token address (feeds the pool-keyed chart embeds: DEXTools, GeckoTerminal) | 60 s + 300 s CDN |
| `/api/coin/markets` | CoinGecko `/coins/markets` (optional `category=`), `/search` | 60 s / 300 s |
| `/api/coin/categories` | CoinGecko `/coins/categories` | 300 s |
| `/api/coin/category` | CoinGecko `/coins/categories` (one category + rank + neighbours) | 600 s |
@@ -624,7 +633,7 @@ text before they reach the client.
| News archive | [`pages/news-archive.html`](../pages/news-archive.html) + [`src/news-archive.js`](../src/news-archive.js) |
| News engine + sources | [`api/_lib/news.js`](../api/_lib/news.js) + [`api/_lib/news-sources.js`](../api/_lib/news-sources.js), endpoints in [`api/news/`](../api/news) |
| Shared news renderers | [`src/shared/news-render.js`](../src/shared/news-render.js); table primitives in [`src/shared/market-table.js`](../src/shared/market-table.js) |
-| Shared chart embeds | [`src/shared/chart-embeds.js`](../src/shared/chart-embeds.js): the third-party embed URLs `/coin/:id` and `/launches/<mint>` both build from |
+| Shared chart embeds | [`src/shared/chart-embeds.js`](../src/shared/chart-embeds.js): the third-party embed URLs every chart surface builds from; [`src/shared/chart-switcher.js`](../src/shared/chart-switcher.js): the compact source switcher `/trades` and Mission Control mount |
| Shared design system | [`src/coin-pages.css`](../src/coin-pages.css) (Inter, Space Grotesk, JetBrains Mono self-hosted in `public/fonts/`) |
| Shared formatters | [`src/shared/coin-format.js`](../src/shared/coin-format.js) — unit-tested in [`tests/coin-format.test.js`](../tests/coin-format.test.js) |
| API proxies | [`api/coin/`](../api/coin): one file per `/api/coin/*` endpoint in the table above (`detail.js`, `ohlc.js`, `pool.js`, `markets.js`, `tickers.js`, `categories.js`, `category.js`, `exchanges.js`, `exchange.js`, `derivatives.js`, `rates.js`, `trending.js`, `global.js`, `fear-greed.js`, `gas.js`, `news.js`, `liquidations.js`) |
diff --git a/docs/terminal.md b/docs/terminal.md
index bc5d11c77..d0d4ded7c 100644
--- a/docs/terminal.md
+++ b/docs/terminal.md
@@ -15,7 +15,7 @@ Early pump.fun trading punishes context-switching. The launch is on one tab, the
The page mounts `mountMissionControl` from `src/mission-control/index.js` and lays out three panes:
- **Feed (left).** Three switchable sources. `live` is the new-mint and graduation firehose over Server-Sent Events (`/api/pump/trades-stream`). `signals` is the Coin Intelligence Engine's scored feed (`/api/pump/intel?view=feed`), each coin carrying a 0 to 100 `quality_score`, a verdict, and risk flags. `radar` is the pre-launch precursor stream (`/api/sniper/radar`).
-- **Focus (center).** The selected coin's identity and market state (`/api/pump/coin`), its candlestick chart (`/api/pump/price-history`, Birdeye then GeckoTerminal then pump.fun's own bonding-curve candles, with a last-good-candles degrade), the live trade tape (`/api/pump/dex-trades` polled every 8s for graduated pairs the stream misses), the firewall verdict, and the smart-money read.
+- **Focus (center).** The selected coin's identity and market state (`/api/pump/coin`), its candlestick chart (`/api/pump/price-history`, Birdeye then GeckoTerminal then pump.fun's own bonding-curve candles, with a last-good-candles degrade) with a source bar above it that swaps in the DexScreener, Birdeye, GMGN, DEXTools or GeckoTerminal chart for the same coin (mainnet only; the choice is remembered and shared with `/launches/<mint>` and `/trades`), the live trade tape (`/api/pump/dex-trades` polled every 8s for graduated pairs the stream misses), the firewall verdict, and the smart-money read.
- **Positions (right).** Your agent's open positions with streaming unrealized PnL over SSE (`/api/sniper/stream`, DB-polled every 1.5s), spot holdings (`/api/agents/:id/solana/holdings`, refreshed every 30s), and a one-tap quick exit.
Signed out, or signed in without an agent wallet, the cockpit stays fully readable: the feed, chart, security grid, and smart-money read all work, while the trade desk and the Positions pane say exactly what unlocks trading (sign in, or create an agent wallet) and the Positions connection pill reads idle instead of reconnecting. Token art is served through the same-origin `/api/img` proxy because the public IPFS gateways most launches use refuse direct browser requests. The top bar also hosts the language picker: on phones the site-wide floating picker would otherwise cover the Positions tab of the bottom pane switcher.
diff --git a/docs/trading-surfaces.md b/docs/trading-surfaces.md
index 3ead1d855..4c72d1560 100644
--- a/docs/trading-surfaces.md
+++ b/docs/trading-surfaces.md
@@ -70,7 +70,7 @@ The proof stream. The left rail is a public feed of closed positions where a pla
Click any trade (or paste any mint) and the center pane becomes a full analytics workstation for that coin:
-- Candlestick chart with live SSE updates, plus the bonding-curve widget
+- Candlestick chart with live SSE updates and a chart-source bar (DexScreener, Birdeye, GMGN, DEXTools, GeckoTerminal; see [coin pages](./coin-pages.md)), plus the bonding-curve widget
- Intel signal gauges (snipe ratio, top-10 concentration) and holder/cohort distribution
- The **funder bubblemap** — who funded the buying wallets, clustered
- Smart-money pedigree and a wallet-footprint table with Solscan links and DEV tags
diff --git a/pages/trades.html b/pages/trades.html
index b111c4a2c..838765e8d 100644
--- a/pages/trades.html
+++ b/pages/trades.html
@@ -39,6 +39,12 @@
<style>
:root {
+ /* The page palette. Every rule below reads these names, the same set the
+ sibling terminals (/smart-money, /oracle) define for themselves. */
+ --bg: #06070d; --panel: rgba(14,16,24,0.72); --line: rgba(255,255,255,0.09);
+ --fg: #e9edf6; --muted: #8b93a7; --faint: rgba(255,255,255,0.45); --cyan: #6ee7ff;
+ --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
+ --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
--tt-up: var(--success);
--tt-down: var(--danger);
--tt-warn: var(--warn);
@@ -53,6 +59,13 @@
--text-2xs: .6875rem; --text-sm: .764rem; --text-md: .8125rem; --duration-fast: 140ms; --duration-base: 260ms;
}
+ :root[data-theme='light'] {
+ --bg: #f6f7fb; --panel: rgba(255,255,255,0.82); --line: rgba(10,14,30,0.12);
+ --fg: #10131c; --muted: #4d556b; --faint: rgba(16,19,28,0.55); --cyan: #0e7490;
+ --success: #15803d; --danger: #b91c1c; --warn: #a16207;
+ }
+
+ html, body { background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
/* ── Shell ─────────────────────────────────────────────────────────────── */
diff --git a/public/changelog-recent.json b/public/changelog-recent.json
index 0822874f6..cdee6c599 100644
--- a/public/changelog-recent.json
+++ b/public/changelog-recent.json
@@ -1,14 +1,25 @@
{
- "generated_at": "2026-09-18T08:52:43.327Z",
+ "generated_at": "2026-09-18T08:56:35.788Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
"url": "https://three.ws"
},
- "total": 3705,
+ "total": 3707,
"complete": false,
"full_feed": "/changelog.json",
"entries": [
+ {
+ "date": "2026-09-18",
+ "type": "update",
+ "title": "Choose your chart everywhere a coin is charted, now including DEXTools",
+ "summary": "Every place three.ws draws a coin's price chart now lets you switch to the chart you trust. The Trade Terminal at /trades and Mission Control used to show only the platform's own live candles; both now have a source bar with DexScreener, Birdeye, GMGN, DEXTools and GeckoTerminal one click away, the same choice already offered on coin pages and launch pages. DEXTools is new on all four. Your pick is remembered and follows you from coin to coin, the bar works from the keyboard with the arrow keys, and each chart comes with a link that opens the same market on the provider's own site. If a provider cannot draw a coin yet, or its chart is blocked by your browser or network, you get a plain explanation with a retry and a working alternative instead of an empty box.",
+ "link": "/trades",
+ "tags": [
+ "feature",
+ "improvement"
+ ]
+ },
{
"date": "2026-09-18",
"type": "update",
@@ -53,6 +64,16 @@
"improvement"
]
},
+ {
+ "date": "2026-09-18",
+ "type": "update",
+ "title": "The Trade Terminal finally looks the way it was designed",
+ "summary": "The Trade Terminal at /trades was written against a set of colors and fonts that the page itself never defined, so browsers quietly fell back to their defaults: Times New Roman text, oversized controls and missing panel colors. The page now defines its own palette, in both dark and light themes, and renders as the dense, monospaced trading terminal it was meant to be.",
+ "link": "/trades",
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-09-17",
"type": "launch",
@@ -1598,28 +1619,6 @@
"fix",
"improvement"
]
- },
- {
- "date": "2026-09-08",
- "type": "update",
- "title": "Robinhood Portfolios can now show you what a basket would have done, and what the rebalancing did to it",
- "summary": "Every generated portfolio now comes with a backtest, and it runs the basket twice: once rebalanced on the schedule it published, and once left alone. The gap between those two lines is the whole reason to pick one schedule over another, and it goes both ways, since rebalancing quietly harvests the swings in a basket whose holdings move against each other and quietly gives up gains in one where a single holding keeps winning. Coverage is stated rather than glossed over: a holding with no price history is named and left out, the window shown is only the stretch where every remaining holding has real observations, and nothing is filled in to close a gap. Getting that history at all took some doing, because this chain keeps no price archive and produces about 864,000 blocks a day, so reading a month of prices back off the chain is not something a page can do while you wait. Tokenized stocks are covered from their price feeds going back weeks, and a nightly snapshot now records the whole market so coverage keeps growing for everything else, memecoins included. Sharing a portfolio also got fixed: a link now carries the portfolio itself rather than the sentence that produced it, so what you send is exactly what the other person opens, where before the wording was re-run and could quietly come back as a different basket. There is a new endpoint for checking that a portfolio document really is the one a portfolio was published under, and a client library for developers who want the market, the generator, the backtest and that check from their own code. Along the way two data bugs were fixed that were quietly under-reporting the market: the tokenized-stock board had been describing only a couple of tokens per batch instead of all thirty, and the price-history reads had been silently returning less history the more of it you asked for.",
- "link": "/markets/robinhood/portfolios",
- "tags": [
- "feature",
- "improvement"
- ]
- },
- {
- "date": "2026-09-08",
- "type": "update",
- "title": "Text to 3D no longer stops when our image storage does",
- "summary": "Turning a written prompt into a model takes one step you never see: we paint a reference picture of what you asked for, save it somewhere our sculpting engines can read, and hand them the link. If that save failed, the whole thing was over before a graphics card was ever asked for anything, and the error you got back was our storage provider's own wording about signatures and access keys, which told you nothing you could act on. Making a model from a photo you upload was unaffected, because it brings its own picture, so half the feature could look perfectly healthy while the other half was completely down. Our own engines never needed that saved copy: they accept the picture itself, sent along with the request. So when storage will not take the write, the reference view now travels inside the job and your model still gets built. The engines that genuinely need a link, the outside ones you can pick by name, now say so in plain language and point you at the ones still running, instead of failing with a message about our secret keys. Generations that take this route lose the extra angles we normally paint to fill in a subject's back, so they are built from the single front view.",
- "link": "/forge",
- "tags": [
- "fix",
- "improvement"
- ]
}
]
}
diff --git a/public/changelog.json b/public/changelog.json
index fe820a5f3..b9e62ad1b 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,11 +1,22 @@
{
- "generated_at": "2026-09-18T08:52:43.272Z",
+ "generated_at": "2026-09-18T08:56:35.750Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
"url": "https://three.ws"
},
"entries": [
+ {
+ "date": "2026-09-18",
+ "type": "update",
+ "title": "Choose your chart everywhere a coin is charted, now including DEXTools",
+ "summary": "Every place three.ws draws a coin's price chart now lets you switch to the chart you trust. The Trade Terminal at /trades and Mission Control used to show only the platform's own live candles; both now have a source bar with DexScreener, Birdeye, GMGN, DEXTools and GeckoTerminal one click away, the same choice already offered on coin pages and launch pages. DEXTools is new on all four. Your pick is remembered and follows you from coin to coin, the bar works from the keyboard with the arrow keys, and each chart comes with a link that opens the same market on the provider's own site. If a provider cannot draw a coin yet, or its chart is blocked by your browser or network, you get a plain explanation with a retry and a working alternative instead of an empty box.",
+ "link": "/trades",
+ "tags": [
+ "feature",
+ "improvement"
+ ]
+ },
{
"date": "2026-09-18",
"type": "update",
@@ -50,6 +61,16 @@
"improvement"
]
},
+ {
+ "date": "2026-09-18",
+ "type": "update",
+ "title": "The Trade Terminal finally looks the way it was designed",
+ "summary": "The Trade Terminal at /trades was written against a set of colors and fonts that the page itself never defined, so browsers quietly fell back to their defaults: Times New Roman text, oversized controls and missing panel colors. The page now defines its own palette, in both dark and light themes, and renders as the dense, monospaced trading terminal it was meant to be.",
+ "link": "/trades",
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-09-17",
"type": "launch",
diff --git a/public/changelog.xml b/public/changelog.xml
index 8a633394a..bfc75dd6a 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -6,6 +6,14 @@
<atom:link href="https://three.ws/changelog.xml" rel="self" type="application/rss+xml"/>
<description>What's new on three.ws: features, improvements, and releases, newest first.</description>
<language>en</language>
+ <item>
+ <title>Choose your chart everywhere a coin is charted, now including DEXTools</title>
+ <link>https://three.ws/trades</link>
+ <guid isPermaLink="false">2026-09-18:Choose your chart everywhere a coin is charted, now including DEXTools</guid>
+ <pubDate>Fri, 18 Sep 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>Every place three.ws draws a coin's price chart now lets you switch to the chart you trust. The Trade Terminal at /trades and Mission Control used to show only the platform's own live candles; both now have a source bar with DexScreener, Birdeye, GMGN, DEXTools and GeckoTerminal one click away, the same choice already offered on coin pages and launch pages. DEXTools is new on all four. Your pick is remembered and follows you from coin to coin, the bar works from the keyboard with the arrow keys, and each chart comes with a link that opens the same market on the provider's own site. If a provider cannot draw a coin yet, or its chart is blocked by your browser or network, you get a plain explanation with a retry and a working alternative instead of an empty box.</description>
+ </item>
<item>
<title>Granite Guardian now answers on three.ws, not just in the docs</title>
<link>https://three.ws/docs/ibm</link>
@@ -38,6 +46,14 @@
<category>feature</category>
<description>The $THREE page shows a live candle chart of the three / SOL pair, drawn by DEXTools. Below the platform's own buybacks there is a new section for the community's: the three DEXTools Social Boost prizes $THREE has won so far, $11,382 of buybacks in total, each with a link to its receipt on DEXTools. Social Boost ranks tokens by visits to their DEXTools page, so the section also links straight there. Every visit counts toward the next win.</description>
</item>
+ <item>
+ <title>The Trade Terminal finally looks the way it was designed</title>
+ <link>https://three.ws/trades</link>
+ <guid isPermaLink="false">2026-09-18:The Trade Terminal finally looks the way it was designed</guid>
+ <pubDate>Fri, 18 Sep 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>The Trade Terminal at /trades was written against a set of colors and fonts that the page itself never defined, so browsers quietly fell back to their defaults: Times New Roman text, oversized controls and missing panel colors. The page now defines its own palette, in both dark and light themes, and renders as the dense, monospaced trading terminal it was meant to be.</description>
+ </item>
<item>
<title>Agent Wallet Agreement</title>
<link>https://three.ws/legal/agent-wallet</link>
diff --git a/public/features.json b/public/features.json
index fd1620663..7157f4c87 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-09-18T08:52:43.245Z",
+ "generated_at": "2026-09-18T08:56:35.723Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/src/mission-control/focus.js b/src/mission-control/focus.js
index cc6dee8bf..647bba48d 100644
--- a/src/mission-control/focus.js
+++ b/src/mission-control/focus.js
@@ -22,7 +22,7 @@
import { createSafetyPanel } from '../shared/safety-panel.js';
import { proxiedImageURL } from '../ipfs.js';
-import { mountPriceChart } from './chart.js';
+import { mountSwitchableChart } from '../shared/chart-switcher.js';
import { mountTradesTape } from './trades-tape.js';
import { buy, sell, quote } from './trade.js';
import {
@@ -186,7 +186,7 @@ export function createFocusPane({ store, bus, enrich, mount }) {
teardownChart();
const host = $('[data-host="chart"]');
if (!host) return;
- chart = mountPriceChart({ host, mint });
+ chart = mountSwitchableChart({ host, mint, network: store.getNetwork() });
}
function mountTape(mint) {
diff --git a/src/shared/chart-switcher.js b/src/shared/chart-switcher.js
new file mode 100644
index 000000000..08b431b3f
--- /dev/null
+++ b/src/shared/chart-switcher.js
@@ -0,0 +1,269 @@
+// A token price chart with a source switcher, for surfaces that embed one chart
+// in a panel: /trades and the Mission Control focus pane.
+//
+// The default view is the platform's own live candle chart (TradingView's
+// lightweight-charts engine over our OHLCV, mounted by mission-control/chart.js).
+// Every provider in src/shared/chart-embeds.js is one tab away, so a trader who
+// trusts DEXTools or DexScreener reads the chart they trust without leaving.
+// /coin/:id and /launches/<mint> have richer, page-specific switchers built on
+// the same provider list; this is the compact one for everywhere else.
+//
+// The tab bar reuses the `.mc-chart-ivs` / `.mc-chart-iv` segmented-control
+// classes both host pages already style for the interval switcher, so it matches
+// each page's design system without a second set of theme rules.
+
+import { mountPriceChart } from '../mission-control/chart.js';
+import { chartEmbedsFor, chartEmbedUrls, resolveChartPool } from './chart-embeds.js';
+import { watchEmbed, embedFallbackNode, DEFAULT_EMBED_TIMEOUT_MS } from './embed-guard.js';
+
+// Shared with /launches/<mint>, which uses the same view ids: the chart a trader
+// picks is a viewing preference, so it follows them across coin surfaces.
+const VIEW_KEY = 'ld_chart_view';
+const CANDLES = { id: 'tradingview', label: 'TradingView', kind: 'candles' };
+
+const STYLE_ID = 'chart-switcher-style';
+const CSS = `
+.cs-root { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
+.cs-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
+.cs-tabs { flex-wrap: wrap; max-width: 100%; }
+.cs-open { font-size: .6875rem; font-weight: 600; color: inherit; opacity: .7; text-decoration: none; white-space: nowrap; transition: opacity 140ms; }
+.cs-open:hover, .cs-open:focus-visible { opacity: 1; text-decoration: underline; }
+.cs-frame-wrap { position: relative; overflow: hidden; border-radius: 8px; min-height: 420px; }
+@media (max-width: 640px) { .cs-frame-wrap { min-height: 340px; } }
+.cs-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 240ms ease; }
+.cs-ready .cs-frame { opacity: 1; }
+.cs-skel { position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, currentColor 8%, transparent) 50%, transparent 70%) 0 0 / 200% 100%, color-mix(in srgb, currentColor 5%, transparent); animation: cs-shimmer 1.4s linear infinite; }
+.cs-ready .cs-skel { display: none; }
+.cs-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; text-align: center; font-size: .8125rem; opacity: .85; }
+.cs-state p { margin: 0; max-width: 46ch; }
+.cs-state a { color: inherit; font-weight: 600; }
+.cs-state .mc-chart-iv { border: 1px solid color-mix(in srgb, currentColor 22%, transparent); padding: 5px 12px; }
+.cs-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
+@keyframes cs-shimmer { to { background-position: -200% 0, 0 0; } }
+@media (prefers-reduced-motion: reduce) { .cs-skel { animation: none; } .cs-frame { transition: none; } }
+`;
+
+function ensureStyle() {
+ if (document.getElementById(STYLE_ID)) return;
+ const style = document.createElement('style');
+ style.id = STYLE_ID;
+ style.textContent = CSS;
+ document.head.appendChild(style);
+}
+
+function node(tag, props = {}, children = []) {
+ const n = document.createElement(tag);
+ for (const [k, v] of Object.entries(props)) {
+ if (k === 'text') n.textContent = v;
+ else if (k.startsWith('on')) n.addEventListener(k.slice(2), v);
+ else n.setAttribute(k, v);
+ }
+ n.append(...children);
+ return n;
+}
+
+function readView(views) {
+ try {
+ const v = localStorage.getItem(VIEW_KEY);
+ if (views.some((view) => view.id === v)) return v;
+ } catch {
+ // Storage blocked: fall through to the default.
+ }
+ return CANDLES.id;
+}
+
+function currentTheme() {
+ return document.documentElement.getAttribute('data-theme') === 'light' ? 'light' : 'dark';
+}
+
+/**
+ * @param {object} opts
+ * @param {HTMLElement} opts.host
+ * @param {string} opts.mint Token address.
+ * @param {string} [opts.chain] A CHART_CHAINS id. Solana is the home chain.
+ * @param {'mainnet'|'devnet'} [opts.network] The providers index mainnet only,
+ * so on devnet the candle chart stands alone and no source bar is drawn.
+ * @returns {{ destroy(): void }}
+ */
+export function mountSwitchableChart({ host, mint, chain = 'solana', network = 'mainnet' }) {
+ ensureStyle();
+ const providers = network === 'mainnet' ? chartEmbedsFor(chain) : [];
+ const views = [CANDLES, ...providers.map((p) => ({ id: p.id, label: p.label, kind: 'embed', provider: p }))];
+ const pools = {}; // provider id → { pool, indexed }
+ let active = readView(views);
+ let teardown = null;
+ let seq = 0;
+ let destroyed = false;
+
+ const tabs = node('div', { class: 'mc-chart-ivs cs-tabs', role: 'tablist', 'aria-label': 'Chart source' });
+ const openSlot = node('span', { class: 'cs-open-slot' });
+ const viewHost = node('div', { class: 'cs-view' });
+ const buttons = views.map((view) =>
+ node('button', {
+ type: 'button',
+ class: 'mc-chart-iv',
+ role: 'tab',
+ 'data-view': view.id,
+ text: view.label,
+ onclick: () => select(view.id, { persist: true }),
+ }),
+ );
+ tabs.append(...buttons);
+ // Roving tabindex: arrows move between sources, Home/End jump to the ends.
+ tabs.addEventListener('keydown', (e) => {
+ const i = buttons.indexOf(document.activeElement);
+ if (i < 0) return;
+ const next = { ArrowRight: i + 1, ArrowLeft: i - 1, Home: 0, End: buttons.length - 1 }[e.key];
+ if (next == null) return;
+ e.preventDefault();
+ const target = buttons[(next + buttons.length) % buttons.length];
+ select(target.dataset.view, { persist: true });
+ target.focus();
+ });
+ // A switcher with one source is noise: draw the bar only when there is a choice.
+ const bar = views.length > 1 ? [node('div', { class: 'cs-bar' }, [tabs, openSlot])] : [];
+ host.replaceChildren(node('div', { class: 'cs-root' }, [...bar, viewHost]));
+
+ function select(id, { persist = false } = {}) {
+ if (id === active && teardown) return;
+ active = id;
+ if (persist) {
+ try {
+ localStorage.setItem(VIEW_KEY, id);
+ } catch {
+ // Storage blocked: the switch still holds for this page view.
+ }
+ }
+ render();
+ }
+
+ function clear() {
+ seq += 1;
+ try {
+ teardown?.();
+ } catch {
+ // The view already tore itself down.
+ }
+ teardown = null;
+ openSlot.replaceChildren();
+ }
+
+ function render() {
+ clear();
+ if (destroyed) return;
+ for (const b of buttons) {
+ const on = b.dataset.view === active;
+ b.setAttribute('aria-selected', String(on));
+ b.tabIndex = on ? 0 : -1;
+ }
+ const view = views.find((v) => v.id === active) || CANDLES;
+ if (view.kind === 'candles') {
+ const chart = mountPriceChart({ host: viewHost, mint });
+ teardown = () => chart.destroy();
+ return;
+ }
+ renderEmbed(view.provider, seq);
+ }
+
+ function statePanel(wrap, lines, actions) {
+ wrap.replaceChildren(
+ node('div', { class: 'cs-state', role: 'status' }, [
+ ...lines.map((text) => node('p', { text })),
+ node('div', { class: 'cs-actions' }, actions),
+ ]),
+ );
+ }
+
+ const actionBtn = (text, onclick) => node('button', { type: 'button', class: 'mc-chart-iv', text, onclick });
+
+ async function renderEmbed(provider, mySeq) {
+ // Taller than the candle chart's box on purpose: a provider's embed carries
+ // its own toolbars, and at the 240-300px the native chart uses they crowd
+ // out the candles.
+ const wrap = node('div', { class: 'cs-frame-wrap' }, [node('div', { class: 'cs-skel' })]);
+ viewHost.replaceChildren(wrap);
+ let cancelWatch = () => {};
+ teardown = () => cancelWatch();
+
+ let pool = null;
+ if (provider.needs === 'pool') {
+ try {
+ pools[provider.id] ||= await resolveChartPool(provider.id, chain, mint, { signal: AbortSignal.timeout(10_000) });
+ } catch {
+ if (mySeq !== seq) return;
+ statePanel(wrap, [`We could not look up this coin's trading pool for ${provider.label}.`], [actionBtn('Try again', render)]);
+ return;
+ }
+ if (mySeq !== seq) return;
+ if (!pools[provider.id].indexed) {
+ const alt = views.find((v) => v.kind === 'embed' && v.provider.needs === 'token');
+ statePanel(
+ wrap,
+ [`${provider.label} cannot chart this coin yet.`, 'It picks up new coins once they build trading history.'],
+ [
+ ...(alt ? [actionBtn(`Show ${alt.label}`, () => select(alt.id, { persist: true }))] : []),
+ actionBtn('Check again', () => {
+ delete pools[provider.id];
+ render();
+ }),
+ ],
+ );
+ return;
+ }
+ pool = pools[provider.id].pool;
+ }
+
+ const urls = chartEmbedUrls(provider.id, { chain, token: mint, pool, theme: currentTheme() });
+ openSlot.replaceChildren(
+ node('a', { class: 'cs-open', href: urls.page, target: '_blank', rel: 'noopener', text: `Open in ${provider.label} ↗` }),
+ );
+ const fail = () => {
+ cancelWatch();
+ if (mySeq !== seq) return;
+ wrap.classList.remove('cs-ready');
+ wrap.replaceChildren(
+ embedFallbackNode({
+ name: `The ${provider.label} chart`,
+ href: urls.page,
+ label: `Open in ${provider.label}`,
+ onRetry: render,
+ className: 'cs-state',
+ buttonClassName: 'mc-chart-iv',
+ }),
+ );
+ };
+ const iframe = node('iframe', {
+ class: 'cs-frame',
+ src: urls.embed,
+ title: `${provider.label} live chart`,
+ loading: 'lazy',
+ allow: 'clipboard-write; fullscreen',
+ referrerpolicy: 'strict-origin-when-cross-origin',
+ onload: () => {
+ cancelWatch();
+ wrap.classList.add('cs-ready');
+ },
+ onerror: fail,
+ });
+ cancelWatch = watchEmbed(wrap, { timeoutMs: DEFAULT_EMBED_TIMEOUT_MS, onTimeout: fail });
+ wrap.append(iframe);
+ }
+
+ // The iframe providers bake the theme in at load, so a live theme switch
+ // reloads whichever embed is showing. The candle view is left to chart.js.
+ const themeObserver = new MutationObserver(() => {
+ if (active !== CANDLES.id) render();
+ });
+ themeObserver.observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme'] });
+
+ render();
+
+ return {
+ destroy() {
+ destroyed = true;
+ themeObserver.disconnect();
+ clear();
+ host.replaceChildren();
+ },
+ };
+}
diff --git a/src/trades-detail.js b/src/trades-detail.js
index 9c04c1590..2a4ac00d0 100644
--- a/src/trades-detail.js
+++ b/src/trades-detail.js
@@ -23,7 +23,7 @@
* honest "unavailable" note — never a blank void, never a fake value.
*/
-import { mountPriceChart } from './mission-control/chart.js';
+import { mountSwitchableChart } from './shared/chart-switcher.js';
import { mountBondingCurve } from './widgets/bonding-curve.js';
import { mountBubblemap } from './trades-bubblemap.js';
import { mountTradeTape } from './trades-tape.js';
@@ -157,7 +157,7 @@ export function mountDetail(host, opts = {}) {
}
// ── live widgets mount immediately (they self-fetch) ──────────────────────────
- try { teardowns.push(mountPriceChart({ host: $('[data-host="chart"]'), mint })); } catch (e) { chartFail($('[data-host="chart"]')); }
+ try { teardowns.push(mountSwitchableChart({ host: $('[data-host="chart"]'), mint, network })); } catch (e) { chartFail($('[data-host="chart"]')); }
try { teardowns.push(mountBondingCurve($('[data-host="curve"]'), { mint, network, showPoweredBy: false })); } catch { /* curve optional */ }
try { teardowns.push(mountTradeTape($('[data-host="tape"]'), { mint })); } catch { /* tape optional */ }
diff --git a/tests/chart-embeds.test.js b/tests/chart-embeds.test.js
new file mode 100644
index 000000000..c5c4349fe
--- /dev/null
+++ b/tests/chart-embeds.test.js
@@ -0,0 +1,108 @@
+// The chart-source switchers on /coin/:id, /launches/<mint>, /trades and
+// Mission Control all build their third-party embeds from one provider list. Two
+// things in it are easy to break without any page visibly failing until a user
+// picks the tab:
+// - DEXTools only allows framing on its /widget-chart/ route. Its /app/ pages
+// answer X-Frame-Options: SAMEORIGIN, so an embed URL that drifts to /app/ is
+// a permanently blank frame.
+// - Pool-keyed providers resolve their pool differently. GeckoTerminal must
+// confirm it indexed the pool (its embed is a 404 page otherwise); DEXTools
+// must NOT inherit that gate, or it goes dark for every young coin
+// GeckoTerminal has not listed.
+import { describe, it, expect, vi, afterEach } from 'vitest';
+import {
+ CHART_CHAINS,
+ CHART_EMBEDS,
+ chartEmbedsFor,
+ chartEmbedUrls,
+ resolveChartPool,
+} from '../src/shared/chart-embeds.js';
+
+const THREE = 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump';
+const POOL = 'THREEsyntheticPool11111111111111111111111111';
+
+function mockFetch(routes) {
+ const calls = [];
+ vi.stubGlobal('fetch', async (url) => {
+ calls.push(String(url));
+ const hit = Object.entries(routes).find(([prefix]) => String(url).startsWith(prefix));
+ if (!hit) throw new Error(`unexpected fetch ${url}`);
+ const { status = 200, body = {} } = hit[1];
+ return { status, ok: status >= 200 && status < 300, json: async () => body };
+ });
+ return calls;
+}
+
+afterEach(() => vi.unstubAllGlobals());
+
+describe('chart embed providers', () => {
+ it('offers DEXTools on every chain the platform charts, Solana included', () => {
+ for (const chain of Object.keys(CHART_CHAINS)) {
+ expect(chartEmbedsFor(chain).map((p) => p.id)).toContain('dextools');
+ }
+ });
+
+ it('every pool-keyed provider carries its own pool resolver', () => {
+ for (const p of CHART_EMBEDS.filter((x) => x.needs === 'pool')) {
+ expect(typeof p.resolvePool).toBe('function');
+ }
+ });
+
+ it('embeds DEXTools through the frameable widget route, never an /app/ page', () => {
+ const urls = chartEmbedUrls('dextools', { chain: 'solana', token: THREE, pool: POOL, theme: 'light' });
+ const embed = new URL(urls.embed);
+ expect(embed.origin).toBe('https://www.dextools.io');
+ expect(embed.pathname).toBe(`/widget-chart/en/solana/pe-light/${POOL}`);
+ expect(embed.searchParams.get('theme')).toBe('light');
+ expect(urls.embed).not.toContain('/app/');
+ expect(urls.page).toBe(`https://www.dextools.io/app/solana/pair-explorer/${POOL}`);
+ });
+
+ it("uses DEXTools' own chain slugs, which differ from every other provider's", () => {
+ const evm = '0x' + 'a'.repeat(40);
+ const slugOf = (chain) =>
+ new URL(chartEmbedUrls('dextools', { chain, token: evm, pool: evm }).embed).pathname.split('/')[3];
+ expect(slugOf('ethereum')).toBe('ether');
+ expect(slugOf('binance-smart-chain')).toBe('bnb');
+ expect(slugOf('base')).toBe('base');
+ });
+
+ it('returns null for a pool provider until the pool is known', () => {
+ expect(chartEmbedUrls('dextools', { chain: 'solana', token: THREE })).toBeNull();
+ expect(chartEmbedUrls('geckoterminal', { chain: 'solana', token: THREE })).toBeNull();
+ });
+});
+
+describe('resolveChartPool', () => {
+ it('DEXTools charts the top pool without asking GeckoTerminal whether it indexed it', async () => {
+ const calls = mockFetch({ '/api/coin/pool': { body: { pool: POOL } } });
+ await expect(resolveChartPool('dextools', 'solana', THREE)).resolves.toEqual({ pool: POOL, indexed: true });
+ expect(calls).toHaveLength(1);
+ expect(calls[0]).toContain(`address=${THREE}`);
+ expect(calls[0]).toContain('network=solana');
+ });
+
+ it('GeckoTerminal reports a pool it has not indexed as not drawable', async () => {
+ mockFetch({
+ '/api/coin/pool': { body: { pool: POOL } },
+ 'https://api.geckoterminal.com/': { status: 404 },
+ });
+ await expect(resolveChartPool('geckoterminal', 'solana', THREE)).resolves.toEqual({ pool: POOL, indexed: false });
+ });
+
+ it('a coin with no pool is a normal answer, not an error', async () => {
+ mockFetch({ '/api/coin/pool': { status: 404 } });
+ await expect(resolveChartPool('dextools', 'solana', THREE)).resolves.toEqual({ pool: null, indexed: false });
+ });
+
+ it('an upstream failure rejects so the UI can offer a retry', async () => {
+ mockFetch({ '/api/coin/pool': { status: 502 } });
+ await expect(resolveChartPool('dextools', 'solana', THREE)).rejects.toThrow(/pool lookup 502/);
+ });
+
+ it('a token-keyed provider needs no pool', async () => {
+ const calls = mockFetch({});
+ await expect(resolveChartPool('dexscreener', 'solana', THREE)).resolves.toEqual({ pool: null, indexed: false });
+ expect(calls).toHaveLength(0);
+ });
+});