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(exit-lab): raise 49 undersized touch targets and end the dead search button and blank corpus-failure sections
nirholas1cf394c4b957
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex c2ccc1ad6..45c7c7c0e 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -15,6 +15,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Buttons that looked dead now respond, and the whole site paints from one palette**: A consistency pass across the platform. Fifty controls set the clickable cursor but had no hover styling at all, so the pointer changed shape and the button did not, which made working controls read as broken; the marketplace, Widget Studio, the brain workspace, the pump dashboard, agent detail and the on-chain deploy panel now all answer under the pointer, on the same timing. The retry buttons on an agent page were the worst case, because they only appear after something already failed. Separately, 73 colours were still typed in by hand across 24 stylesheets instead of coming from the shared palette, which is why a handful of panels stayed dark when you switched to the light theme and why some captions drifted a shade off everywhere else; they now all read from one source. Eight standalone pages that had quietly grown their own private palette (the demos, Widget Studio, the dashboard sub-pages, the print insert, agent detail) were folded back onto the shared one, so they also pick up the site-wide keyboard focus ring and the reduced-motion setting for the first time. Two new checks keep both from creeping back. (`/marketplace`) `[improvement, fix]`- **Every button on Drive Your Avatar is reachable again, by mouse and by keyboard**: Two things were quietly breaking the controls on Drive Your Avatar. The gesture tray grew up the right-hand edge until it sat on top of the HUD column beside it, so Photo, Record, Map and the help button silently stopped taking clicks; the tray now keeps to the lower band and wraps into a second column instead of climbing into the buttons. Separately, pressing Enter anywhere on the page jumped straight to the chat box, which meant a keyboard user could tab to any control and never activate it. Enter now belongs to whatever you have focused, and only opens chat when you are looking at the scene. Along the way: the radar moved off the crowded bottom edge on phones, the chat box no longer pushes its send button off a narrow screen, the avatar list tells you when it could not load instead of always saying you are signed out, and the coin-world picker closes on Escape. (`/temporary`) `[fix, improvement]`- **Every tutorial now shows you the page it is teaching**: Twenty screenshots of the real product had been captured for the tutorials and then never put on the page: the tutorials described the Forge, Avatar Studio, Voice Lab, Scene Studio, Widget Studio and the rest entirely in words, while the pictures sat unused. All twenty are now embedded where they belong, each with a caption and a link straight to the live page, so you can see what you are about to open before you open it. The sign-language reference gained its two figures as well, and the missing Scene Studio capture was taken. (`/tutorials/text-to-3d`) `[docs, improvement]`+- **Exit Lab is usable with a thumb, and it no longer goes quiet when the trade corpus is missing**: A full audit of the Exit Lab console found 49 controls below the 44px touch floor on a phone: the 18px help dots, the 16px-tall policy sliders and the agent link on every row of the trade table were all but untappable. All of them are now full-size targets on touch devices, and the desktop layout keeps its density. Two dead ends went with them. The Run the search button used to sit there live and answer a click with nothing when no trades had loaded; it is now disabled and says which of the two reasons applies. And when the corpus fails to load, the attribution, trade-by-trade and search sections say so instead of leaving three headings over blank space, with the trade table stuck announcing itself as still loading forever. (`/exit-lab`) `[fix, improvement]`- **Forge tells you when uploads are down, instead of blaming your connection**: Adding a photo on the Forge could fail with "Network error during upload" when nothing was wrong with your network or your photo. Our asset storage had stopped accepting our credential, but the page had no way to know that: the browser is handed a short-lived upload address and sends the image straight to storage, and when storage refuses, the refusal comes back without the header a browser needs in order to show the page what happened. So a platform outage arrived looking exactly like a bad phone signal, and Retry could never fix it. The page now checks that storage will actually accept an upload before handing one out, and says so plainly when it will not, so you can tell "come back in a few minutes" apart from "try a different photo". The same fix covers the Forge Studio and 3D print upload paths. (`/forge`) `[fix]`- **Launch Studio reads in light mode, and a recipe's reward routing now reaches the launch**: Launch Studio, the catalog of 50 coin-launch recipes, was written entirely in white text and never flipped for the light theme, so on a light background its title, its recipe cards and its preview drawer were white on white with a dark strip painted across the top. The whole surface now draws from the site's colour system and reads in both themes. The bigger fix sits behind the Launch this coin button: every reward recipe promises that a coin's creator fees route to its subject, and that choice was being dropped the moment you left the studio, so the launch form opened with no recipient at all. The routing now travels with the coin, shows on the launch form before you mint, and opens the fee split pre-filled with that recipient the moment the coin is live, ready to review and sign. Two planner options no launch could ever apply were removed rather than left promising a payout. The preview drawer also behaves as a real dialog now: focus moves into it, Tab stays inside it, and closing it returns you to the card you opened. (`/launch-studio`) `[fix, improvement]`- **Pages stop jumping around while they load**: Three separate things were shifting the layout under you. The marketplace hero rotates through featured avatars every few seconds and wrote each one's name and description into boxes sized to whatever the previous one had been, so the buttons, the dots and the entire grid below moved on every rotation, forever; both boxes now hold the same space whichever avatar is showing. The helper cards that float in the bottom-right corner slid themselves up and out of the way by animating their position, which the browser counts as the page moving even though nothing on the page did; they glide now instead. And the prompt tip under the forge box appeared a moment after the page did, pushing the quality options and the Generate button down; it is there from the first frame. (`/marketplace`) `[fix, improvement]`diff --git a/data/changelog.json b/data/changelog.jsonindex 4fac417d7..93739543d 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -27244,6 +27244,16 @@"docs"],"link": "/docs/agent-vitals"+ },+ {+ "date": "2026-09-08",+ "title": "Exit Lab is usable with a thumb, and it no longer goes quiet when the trade corpus is missing",+ "summary": "A full audit of the Exit Lab console found 49 controls below the 44px touch floor on a phone: the 18px help dots, the 16px-tall policy sliders and the agent link on every row of the trade table were all but untappable. All of them are now full-size targets on touch devices, and the desktop layout keeps its density. Two dead ends went with them. The Run the search button used to sit there live and answer a click with nothing when no trades had loaded; it is now disabled and says which of the two reasons applies. And when the corpus fails to load, the attribution, trade-by-trade and search sections say so instead of leaving three headings over blank space, with the trade table stuck announcing itself as still loading forever.",+ "tags": [+ "fix",+ "improvement"+ ],+ "link": "/exit-lab"}]}diff --git a/docs/exit-lab.md b/docs/exit-lab.mdindex 98d18a904..47d47721d 100644--- a/docs/exit-lab.md+++ b/docs/exit-lab.md@@ -223,6 +223,26 @@ to the nearest legal one rather than throwing.---+## When the corpus is not there++Every section of the console is derived from `/api/sniper/exit-lab`, so the page+has three honest states beside the populated one and reaches all of them from+real conditions rather than a flag:++| Condition | What the page does |+|---|---|+| The request is in flight | The verdict card shows a skeleton of the layout that is coming, the results and trades regions carry `aria-busy`, and the search says what it is waiting for. |+| The request fails, or the handler answers `503 corpus_unavailable` | The results card states the reason the endpoint gave and offers **Try again**, which re-runs the same fetch. The attribution, per-trade and search sections say the corpus did not load rather than sitting empty under a heading. |+| The corpus loads with no replayable position | The page says so and points at the [agent arena](https://three.ws/play/arena) and the [sniper docs](https://three.ws/docs/agent-sniper), which are the two places the first trade becomes visible. |++**Run the search** is disabled until a corpus with at least one replayable trade+is loaded, and its `title` says which of the two reasons applies. The search+replays the corpus in the browser, so with no corpus there is nothing for it to+do, and a live button that answers a click with silence is worse than a disabled+one that explains itself.++---+## Related- [Agent Sniper](agent-sniper.md), the worker whose positions this replaysdiff --git a/prompts/finish/137-swarm-100-route-exit-lab.md b/prompts/finish/137-swarm-100-route-exit-lab.mddeleted file mode 100644index 200fb234b..000000000--- a/prompts/finish/137-swarm-100-route-exit-lab.md+++ /dev/null@@ -1,119 +0,0 @@-# Route audit: /exit-lab (Exit Lab)--How to run: paste this file's repo path into a fresh Claude Code chat in this-repository and say "run this work order". This file is fully self-contained:-it depends on no other prompt file anywhere. If sibling swarm-100 files in-prompts/finish/ are gone, that work is done; if present, ignore them.-Every claim below rots; step 0 re-measures, and what you measure wins.--## Operating clause (binding)--- Read CLAUDE.md first. Its rules override everything, including this file.-- Finish 100% in this session. Never end the turn with a question, an option- list, or an unexecuted plan. A judgment call goes in one line of the final- report; it never becomes a question that halts work.-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real- funds or any irreversible on-chain write, git push or a production deploy,- committing content that references a crypto project other than $THREE, and- destroying unrecoverable data.-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no- commented-out code. Real APIs and real integrations only.-- The em-dash and en-dash characters are banned in everything you write.-- Concurrent agents share this worktree: stage explicit paths only (never a- bare add-everything), and commit finished work promptly.-- Before committing, run: npm run check:rules -- --paths <files you touched>.- It must exit 0.--## Step 0: re-derive the current state--1. This route's declared entry (path, description, added date):-- node -e "const p=require('./data/pages.json');for(const s of p.sections)for(const g of s.pages)if(g.path==='/exit-lab')console.log(JSON.stringify(g,null,2))"--2. Find the serving implementation: grep "/exit-lab" in vercel.json (the live- route table server/index.mjs boots from), then list matching files in- pages/ and src/. STRUCTURE.md maps every surface to its directory if the- grep is ambiguous.-3. Production right now:-- curl -so /dev/null -w '%{http_code}\n' https://three.ws/exit-lab--4. Start (or reuse) the local dev server: npm run dev (vite, port 3000).--## Task: audit this one route end to end, then fix everything found--Route: /exit-lab ("Exit Lab", section "crypto").-Declared purpose: Replay the fleet's real closed trades under a different exit policy. Move the stop-loss, trailing stop, take-initials ladder and moon-bag floor and see what the SOL already spent would have returned.--Drive the page in a real headless browser. Playwright is already a dev-dependency; keep your probe script in the session scratchpad, never in the-repo.--1. Load http://localhost:3000/exit-lab. Record the HTTP status, every console- error and warning, and every failed network request.-2. Exercise it like a first-time user: click the primary actions, run the- primary flow if one exists, follow the page's internal links. Every button- must do something real; every link must resolve. If the page renders data,- prove in the network log that it came from a live endpoint, not a baked-in- fallback array.-3. States: verify populated, empty, loading, and error states are designed and- reachable. Block the page's primary fetch in Playwright and confirm an- actionable error state appears, not a blank void or a raw exception.-4. Responsive: render at 320, 768, and 1440 px. No horizontal page scroll, no- overlapping or clipped controls.-5. Accessibility basics: one h1; interactive elements are real buttons or- links with visible focus states; images carry alt text; form fields have- labels.-6. Head: a specific title tag and meta description that match the declared- purpose above.-7. Fix every defect at its root in the page's real source files and re-run the- probe until clean. Defects in shared modules are in scope when this route- exercises them.--## Definition of done--- [ ] Local load of /exit-lab: HTTP 200, zero console errors, zero unhandled- failed requests (a third-party outage must land in a designed fallback,- not a broken page).-- [ ] No dead interactive element on the page: no stub href="#", no button- without a handler, no link to a missing path.-- [ ] Empty, loading, error, and populated states verified.-- [ ] 320 / 768 / 1440 px renders verified clean.-- [ ] Title and meta description present and specific.-- [ ] npm test passes; npm run check:rules -- --paths <touched files> exits 0.-- [ ] Production status from step 0 recorded in the report; if production- needs a deploy to pick up a fix, the report says so (deploys stay- owner-gated).--## Never blocked--| Blocker | Resolution (act, do not ask) |-|---|---|-| Missing env var or credential | Check .env and .env.local, then the Cloud Run service env, then Secret Manager (the CLAUDE.md self-unblock playbook has the exact commands). If it truly exists nowhere, wire the code fully behind the env var, prove the wiring with a dry run, and name the single missing var in the report. |-| gcloud not on PATH | Run: export PATH="$HOME/google-cloud-sdk/bin:$PATH" |-| Dev server port 3000 busy | Another agent may be serving this repo; probe it and reuse if so. Otherwise start your own on a free port: npx vite --port 3101 |-| Playwright browser missing | npx playwright install chromium |-| A surface needs a signed-in user | Register a fresh account through the real /register flow against the real API and use it. Never mock the session. |-| A defect sits in code you did not touch | Fix it if it blocks a Definition of done line (root cause it, never mask it). Otherwise note it in the report and continue. |-| An unrelated test is red | Same rule. Never pipe npm test through tail; it masks exit codes. |--## Close out (required)--1. Verify every Definition of done line with the actual command output in- front of you. Never claim a line you did not verify.-2. Commit with explicit paths and a subject that describes the diff (house- style: type(scope): what changed and why a reader cares).-3. Delete this prompt file in that same commit:-- git rm prompts/finish/137-swarm-100-route-exit-lab.md-- The shrinking directory is this campaign's only progress ledger; there is- no progress log to update.-4. Final report: what step 0 measured, what changed (file list), evidence per- Definition of done line, and any one-line judgment calls. No trailing- questions, no unexecuted plans.--If a line genuinely cannot pass inside this session (an external party must-respond, or an owner-gated action is the final step), finish everything else,-leave this file in place, and state exactly which line remains and who owns-it. Never delete this file on a partial.diff --git a/public/changelog-recent.json b/public/changelog-recent.jsonindex e6fa42d57..dff6eab1a 100644--- a/public/changelog-recent.json+++ b/public/changelog-recent.json@@ -1,11 +1,11 @@{- "generated_at": "2026-09-08T19:08:16.148Z",+ "generated_at": "2026-09-08T21:34:12.155Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws","url": "https://three.ws"},- "total": 3572,+ "total": 3573,"complete": false,"full_feed": "/changelog.json","entries": [@@ -107,6 +107,17 @@"improvement"]},+ {+ "date": "2026-09-08",+ "type": "update",+ "title": "Exit Lab is usable with a thumb, and it no longer goes quiet when the trade corpus is missing",+ "summary": "A full audit of the Exit Lab console found 49 controls below the 44px touch floor on a phone: the 18px help dots, the 16px-tall policy sliders and the agent link on every row of the trade table were all but untappable. All of them are now full-size targets on touch devices, and the desktop layout keeps its density. Two dead ends went with them. The Run the search button used to sit there live and answer a click with nothing when no trades had loaded; it is now disabled and says which of the two reasons applies. And when the corpus fails to load, the attribution, trade-by-trade and search sections say so instead of leaving three headings over blank space, with the trade table stuck announcing itself as still loading forever.",+ "link": "/exit-lab",+ "tags": [+ "fix",+ "improvement"+ ]+ },{"date": "2026-09-08","type": "update",@@ -1589,17 +1600,6 @@"tags": ["feature"]- },- {- "date": "2026-09-03",- "type": "update",- "title": "Live Trading Theater: the tape opens full and the connection light tells the truth",- "summary": "The theater got a pass over every state it can be in. The connection light in the top bar used to say Connecting for the whole visit even after the live feed had connected seconds earlier, because the page's translation pass ran last and put the placeholder wording back; it now reports the connection it actually has, and the same fix stops the sound button telling a screen reader the sound is off while it is on. The Live tape used to be a blank column until something happened on-chain: it now opens seeded with real recent activity, shows placeholder rows while that is loading, and says what it is waiting for when the feed is genuinely quiet. A slow roster response no longer dumps you straight onto the error card; the page tries again with more room and says it is still assembling. Recent-activity entries that had nowhere to link are plain text now instead of links that went nowhere, and the ones that do link to a three.ws page stay in your tab instead of opening a new one. The nameplates over each 3D trader were invisible to screen readers even though they are the only keyboard route into a trader's wallet and reputation panel; they are now reachable, and every remaining control on the page has a visible focus ring.",- "link": "/theater",- "tags": [- "fix",- "improvement"- ]}]}diff --git a/public/changelog.json b/public/changelog.jsonindex 0a538b9a0..d1159b3d6 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-09-08T19:08:16.107Z",+ "generated_at": "2026-09-08T21:34:12.086Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -104,6 +104,17 @@"improvement"]},+ {+ "date": "2026-09-08",+ "type": "update",+ "title": "Exit Lab is usable with a thumb, and it no longer goes quiet when the trade corpus is missing",+ "summary": "A full audit of the Exit Lab console found 49 controls below the 44px touch floor on a phone: the 18px help dots, the 16px-tall policy sliders and the agent link on every row of the trade table were all but untappable. All of them are now full-size targets on touch devices, and the desktop layout keeps its density. Two dead ends went with them. The Run the search button used to sit there live and answer a click with nothing when no trades had loaded; it is now disabled and says which of the two reasons applies. And when the corpus fails to load, the attribution, trade-by-trade and search sections say so instead of leaving three headings over blank space, with the trade table stuck announcing itself as still loading forever.",+ "link": "/exit-lab",+ "tags": [+ "fix",+ "improvement"+ ]+ },{"date": "2026-09-08","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 20a544530..b32a70270 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -78,6 +78,14 @@<category>docs</category><description>Twenty screenshots of the real product had been captured for the tutorials and then never put on the page: the tutorials described the Forge, Avatar Studio, Voice Lab, Scene Studio, Widget Studio and the rest entirely in words, while the pictures sat unused. All twenty are now embedded where they belong, each with a caption and a link straight to the live page, so you can see what you are about to open before you open it. The sign-language reference gained its two figures as well, and the missing Scene Studio capture was taken.</description></item>+ <item>+ <title>Exit Lab is usable with a thumb, and it no longer goes quiet when the trade corpus is missing</title>+ <link>https://three.ws/exit-lab</link>+ <guid isPermaLink="false">2026-09-08:Exit Lab is usable with a thumb, and it no longer goes quiet when the trade corpus is missing</guid>+ <pubDate>Tue, 08 Sep 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>A full audit of the Exit Lab console found 49 controls below the 44px touch floor on a phone: the 18px help dots, the 16px-tall policy sliders and the agent link on every row of the trade table were all but untappable. All of them are now full-size targets on touch devices, and the desktop layout keeps its density. Two dead ends went with them. The Run the search button used to sit there live and answer a click with nothing when no trades had loaded; it is now disabled and says which of the two reasons applies. And when the corpus fails to load, the attribution, trade-by-trade and search sections say so instead of leaving three headings over blank space, with the trade table stuck announcing itself as still loading forever.</description>+ </item><item><title>Forge tells you when uploads are down, instead of blaming your connection</title><link>https://three.ws/forge</link>diff --git a/public/features.json b/public/features.jsonindex a5938a15a..6b91a1136 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-09-08T19:08:16.079Z",+ "generated_at": "2026-09-08T21:34:12.041Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/src/exit-lab.css b/src/exit-lab.cssindex 8f489f61a..3ac98c7dd 100644--- a/src/exit-lab.css+++ b/src/exit-lab.css@@ -967,3 +967,79 @@.xl-param-label:hover { color: var(--color-accent); }.xl-range:hover:not([disabled]) { transform: scaleY(1.3); }.xl-toggle:hover { color: var(--color-text); }++/* ── touch targets ─────────────────────────────────────────────────────────+ Measured on a Pixel 5 with scripts/mobile-touch-audit.mjs: the console shipped+ 49 controls under the 44px WCAG 2.5.5 floor, and the two worst were the ones+ the page is actually built around. The 18px help dot and the 16px-tall drag+ track are unusable with a thumb, and the per-trade agent links stacked 25 rows+ of 20px targets. Raised only where the pointer is coarse, so the desktop+ console keeps its density. */+@media (hover: none) and (pointer: coarse) {+ .xl-btn,+ .xl-chip {+ min-height: 44px;+ }++ .xl-btn-small {+ min-width: 44px;+ }++ /* The help dot keeps its 1.15rem look and grows its hit box to 44px: the+ circle moves to a pseudo-element so the button box can be a plain+ transparent square around it. */+ .xl-help {+ position: relative;+ width: 44px;+ height: 44px;+ border-color: transparent;+ }++ .xl-help::before {+ content: '';+ position: absolute;+ top: 50%;+ left: 50%;+ width: 1.15rem;+ height: 1.15rem;+ transform: translate(-50%, -50%);+ border: 1px solid var(--color-border);+ border-radius: var(--radius-pill);+ transition: border-color var(--duration-fast) var(--ease-standard);+ }++ .xl-help[aria-expanded='true']::before {+ border-color: var(--color-border-strong);+ }++ /* A 44px head row also makes each range's own <label> clear the floor, which+ is what turns tapping the label into a way to reach the slider. */+ .xl-param-head {+ min-height: 44px;+ margin-bottom: 0;+ }++ .xl-range {+ height: 44px;+ }++ .xl-toggle {+ min-height: 44px;+ }++ .xl-toggle input {+ width: 22px;+ height: 22px;+ }++ .xl-coin-agent,+ .xl-proof a {+ display: inline-flex;+ align-items: center;+ min-height: 44px;+ }++ .xl-proof a {+ padding: 0 var(--space-2);+ }+}diff --git a/src/exit-lab.js b/src/exit-lab.jsindex 55be5d66d..9fbd79f06 100644--- a/src/exit-lab.js+++ b/src/exit-lab.js@@ -295,10 +295,16 @@ function curvePath(series, w, h) {};}+/** Mark a live region busy exactly while the corpus is in flight. */+function setBusy(el, busy) {+ if (busy) el.setAttribute('aria-busy', 'true');+ else el.removeAttribute('aria-busy');+}+function renderResults() {const el = $('xl-results');if (!el) return;- el.removeAttribute('aria-busy');+ setBusy(el, !state.corpus && !state.error);if (state.error) {el.innerHTML = `<div class="xl-state xl-state-error" role="alert">@@ -408,7 +414,13 @@ function renderReasons() {if (!el) return;const r = state.current;if (!r || r.trades === 0) {- el.innerHTML = '';+ // A heading over an empty div reads as a broken section. Say why it is+ // empty, in the same words the results card is already using.+ el.innerHTML = state.error+ ? `<p class="xl-note">Attribution needs the corpus, and the corpus did not load.</p>`+ : state.corpus+ ? `<p class="xl-note">Nothing to attribute yet: no closed position in the corpus is replayable.</p>`+ : '';return;}const rows = exitReasons()@@ -435,11 +447,41 @@ function renderReasons() {// ── the grid search ──────────────────────────────────────────────────────────+/**+ * The search can only run against a loaded corpus. Keeping the button live with+ * nothing behind it makes a click answer with silence, so the button states what+ * it is waiting for instead.+ */+function syncSweepAvailability() {+ const btn = $('xl-sweep-run');+ if (!btn) return;+ const ready = (state.corpus?.trades?.length ?? 0) > 0;+ btn.disabled = !ready;+ if (ready) btn.removeAttribute('title');+ else btn.setAttribute('title', state.error ? 'The trade corpus did not load' : 'No replayable trades to search yet');+}+function renderSweepIdle() {const el = $('xl-sweep');if (!el) return;+ syncSweepAvailability();const combos = Object.values(SWEEP_AXES).reduce((acc, g) => acc * g.length, 1);+ if (state.error) {+ el.innerHTML = `<p class="xl-note">The search replays the corpus locally, so it has nothing to search until+ the corpus loads. Retry it above and this section comes back.</p>`;+ return;+ }+ if (!state.corpus) {+ el.innerHTML = `<p class="xl-note">Waiting on the corpus. The search unlocks as soon as the fleet's closed+ trades land, then compares ${combos.toLocaleString()} policies against every one of them.</p>`;+ return;+ }const trades = state.current?.trades ?? 0;+ if (!trades) {+ el.innerHTML = `<p class="xl-note">The search needs closed positions to replay. It unlocks with the first+ replayable trade, then compares ${combos.toLocaleString()} policies against every one of them.</p>`;+ return;+ }el.innerHTML = `<p class="xl-note">${combos.toLocaleString()} policies against ${trades.toLocaleString()} realtrades, replayed exactly. Nothing is sampled and nothing is estimated.</p>`;}@@ -539,8 +581,8 @@ async function runSweep() {};renderSweepResults();if (btn) {- btn.disabled = false;btn.textContent = 'Run the search again';+ syncSweepAvailability();}}@@ -551,10 +593,14 @@ const TRADE_LIMIT = 25;function renderTrades() {const el = $('xl-trades');if (!el) return;- el.removeAttribute('aria-busy');+ setBusy(el, !state.corpus && !state.error);const r = state.current;if (!r || !r.rows.length) {- el.innerHTML = '';+ el.innerHTML = state.error+ ? `<p class="xl-note">Per-trade rows need the corpus, and the corpus did not load.</p>`+ : state.corpus+ ? `<p class="xl-note">No replayable trade to list yet. The first closed position fills this table.</p>`+ : '';return;}const meta = new Map((state.corpus?.trades || []).map((t) => [t.mint, t]));@@ -700,7 +746,12 @@ function recompute() {async function load() {state.error = null;state.corpus = null;+ state.current = null;+ state.sweep = null;renderResults();+ renderReasons();+ renderTrades();+ renderSweepIdle();try {const res = await fetch(CORPUS_URL, { headers: { accept: 'application/json' } });const body = await res.json().catch(() => null);@@ -717,6 +768,9 @@ async function load() {state.error = err?.message || 'the request failed';renderPill();renderResults();+ renderReasons();+ renderTrades();+ renderSweepIdle();renderHonesty();}}@@ -728,6 +782,7 @@ function init() {renderControls();bindControls();renderResults();+ renderSweepIdle();load();}diff --git a/tests/exit-lab-page.test.js b/tests/exit-lab-page.test.jsindex 96cd1e89a..4a6ffd7ac 100644--- a/tests/exit-lab-page.test.js+++ b/tests/exit-lab-page.test.js@@ -132,6 +132,40 @@ describe('page structure', () => {it('scrolls a wide table inside its own container rather than the page body', () => {expect(css).toMatch(/\.xl-table-scroll\s*\{[^}]*overflow-x:\s*auto/);});++ it('raises every control this page draws to the 44px touch floor on a coarse pointer', () => {+ // scripts/mobile-touch-audit.mjs measured 49 targets under the WCAG 2.5.5+ // floor on a Pixel 5, and the two that mattered most were the help dot and+ // the drag track the whole console is operated through.+ const block = css.slice(css.indexOf('@media (hover: none) and (pointer: coarse)'));+ expect(block, 'no coarse-pointer block in exit-lab.css').not.toBe('');+ for (const sel of ['.xl-btn', '.xl-chip', '.xl-help', '.xl-range', '.xl-toggle', '.xl-coin-agent']) {+ expect(block, `${sel} has no coarse-pointer rule`).toContain(sel);+ }+ expect(block).toMatch(/min-height:\s*44px/);+ });+});++describe('dead paths', () => {+ it('gates the search button on a loaded corpus instead of answering a click with silence', () => {+ expect(js).toContain('function syncSweepAvailability()');+ expect(js).toMatch(/btn\.disabled\s*=\s*!ready/);+ // runSweep's early return is the branch the gate exists to make unreachable.+ expect(js).toMatch(/if \(!state\.corpus\?\.trades\?\.length\) return;/);+ });++ it('fills the reasons, trades and search sections when the corpus fails to load', () => {+ // A heading over a permanently aria-busy empty div reads as a broken page.+ const failure = js.slice(js.indexOf('} catch (err) {', js.indexOf('async function load()')));+ for (const fn of ['renderReasons()', 'renderTrades()', 'renderSweepIdle()']) {+ expect(failure.slice(0, 400), `${fn} is not called on the failure path`).toContain(fn);+ }+ });++ it('clears aria-busy once the corpus settles, either way', () => {+ expect(js).toContain('function setBusy(');+ expect(js).toMatch(/setBusy\(el, !state\.corpus && !state\.error\)/);+ });});describe('honesty', () => {