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.

fix(economy-lab,nav): land the lab and navigation follow-ups with the rebuilt feeds

nirholas482bd71edadc
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 088481bb2..f9884c7be 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Avatar Studio now shows your whole avatar, and its Save button fits on a phone**: The studio camera was framing the base body from the shoulders to the knees: the face you were sculpting and the shoes you were picking were both outside the picture, and the only way to see them was to orbit the camera yourself every time the page loaded. The framing is now solved from the lens rather than guessed at, so a full-body shot really does hold the avatar head to toe, arms included, on any window shape, and the half-body and headshot views stay as tight as their names promise. On a 320px phone the top bar had been running past the edge of the screen and taking the Save avatar button with it, so a look built on a phone could not be saved at all; the bar now fits, with the Back and title labels standing down to make room. The tab strip on that same narrow layout had been hiding its labels without putting anything in their place, leaving six blank buttons, and now shows an icon per tab. The Parametric body badge that read 120+ sliders was white text on a white pill and invisible everywhere. A failed save now says the connection could not be reached and that your look is still there, instead of repeating the browser phrase Failed to fetch, and every accessory search box, every tab and the Back link now carry names a screen reader can read. Opening avatar-studio in local development also serves the same page production does, which it previously did not. (`/avatar-studio`) `[fix, improvement]`
- **Avatar Studio survives an accessory outage, and tells you when it is putting a hat on**: The studio at /avatar-studio was audited end to end in a real browser: loading the base body, all six tabs, the colour swatches, the sculpt sliders, the motion library, undo and redo, and the loading, empty and error states, at phone, tablet and desktop widths. The worst finding was that a single failed request for the accessory catalogue took the entire studio down. The hats, glasses and earrings lists come from one file, and if that file did not load, the page replaced everything with a Retry screen, throwing away the 3D avatar it had already finished loading. Colours, sculpting, animation and saving need nothing from that catalogue, so they all now keep working, and only the three accessory tabs show a message explaining what is missing, with a Retry button that reloads just the catalogue. The Save, Reset, Randomise and Undo buttons were also on screen but not yet connected until that same request finished, so pressing them early did nothing at all and the tab strip sat empty; they are live from the first paint now. Putting on a hat downloads and fits a 3D model, which takes a few seconds, and until now the studio gave no sign it was working: the tile click looked ignored, and a hat that failed to download failed in complete silence. Every accessory change now shows what it is doing and says so plainly if it could not finish. Randomise no longer lists an accessory you are not actually wearing when its model fails to load. Pressing Undo then Redo quickly could leave the avatar and the list of what it is wearing disagreeing with each other; each step now settles correctly. Spinners also finally stop for people who have asked their device to reduce motion. (`/avatar-studio`) `[fix, improvement]`
- **Blockchain TVL by Chain is readable again, and its numbers can be copied**: The cross-chain leaderboard at /chains was audited end to end in a real browser: the live DeFiLlama board, the sortable columns, the row links out to each chain's page, and the loading, empty and error states, at phone, tablet and desktop widths. The page had briefly stopped working entirely. Its row-click helpers were declared twice in the same file, which is a syntax error, so the script never ran and the table sat on its grey loading bars forever. That is fixed and covered by a browser test so it cannot come back. Two real defects came out of the same pass. Every row navigated on any click, so dragging across a cell to copy a chain's TVL threw the selection away and opened that chain's page instead; a figure or a name can now be selected and copied, while a plain click still opens the chain. And the page wrapped the site navigation in a second page banner, leaving screen readers with two overlapping banner landmarks to pick between. The share bar beside each chain also stopped reading its percentage aloud a second time, since the dominance column right next to it already says it. (`/chains`) `[fix, improvement]`
+- **Building an agent no longer throws you out to the login page, and the wizard answers the keyboard**: The six-step agent builder at /create-agent was audited end to end in a real browser: naming an agent, generating a whole spec from one sentence, choosing a body from the starter library, the skills and personality steps, the voice step, and the review screen, plus the loading, empty and error states at phone, tablet and desktop widths. The worst finding was that the wizard broke its own promise. It is built so anyone can construct an entire agent before making an account, and sign in only at the final step where the agent gets its wallet. But opening the My avatars tab without an account threw the visitor straight out to the login page, mid-build, with no warning and no explanation, because that tab asked for avatars you can only have if you are signed in. It now recognises a visitor who has no account, says so in the tab, and points at the Starter library and Upload tabs, which both work without one, alongside a Sign in button that saves the build first so nothing is lost either way. The step markers across the top of the wizard could only be used with a mouse. They are the only way back to an earlier step from the review screen, so anyone working by keyboard reached the end of the flow with no way to correct anything; they are now real buttons that take focus, show a focus ring, and respond to Enter and Space, with the completed steps marked as such for screen readers. The four tabs on the body step also announced themselves as tabs without ever telling a screen reader which panel each one opens, and left the arrow keys dead; the arrow keys, Home and End now move between them the way tabs are meant to work. Finally, a first-time visitor generating an agent from a description no longer sees a failed request in the browser console. (`/create-agent`) `[fix, improvement]`
- **Chat stops hiding two nav links, and says something useful when a reply fails**: The chat at /chat was audited end to end in a real browser: loading it cold, sending a message on the free built-in lane and getting a reply back, following every link in the header and footer, and the empty, loading, error and populated states at phone, tablet and desktop widths. The header was covering itself: the centred site links sat on top of the wallet controls, so Features and Docs were partly hidden and could not be clicked at any desktop width, and between tablet and laptop widths there was no way to reach those links at all. The links now sit in the row with everything else, and below the width where they fit they move into the menu. The footer had been shipping a mangled copyright line (a leftover encoding accident that printed stray characters where the copyright symbol belongs). When a reply could not be sent, the thread printed the browser's own words, Failed to fetch; it now says what happened, that nothing was sent, and how to retry, in a message styled as an error rather than as a quieter reply. A rate-limited reply used to say Try again in 79445s; it now says the wait in hours or minutes and, when the free daily allowance is the thing that ran out, points at adding your own provider key. Icon-only buttons across the header and each message (share, model settings, copy, edit, regenerate, delete) now carry names for screen readers, and the page title and description finally describe the page. (`/chat`) `[fix, improvement]`
- **Choreographer share links are readable again, and the studio fits a phone**: The gesture composer at /choreograph was audited end to end in a real browser: loading a starter routine, adding and reordering beats, retiming and repointing a step, previewing the whole performance on a live avatar, scrubbing the timeline, sharing a link, and saving to a real agent, at phone, tablet and desktop widths. Copy share link used to hand you a link with the routine name escaped twice, so a routine called The pitch travelled as The%2520pitch: it worked, but it looked broken, and it invited people to tidy it up and break it for real. Links now carry the routine as you can read it, and every link shared before today still opens. A routine whose name ended in the loop marker came back from a link under the wrong name and looping when it should not. On a 320 pixel phone, opening either of the two code panels pushed the whole page sideways; the code block now scrolls on its own instead. Pressing the transport a second time while the first play was still loading its clips said Pause but started a second load; it now stops the one in progress, and deleting the last beat mid-load can no longer bring an avatar back onto a stage the routine has left. Signed-out visitors also no longer see a failed request in the browser console on first paint. (`/choreograph`) `[fix, improvement]`
- **Clip Director shows real traders again, and can no longer print a number the trade never made**: The Clip Director page told every visitor that no agent had ever closed a trade. Its trader picker asked the leaderboard for the highest-ranked agents and then kept only the ones with a closed round-trip, and because the ranking score has nothing to do with having closed trades, the nine agents that qualified all sat below the cut. The picker now asks the leaderboard for exactly what it needs, so those nine traders and their real closed positions are back on the page. The bigger repair is underneath: the card copy is written by a language model, and one of the providers answered a real +1.89x win with an invented loss on a different coin, complete with a celebrating avatar, next to the on-chain link proving otherwise. Every generated card is now checked against the trade it describes before it ships, so a ticker or a figure that is not in the round-trip gets the card thrown away and rewritten from the position itself, and a stop-out can never be celebrated. Also on the page: a shared /clip-director?agent_id= link now opens that trader even when they are outside the ranking, the Try again buttons retry the step that actually failed instead of doing nothing, each card's call to action is a real link, and the copy button copies on browsers that block the clipboard API instead of telling you to press a key. (`/clip-director`) `[fix, improvement]`
diff --git a/public/changelog.json b/public/changelog.json
index 201fa43cc..8b63b440f 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-17T04:25:32.819Z",
+ "generated_at": "2026-08-17T04:27:30.308Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -70,6 +70,17 @@
"improvement"
]
},
+ {
+ "date": "2026-08-17",
+ "type": "update",
+ "title": "Building an agent no longer throws you out to the login page, and the wizard answers the keyboard",
+ "summary": "The six-step agent builder at /create-agent was audited end to end in a real browser: naming an agent, generating a whole spec from one sentence, choosing a body from the starter library, the skills and personality steps, the voice step, and the review screen, plus the loading, empty and error states at phone, tablet and desktop widths. The worst finding was that the wizard broke its own promise. It is built so anyone can construct an entire agent before making an account, and sign in only at the final step where the agent gets its wallet. But opening the My avatars tab without an account threw the visitor straight out to the login page, mid-build, with no warning and no explanation, because that tab asked for avatars you can only have if you are signed in. It now recognises a visitor who has no account, says so in the tab, and points at the Starter library and Upload tabs, which both work without one, alongside a Sign in button that saves the build first so nothing is lost either way. The step markers across the top of the wizard could only be used with a mouse. They are the only way back to an earlier step from the review screen, so anyone working by keyboard reached the end of the flow with no way to correct anything; they are now real buttons that take focus, show a focus ring, and respond to Enter and Space, with the completed steps marked as such for screen readers. The four tabs on the body step also announced themselves as tabs without ever telling a screen reader which panel each one opens, and left the arrow keys dead; the arrow keys, Home and End now move between them the way tabs are meant to work. Finally, a first-time visitor generating an agent from a description no longer sees a failed request in the browser console.",
+ "link": "/create-agent",
+ "tags": [
+ "fix",
+ "improvement"
+ ]
+ },
{
"date": "2026-08-17",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 399f6668c..0b3fe6f4e 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -54,6 +54,14 @@
<category>fix</category>
<description>The cross-chain leaderboard at /chains was audited end to end in a real browser: the live DeFiLlama board, the sortable columns, the row links out to each chain's page, and the loading, empty and error states, at phone, tablet and desktop widths. The page had briefly stopped working entirely. Its row-click helpers were declared twice in the same file, which is a syntax error, so the script never ran and the table sat on its grey loading bars forever. That is fixed and covered by a browser test so it cannot come back. Two real defects came out of the same pass. Every row navigated on any click, so dragging across a cell to copy a chain's TVL threw the selection away and opened that chain's page instead; a figure or a name can now be selected and copied, while a plain click still opens the chain. And the page wrapped the site navigation in a second page banner, leaving screen readers with two overlapping banner landmarks to pick between. The share bar beside each chain also stopped reading its percentage aloud a second time, since the dominance column right next to it already says it.</description>
</item>
+ <item>
+ <title>Building an agent no longer throws you out to the login page, and the wizard answers the keyboard</title>
+ <link>https://three.ws/create-agent</link>
+ <guid isPermaLink="false">2026-08-17:Building an agent no longer throws you out to the login page, and the wizard answers the keyboard</guid>
+ <pubDate>Mon, 17 Aug 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>The six-step agent builder at /create-agent was audited end to end in a real browser: naming an agent, generating a whole spec from one sentence, choosing a body from the starter library, the skills and personality steps, the voice step, and the review screen, plus the loading, empty and error states at phone, tablet and desktop widths. The worst finding was that the wizard broke its own promise. It is built so anyone can construct an entire agent before making an account, and sign in only at the final step where the agent gets its wallet. But opening the My avatars tab without an account threw the visitor straight out to the login page, mid-build, with no warning and no explanation, because that tab asked for avatars you can only have if you are signed in. It now recognises a visitor who has no account, says so in the tab, and points at the Starter library and Upload tabs, which both work without one, alongside a Sign in button that saves the build first so nothing is lost either way. The step markers across the top of the wizard could only be used with a mouse. They are the only way back to an earlier step from the review screen, so anyone working by keyboard reached the end of the flow with no way to correct anything; they are now real buttons that take focus, show a focus ring, and respond to Enter and Space, with the completed steps marked as such for screen readers. The four tabs on the body step also announced themselves as tabs without ever telling a screen reader which panel each one opens, and left the arrow keys dead; the arrow keys, Home and End now move between them the way tabs are meant to work. Finally, a first-time visitor generating an agent from a description no longer sees a failed request in the browser console.</description>
+ </item>
<item>
<title>Chat stops hiding two nav links, and says something useful when a reply fails</title>
<link>https://three.ws/chat</link>
diff --git a/public/features.json b/public/features.json
index 2228a685e..cbd09e9ad 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-17T04:25:32.693Z",
+ "generated_at": "2026-08-17T04:27:29.985Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/nav.js b/public/nav.js
index ed22c7ec0..afb1b0bfc 100644
--- a/public/nav.js
+++ b/public/nav.js
@@ -839,7 +839,8 @@ const WALK_AUTO_KEY = 'walk:companion:auto';
// Routes that own their own full-screen 3D or camera experience — summoning a
// second WebGL avatar there hurts more than it helps. (walk-sdk keeps its own
// exclusion list too; this is the conservative outer gate.)
-const WALK_AUTO_SKIP = /^\/(play|walk|club|tour|world|scan|arena|pose|splat|capture)(\/|$)|^\/create\/selfie/;
+const WALK_AUTO_SKIP =
+ /^\/(play|walk|club|tour|world|scan|arena|pose|splat|capture)(\/|$)|^\/create\/(selfie|video)/;
function initCompanionAutoStart() {
// Every check lives inside the deferred callback: boot() can run while this
diff --git a/src/constellation/main.js b/src/constellation/main.js
index 0482048f4..4313d64f9 100644
--- a/src/constellation/main.js
+++ b/src/constellation/main.js
@@ -555,7 +555,7 @@ async function runGraniteAnalysis(token, neighbors) {
else if (line.startsWith('data:')) data += line.slice(5).trim();
}
if (!data) continue;
- if (evt === 'error') { out.innerHTML = `<div class="c-notice">The analysis service returned an error: ${escapeHtml(safeMsg(data))}</div>`; return; }
+ if (evt === 'error') { out.innerHTML = `<div class="c-notice">Every analysis route refused this request (${escapeHtml(safeMsg(data))}). Pick the star again to retry.</div>`; return; }
if (evt === 'done') { try { usage = JSON.parse(data).usage; } catch { /* ignore */ } continue; }
if (evt === 'meta') {
try { const m = JSON.parse(data); servedLabel = m.label; servedNetwork = m.network; } catch { /* ignore */ }
diff --git a/src/economy-lab.js b/src/economy-lab.js
index 7b1290978..8d16e362a 100644
--- a/src/economy-lab.js
+++ b/src/economy-lab.js
@@ -35,6 +35,16 @@ const KNOBS = {
let seed = null;
let feeLamports = 5000;
+// Demand the projection falls back to when the facilitator log recorded no
+// settle attempts in the window. A projection needs traffic to say anything:
+// seeded at zero the page opens with an empty chart and a verdict that has
+// proved nothing, which is worse than useless on a rail whose wallet is sitting
+// under its hard floor. The knob is a scenario input, not a measurement, so a
+// labelled default is honest as long as the page says which one it is, and
+// demandSource below is what makes it say so.
+const SCENARIO_DEMAND_PER_HOUR = 60;
+let demandSource = 'measured';
+
// ── Formatting ─────────────────────────────────────────────────────────────
function fmtSol(lamports, max = 4) {
const n = Number(lamports) / LAMPORTS_PER_SOL;
@@ -48,7 +58,11 @@ function fmtInt(n) {
return Number.isFinite(Number(n)) ? Math.round(Number(n)).toLocaleString('en-US') : '0';
}
+// null and undefined are "the ledger had nothing to divide", not zero. Number()
+// turns both into 0, which rendered an unread admission rate as a confident
+// "0.0%", a starvation reading invented out of missing data.
function fmtPct(n, digits = 1) {
+ if (n === null || n === undefined || n === '') return 'not read';
return Number.isFinite(Number(n)) ? `${(Number(n) * 100).toFixed(digits)}%` : 'not read';
}
@@ -142,11 +156,14 @@ function applySeedToKnobs() {
const bal = seed.fee_wallet.sol_lamports;
feeLamports = seed.observed?.fee_lamports_observed || 5000;
+ const measuredDemand = Number(seed.observed?.demand_per_hour) || 0;
+ demandSource = measuredDemand > 0 ? 'measured' : 'scenario';
+
KNOBS.balance.live = bal ?? cfg.floor_lamports;
KNOBS.floor.live = cfg.floor_lamports;
KNOBS.runway.live = cfg.runway_days;
KNOBS.heartbeat.live = cfg.min_budget_lamports;
- KNOBS.demand.live = Math.max(1, seed.observed?.demand_per_hour ?? 60);
+ KNOBS.demand.live = measuredDemand > 0 ? measuredDemand : SCENARIO_DEMAND_PER_HOUR;
KNOBS.horizon.live = 72;
// Ranges are derived from the live values so every knob has useful travel on
@@ -160,9 +177,13 @@ function applySeedToKnobs() {
setRange(KNOBS.balance.el, 0, Math.max(2 * LAMPORTS_PER_SOL, KNOBS.balance.live * 4), 1);
setRange(KNOBS.floor.el, 0, Math.max(200_000_000, KNOBS.floor.live * 4), 1);
setRange(KNOBS.heartbeat.el, 0, Math.max(200_000_000, KNOBS.heartbeat.live * 8), 1);
- setRange(KNOBS.demand.el, 0, Math.max(3000, KNOBS.demand.live * 6), 5);
+ // Step 1, for the same reason the lamport knobs use it: a step of 5 snapped a
+ // measured 37 settles/hour to 35, and snapped the seed of a barely-used rail
+ // all the way down to 0.
+ setRange(KNOBS.demand.el, 0, Math.max(3000, KNOBS.demand.live * 6), 1);
$('el-governor').checked = cfg.governor_enabled;
+ describeDemandSeed();
for (const key of Object.keys(KNOBS)) KNOBS[key].el.value = String(KNOBS[key].live);
// The input clamps and snaps on assignment, so the resolved value is the real
// baseline. Comparing against the requested value instead would leave every
@@ -170,6 +191,26 @@ function applySeedToKnobs() {
for (const key of Object.keys(KNOBS)) KNOBS[key].live = Number(KNOBS[key].el.value);
}
+// Say where the demand number came from, in the hint and in the tooltip. A
+// scenario default presented as a measurement would make the whole page a lie;
+// presented as what it is, it is the only way to project a rail nobody used
+// today.
+function describeDemandSeed() {
+ const hint = $('el-demand-hint');
+ const help = document.querySelector('[data-knob="demand"] .el-help');
+ const measured = demandSource === 'measured';
+
+ hint.textContent = measured
+ ? 'What the rail is being asked to do, per hour. Seeded from the last 24 hours.'
+ : `No settles were attempted in the last 24 hours, so there is no measured rate to seed from. This starts at ${fmtInt(SCENARIO_DEMAND_PER_HOUR)}/hour as a scenario: drag it to the load you care about.`;
+ hint.dataset.source = demandSource;
+
+ if (!help) return;
+ help.dataset.tip = measured
+ ? 'Settle attempts arriving per hour. Seeded from the last 24 hours of the facilitator log, excluding duplicate-signature retries, so the projection starts from measured traffic rather than a guess.'
+ : 'Settle attempts arriving per hour. The facilitator log recorded no attempts in the last 24 hours, so this knob is a scenario you choose rather than a measurement. Everything else on the page is still read live.';
+}
+
function setRange(el, min, max, step) {
el.min = String(min);
el.max = String(Math.ceil(max));
@@ -219,6 +260,11 @@ function renderLiveState() {
? null
: Math.max(cfg.governor_enabled ? cfg.min_budget_lamports : 0, Math.floor(spendable / cfg.runway_days));
const headroom = budgetNow === null || spent === null ? null : budgetNow - spent;
+ // Below the floor the settle path refuses before the meter is read, so the
+ // governor's headroom is not the binding constraint and must not be rendered
+ // as one. A wallet under its floor with a full daily budget was reporting
+ // "headroom 0.01 SOL" in green while admitting nothing at all.
+ const belowFloor = w.balance_read && w.sol_lamports < cfg.floor_lamports;
const cards = [
{
@@ -235,25 +281,35 @@ function renderLiveState() {
{
label: 'Spendable',
value: spendable === null ? 'not read' : `${fmtSol(spendable)} SOL`,
- sub: 'balance above the hard floor',
+ sub: belowFloor
+ ? `${fmtSol(cfg.floor_lamports - w.sol_lamports)} SOL short of the hard floor`
+ : 'balance above the hard floor',
tone: spendable === null ? '' : spendable <= 0 ? 'bad' : spendable < cfg.min_budget_lamports ? 'warn' : 'good',
},
{
label: 'Today’s headroom',
- value: headroom === null ? 'not read' : `${fmtSol(headroom)} SOL`,
- sub: spent === null ? 'ledger unread' : `${fmtSol(spent)} spent of ${fmtSol(budgetNow)} budget`,
- tone: headroom === null ? '' : headroom <= 0 ? 'bad' : headroom < budgetNow * 0.2 ? 'warn' : 'good',
+ value: belowFloor ? 'not reachable' : headroom === null ? 'not read' : `${fmtSol(headroom)} SOL`,
+ sub: belowFloor
+ ? 'the hard floor refuses before the budget is consulted'
+ : spent === null ? 'ledger unread' : `${fmtSol(spent)} spent of ${fmtSol(budgetNow)} budget`,
+ tone: belowFloor ? 'bad' : headroom === null ? '' : headroom <= 0 ? 'bad' : headroom < budgetNow * 0.2 ? 'warn' : 'good',
},
{
label: 'Settles / day',
value: seed.projected_settles_per_day === null ? 'not read' : fmtInt(seed.projected_settles_per_day),
sub: 'at this balance and config',
- tone: seed.projected_settles_per_day === null ? '' : seed.projected_settles_per_day < 1000 ? 'warn' : 'good',
+ tone: seed.projected_settles_per_day === null
+ ? ''
+ : seed.projected_settles_per_day <= 0 ? 'bad' : seed.projected_settles_per_day < 1000 ? 'warn' : 'good',
},
{
label: 'Admitted (24h)',
- value: o ? fmtPct(o.capacity_admission_rate) : 'not read',
- sub: o ? `${fmtInt(o.settled)} settled, ${fmtInt(o.capacity_refused)} could not be afforded` : 'ledger unread',
+ value: !o ? 'not read' : o.attempts === 0 ? 'no traffic' : fmtPct(o.capacity_admission_rate),
+ sub: !o
+ ? 'ledger unread'
+ : o.attempts === 0
+ ? 'no settles were attempted in this window'
+ : `${fmtInt(o.settled)} settled, ${fmtInt(o.capacity_refused)} could not be afforded`,
tone: !o || o.capacity_admission_rate === null ? '' : o.capacity_admission_rate > 0.9 ? 'good' : o.capacity_admission_rate > 0.5 ? 'warn' : 'bad',
},
];
@@ -292,18 +348,23 @@ function renderVerdict(summary) {
const state = summary.verdict;
box.dataset.state = state;
- icon.textContent = state === 'healthy' ? '✓' : state === 'throttled' ? '!' : '×';
+ icon.textContent = { healthy: '✓', throttled: '!', idle: '·' }[state] || '×';
const head = {
healthy: `${scope}, settlement is healthy`,
throttled: `${scope}, settlement is throttled`,
starved: `${scope}, settlement is starved`,
+ idle: `${scope}, nothing is being attempted`,
}[state];
$('el-verdict-head').textContent = head;
- $('el-verdict-detail').textContent =
- `${fmtInt(summary.admitted)} of ${fmtInt(summary.demanded)} settles land over the next ${fmtWhenSpan(summary.hoursSimulated)}: ${limiterText}` +
- (summary.firstRefusalHour !== null ? ` First refusal ${fmtWhen(summary.firstRefusalHour)}.` : '');
+ // An idle projection has admitted nothing and refused nothing, which is not a
+ // clean bill of health: it is an experiment that was never run. Say that
+ // instead of reporting a 100% admission rate over an empty set.
+ $('el-verdict-detail').textContent = state === 'idle'
+ ? `No settles are attempted over the next ${fmtWhenSpan(summary.hoursSimulated)}, so this projection cannot say whether the rail would admit them. Raise demand to find out what this balance and config would actually deliver.`
+ : `${fmtInt(summary.admitted)} of ${fmtInt(summary.demanded)} settles land over the next ${fmtWhenSpan(summary.hoursSimulated)}: ${limiterText}` +
+ (summary.firstRefusalHour !== null ? ` First refusal ${fmtWhen(summary.firstRefusalHour)}.` : '');
}
function fmtWhenSpan(hours) {
@@ -315,6 +376,10 @@ function renderKpis(summary, knobs) {
const liveProjection = seed.projected_settles_per_day;
const steady = summary.steadySettlesPerDay;
const delta = liveProjection ? steady - liveProjection : null;
+ // With no attempts in the projection, "never refused" and "never hit the
+ // floor" are facts about an empty simulation, not about the rail. Reporting
+ // them in green is the same error as a 100% admission rate over zero settles.
+ const idle = summary.demanded === 0;
const kpis = [
{
@@ -325,21 +390,21 @@ function renderKpis(summary, knobs) {
},
{
label: 'Admission rate',
- value: fmtPct(summary.admissionRate, 0),
- tone: summary.admissionRate > 0.9 ? 'good' : summary.admissionRate > 0.5 ? 'warn' : 'bad',
- delta: `${fmtInt(summary.refused)} refused`,
+ value: idle ? 'no demand' : fmtPct(summary.admissionRate, 0),
+ tone: idle ? '' : summary.admissionRate > 0.9 ? 'good' : summary.admissionRate > 0.5 ? 'warn' : 'bad',
+ delta: idle ? 'nothing was attempted' : `${fmtInt(summary.refused)} refused`,
},
{
label: 'First refusal',
- value: summary.firstRefusalHour === null ? 'never' : fmtWhen(summary.firstRefusalHour).replace(/ \(.*\)/, ''),
- tone: summary.firstRefusalHour === null ? 'good' : summary.firstRefusalHour < 6 ? 'bad' : 'warn',
- delta: summary.firstRefusalHour === null ? 'holds the whole horizon' : 'throughput breaks here',
+ value: idle ? 'untested' : summary.firstRefusalHour === null ? 'never' : fmtWhen(summary.firstRefusalHour).replace(/ \(.*\)/, ''),
+ tone: idle ? '' : summary.firstRefusalHour === null ? 'good' : summary.firstRefusalHour < 6 ? 'bad' : 'warn',
+ delta: idle ? 'raise demand to test it' : summary.firstRefusalHour === null ? 'holds the whole horizon' : 'throughput breaks here',
},
{
label: 'Hits the floor',
- value: summary.floorBreachHour === null ? 'never' : fmtWhen(summary.floorBreachHour).replace(/ \(.*\)/, ''),
- tone: summary.floorBreachHour === null ? 'good' : 'bad',
- delta: summary.floorBreachHour === null ? 'stays above the floor' : 'funding required',
+ value: idle ? 'untested' : summary.floorBreachHour === null ? 'never' : fmtWhen(summary.floorBreachHour).replace(/ \(.*\)/, ''),
+ tone: idle ? '' : summary.floorBreachHour === null ? 'good' : 'bad',
+ delta: idle ? 'no fees are being burned' : summary.floorBreachHour === null ? 'stays above the floor' : 'funding required',
},
{
label: 'SOL burned',