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.

design(my-agents): add focus rings, a reduced-motion path and a real error state

nirholas9959bfed803e
diff --git a/public/my-agents/index.html b/public/my-agents/index.html
index 9e970c183..b95b36e27 100644
--- a/public/my-agents/index.html
+++ b/public/my-agents/index.html
@@ -5,7 +5,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<title data-i18n="my_agents_index.meta_title">My Agents · three.ws</title>
- <meta name="description" content="Manage your 3D AI agents on three.ws — edit, chat, check on-chain registration, and create new ones." data-i18n-attr="content:my_agents_index.meta_description"/>
+ <meta name="description" content="Your private collection of 3D AI agents on three.ws: edit them, chat with them, check on-chain registration, and create new ones." data-i18n-attr="content:my_agents_index.meta_description"/>
<meta name="robots" content="noindex" />
<link rel="canonical" href="https://three.ws/my-agents" />
<meta property="og:type" content="website" />
@@ -57,6 +57,13 @@
font-weight: 600; font-size: 14px; border: 1px solid rgba(255,255,255,0.14); transition: all .16s; cursor: pointer; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--cyan), var(--violet)); border-color: transparent; color: #050610; }
.btn-primary:hover { opacity: .88; }
+ .btn:active { transform: translateY(1px); }
+ .btn:focus-visible, .ag-action:focus-visible, .ag-row a:focus-visible {
+ outline: 2px solid var(--cyan); outline-offset: 2px; }
+ @media (prefers-reduced-motion: reduce) {
+ .btn, .ag-action, .ag-row { transition: none; }
+ .sk { animation: none; }
+ }
/* auth gate */
.auth-gate { text-align: center; padding: 80px 24px; }
@@ -86,6 +93,7 @@
border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.05);
transition: all .14s; white-space: nowrap; text-decoration: none; }
.ag-action:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
+ .ag-action:active { transform: translateY(1px); }
.ag-action.primary { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 30%, var(--line)); }
.ag-action.primary:hover { background: color-mix(in srgb, var(--cyan) 10%, transparent); }
@@ -97,6 +105,7 @@
/* state */
.state { text-align: center; padding: 60px 20px; color: var(--muted); }
.state b { display: block; font-size: 17px; color: var(--ink); margin-bottom: 8px; }
+ .state .btn { margin-top: 18px; }
@media (max-width: 600px) {
.ag-row { grid-template-columns: 42px 1fr; }
@@ -122,7 +131,7 @@
<div class="hero">
<div class="hero-text">
<h1 data-i18n="my_agents_index.my_agents_2">My Agents</h1>
- <p data-i18n="my_agents_index.your_3d_ai_agents_edit_chat_and">Your 3D AI agents — edit, chat, and manage them from here.</p>
+ <p data-i18n="my_agents_index.your_3d_ai_agents_edit_chat_and">Your 3D AI agents. Edit, chat, and manage them from here.</p>
<p class="hero-alt" data-i18n-html="my_agents_index.see_everything">Avatars and forged 3D models too? <a href="/mine">My creations</a> has all of it in one grid.</p>
</div>
<a class="btn btn-primary" href="/create-agent" id="create-cta" style="display:none" data-i18n="my_agents_index.create_agent">+ Create agent</a>
@@ -149,6 +158,19 @@
</div>`).join('');
}
+ // Every failure path lands here so the visitor always gets a cause and a
+ // control, never a dead end that only says "try refreshing".
+ function failed(title, detail) {
+ root.innerHTML = `
+ <div class="state" role="alert">
+ <b>${esc(title)}</b>
+ ${esc(detail)}
+ <br />
+ <button type="button" class="btn btn-primary" id="ma-retry">Try again</button>
+ </div>`;
+ document.getElementById('ma-retry').addEventListener('click', load);
+ }
+
async function load() {
root.innerHTML = `<div class="ag-list">${skeletons()}</div>`;
@@ -156,7 +178,7 @@
try {
res = await fetch('/api/agents', { credentials: 'include', headers: { accept: 'application/json' } });
} catch {
- root.innerHTML = `<div class="state"><b>Connection error</b>Check your network and refresh.</div>`;
+ failed('Connection error', 'Your browser could not reach three.ws. Check your network, then try again.');
return;
}
@@ -174,7 +196,12 @@
}
if (!res.ok) {
- root.innerHTML = `<div class="state"><b>Failed to load agents</b>Try refreshing the page.</div>`;
+ failed(
+ 'We could not load your agents',
+ res.status >= 500
+ ? 'The agents service is having trouble right now. Your agents are safe.'
+ : `The agents service answered ${res.status}.`,
+ );
return;
}
@@ -187,7 +214,7 @@
root.innerHTML = `
<div class="state">
<b>No agents yet</b>
- Create your first 3D AI agent — give it a name, a 3D body, and skills.
+ Create your first 3D AI agent: give it a name, a 3D body, and skills.
<br><br>
<a class="btn btn-primary" href="/create-agent">Create an agent</a>
</div>`;