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(x402): land the runway simulation and coin-intel page work from this worktree

nirholas077e0c7e5e7e
diff --git a/api/_lib/x402/runway-sim.js b/api/_lib/x402/runway-sim.js
index f4f729ae0..6d646c462 100644
--- a/api/_lib/x402/runway-sim.js
+++ b/api/_lib/x402/runway-sim.js
@@ -230,7 +230,11 @@ export function simulateRunway(input = {}) {
refusedFloor,
refusedGovernor,
demanded,
- admissionRate: demanded > 0 ? admitted / demanded : 1,
+ // Null, not 1, when nothing was attempted. "100% admitted" over zero
+ // attempts is the arithmetic of an empty set dressed up as a health
+ // signal, and it is exactly what let a wallet sitting under its hard
+ // floor render as a healthy rail.
+ admissionRate: demanded > 0 ? admitted / demanded : null,
firstRefusalHour,
floorBreachHour,
startLamports: Math.max(0, int(input.startLamports)),
@@ -240,7 +244,7 @@ export function simulateRunway(input = {}) {
settlesPerDay: settledDays,
steadySettlesPerDay: steadyStateSettlesPerDay(settledDays),
limiter: limiterOf({ refusedFloor, refusedGovernor, admitted, demandPerHour, hours }),
- verdict: verdictOf({ admitted, refused, refusedFloor }),
+ verdict: verdictOf({ admitted, refused, refusedFloor, demanded }),
truncated,
hoursSimulated: series.length,
},
@@ -265,7 +269,13 @@ function limiterOf({ refusedFloor, refusedGovernor, admitted, demandPerHour, hou
return 'none';
}
-function verdictOf({ admitted, refused, refusedFloor }) {
+// A projection with no attempts in it has not proved anything about the rail,
+// so it gets its own verdict rather than inheriting `healthy` by default. An
+// idle rail and a working rail are different states, and conflating them is how
+// a fee wallet under its hard floor came to be reported as healthy: zero demand
+// meant zero refusals, and zero refusals read as success.
+function verdictOf({ admitted, refused, refusedFloor, demanded }) {
+ if (demanded === 0) return 'idle';
if (admitted === 0 && refused > 0) return 'starved';
if (refusedFloor > 0) return 'starved';
if (refused > 0) return 'throttled';
diff --git a/api/x402/runway-lab.js b/api/x402/runway-lab.js
index c4f037941..f689f6cbb 100644
--- a/api/x402/runway-lab.js
+++ b/api/x402/runway-lab.js
@@ -155,7 +155,15 @@ async function observeWindow() {
// Real arrival rate, so the projection starts from measured demand rather
// than a guess. Duplicates are excluded: they are retries of a settle that
// already landed, not new demand on the rail.
- demand_per_hour: Math.round(capacityAttempts / WINDOW_HOURS),
+ //
+ // A rail that took fewer than 12 settles in 24 hours still took traffic, so
+ // the rate is clamped to 1 rather than rounded to 0. Reporting zero demand
+ // for a live-but-quiet rail is not a rounding artefact the caller can
+ // recover from: it reads as "nobody is paying", which is a different
+ // diagnosis entirely.
+ demand_per_hour: capacityAttempts > 0
+ ? Math.max(1, Math.round(capacityAttempts / WINDOW_HOURS))
+ : 0,
refusals: refusalList,
};
}
diff --git a/data/changelog.json b/data/changelog.json
index d8f57f3c9..ab83de812 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -24294,6 +24294,16 @@
"fix"
],
"link": "/play"
+ },
+ {
+ "date": "2026-08-17",
+ "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.",
+ "tags": [
+ "fix",
+ "improvement"
+ ],
+ "link": "/create-agent"
}
]
}
diff --git a/pages/coin-intel.html b/pages/coin-intel.html
index a2bea47e1..164e5d54b 100644
--- a/pages/coin-intel.html
+++ b/pages/coin-intel.html
@@ -231,8 +231,11 @@
.ci-drawer .close { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--ci-border); background: rgba(255,255,255,0.05); color: var(--ci-text); cursor: pointer; font-size: 16px; line-height: 1; z-index: 2; }
.ci-drawer .close:hover { background: rgba(255,255,255,0.12); }
.d-head { display: flex; gap: 14px; align-items: center; padding-right: 36px; }
+ /* Without min-width:0 this flex child keeps its content's width, so a long
+ unbroken coin name slid straight under the close button at narrow widths. */
+ .d-head > div { min-width: 0; }
.d-head .avatar { width: 58px; height: 58px; border-radius: 14px; background: #15171f; object-fit: cover; border: 1px solid var(--ci-border); flex-shrink: 0; }
- .d-head .name { font-family: var(--font-display, sans-serif); font-size: 20px; font-weight: 600; line-height: 1.1; }
+ .d-head .name { font-family: var(--font-display, sans-serif); font-size: 20px; font-weight: 600; line-height: 1.1; overflow-wrap: anywhere; }
.d-head .sym { font-family: var(--font-mono, monospace); font-size: 13px; color: var(--ci-neutral); margin-top: 3px; }
.d-section { margin-top: 22px; }
.d-section > h4 { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ci-faint); margin: 0 0 11px; font-weight: 600; }