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(home): enhance empty state messaging for recent activity panel

fudjiac9f0d6257ced
diff --git a/src/agent-wallet-hub/tabs/access.js b/src/agent-wallet-hub/tabs/access.js
index 6d55b8010..c43ae8b6f 100644
--- a/src/agent-wallet-hub/tabs/access.js
+++ b/src/agent-wallet-hub/tabs/access.js
@@ -29,7 +29,8 @@ const STYLE = `
.awh-acc-mode .copy span { font-size:var(--text-2xs,.6875rem); color:var(--ink-dim,#888); line-height:1.45; }
.awh-acc-switch { display:inline-flex; align-items:center; gap:8px; font-size:var(--text-sm,.764rem); color:var(--ink,#c8c8c8); white-space:nowrap; }
.awh-acc-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
-.awh-acc-cap { border:1px solid var(--stroke,rgba(255,255,255,.08)); border-radius:var(--radius-md,10px); background:var(--surface-1,rgba(255,255,255,.03)); padding:12px 14px; display:flex; flex-direction:column; gap:8px; }
+.awh-acc-cap { border:1px solid var(--stroke,rgba(255,255,255,.08)); border-radius:var(--radius-md,10px); background:var(--surface-1,rgba(255,255,255,.03)); padding:12px 14px; display:flex; flex-direction:column; gap:8px; transition:border-color var(--duration-fast,140ms), background var(--duration-fast,140ms); }
+.awh-acc-cap:not(.is-dead):hover { border-color:var(--stroke-strong,rgba(255,255,255,.14)); background:var(--surface-2,rgba(255,255,255,.05)); }
.awh-acc-cap.is-dead { opacity:.6; }
.awh-acc-cap-top { display:flex; align-items:flex-start; gap:10px; }
.awh-acc-cap-main { min-width:0; flex:1; display:flex; flex-direction:column; gap:2px; }
diff --git a/src/agent-wallet-hub/tabs/autopilot.js b/src/agent-wallet-hub/tabs/autopilot.js
index 1b13baa47..bb18ff049 100644
--- a/src/agent-wallet-hub/tabs/autopilot.js
+++ b/src/agent-wallet-hub/tabs/autopilot.js
@@ -339,10 +339,10 @@ registerWalletTab({
? `<div class="note">${esc(r.last_note)}${explorer ? ` · <a href="${esc(explorer)}" target="_blank" rel="noopener">view tx ↗</a>` : ''}</div>`
: explorer ? `<div class="note"><a href="${esc(explorer)}" target="_blank" rel="noopener">view tx ↗</a></div>` : '';
const ctlHtml = withControls
- ? `<div class="ctl">${statusChip}<button class="ap-toggle" data-toggle="${esc(r.id)}">${r.paused ? 'Resume' : 'Pause'}</button></div>`
+ ? `<div class="ctl">${statusChip}<button class="ap-toggle" type="button" data-toggle="${esc(r.id)}" aria-label="${r.paused ? 'Resume' : 'Pause'} rule: ${esc(r.label)}">${r.paused ? 'Resume' : 'Pause'}</button></div>`
: '';
return `<li class="ap-rule" data-paused="${r.paused ? 'true' : 'false'}">
- <span class="ic">${KIND_ICON[r.kind] || '•'}</span>
+ <span class="ic" aria-hidden="true">${KIND_ICON[r.kind] || '•'}</span>
<div class="body"><div class="ttl">${esc(r.label)}</div>${noteHtml}</div>
${ctlHtml}
</li>`;
diff --git a/src/agent-wallet-hub/tabs/proof.js b/src/agent-wallet-hub/tabs/proof.js
index 03932a91e..717d4f373 100644
--- a/src/agent-wallet-hub/tabs/proof.js
+++ b/src/agent-wallet-hub/tabs/proof.js
@@ -17,6 +17,7 @@
import { registerWalletTab } from '../registry.js';
import { apiFetch } from '../../api.js';
+import { escapeHtml } from '../util.js';
import { verifyInclusionProof } from '../../proof-of-custody/verifier.js';
import { renderProofUI, injectProofStyle } from '../../proof-of-custody/ui.js';
diff --git a/src/agent-wallet-hub/tabs/trade.js b/src/agent-wallet-hub/tabs/trade.js
index 00b5022fe..a2fce36a8 100644
--- a/src/agent-wallet-hub/tabs/trade.js
+++ b/src/agent-wallet-hub/tabs/trade.js
@@ -846,11 +846,21 @@ registerWalletTab({
function wireActionEvents() {
panel.querySelector('[data-tr="review"]')?.addEventListener('click', () => {
state.confirming = true; renderActions();
+ // Move focus into the confirm step so keyboard users land on the decision.
+ panel.querySelector('[data-tr="confirm"]')?.focus();
});
panel.querySelector('[data-tr="cancel"]')?.addEventListener('click', () => {
state.confirming = false; renderActions();
+ panel.querySelector('[data-tr="review"]')?.focus();
});
panel.querySelector('[data-tr="confirm"]')?.addEventListener('click', submit);
+ // Escape backs out of the confirm step without submitting — never a keyboard trap.
+ panel.querySelector('.awh-tr-confirm')?.addEventListener('keydown', (e) => {
+ if (e.key !== 'Escape') return;
+ e.preventDefault();
+ state.confirming = false; renderActions();
+ panel.querySelector('[data-tr="review"]')?.focus();
+ });
panel.querySelectorAll('[data-tr="deposit"]').forEach((b) => b.addEventListener('click', () => {
ctx.openTab?.('deposit');
}));
diff --git a/src/agent-wallet-hub/tabs/vanity.js b/src/agent-wallet-hub/tabs/vanity.js
index 019b88329..ec23a8c34 100644
--- a/src/agent-wallet-hub/tabs/vanity.js
+++ b/src/agent-wallet-hub/tabs/vanity.js
@@ -299,8 +299,8 @@ registerWalletTab({
? `<div class="awh-empty" style="padding:0 0 8px;">Migrated ${r.swept.sol ? `${r.swept.sol} SOL` : 'funds'}${r.swept.tokens?.length ? ` + ${r.swept.tokens.length} token${r.swept.tokens.length > 1 ? 's' : ''}` : ''} from the old address.</div>`
: '';
return `
- <div class="awh-card awh-ok">
- <div class="ic">✦</div>
+ <div class="awh-card awh-ok" role="status">
+ <div class="ic" aria-hidden="true">✦</div>
<div style="font-size:var(--text-md,.8125rem);font-weight:600;color:var(--ink-bright,#fff);margin-bottom:6px;">Vanity address applied</div>
<div class="awh-vn-addr" style="margin-bottom:8px;">${highlight(r.address, r.vanity_prefix, r.vanity_suffix)}</div>
${sweptLine}
diff --git a/src/agent-wallet-hub/tabs/withdraw.js b/src/agent-wallet-hub/tabs/withdraw.js
index e53e5d273..13b8cb69b 100644
--- a/src/agent-wallet-hub/tabs/withdraw.js
+++ b/src/agent-wallet-hub/tabs/withdraw.js
@@ -27,11 +27,11 @@ const SOL_ADDR_RE = /^[1-9A-HJ-NP-Za-km-z]{32,44}$/;
const WD_STYLE_ID = 'awh-withdraw-style';
const WD_STYLE = `
-.awh-sub { display: flex; gap: 4px; margin-bottom: var(--space-4,16px); }
-.awh-sub button { appearance:none; font:inherit; font-size: var(--text-sm,.764rem); font-weight:500; color: var(--ink-dim,#888); background:transparent; border:1px solid transparent; border-radius: var(--radius-pill,999px); padding:5px 13px; cursor:pointer; transition: background var(--duration-fast,140ms), color var(--duration-fast,140ms); }
-.awh-sub button:hover { color: var(--ink,#e8e8e8); }
-.awh-sub button[aria-pressed="true"] { color: var(--ink-bright,#fff); background: var(--surface-2, rgba(255,255,255,.07)); border-color: var(--stroke,rgba(255,255,255,.1)); }
-.awh-sub button:focus-visible { outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,#fff); outline-offset:2px; }
+.awh-wd-sub { display: flex; gap: 4px; margin-bottom: var(--space-4,16px); }
+.awh-wd-sub button { appearance:none; font:inherit; font-size: var(--text-sm,.764rem); font-weight:500; color: var(--ink-dim,#888); background:transparent; border:1px solid transparent; border-radius: var(--radius-pill,999px); padding:5px 13px; cursor:pointer; transition: background var(--duration-fast,140ms), color var(--duration-fast,140ms), border-color var(--duration-fast,140ms); }
+.awh-wd-sub button:hover { color: var(--ink,#e8e8e8); }
+.awh-wd-sub button[aria-pressed="true"] { color: var(--ink-bright,#fff); background: var(--surface-2, rgba(255,255,255,.07)); border-color: var(--stroke,rgba(255,255,255,.1)); }
+.awh-wd-sub button:focus-visible { outline: var(--focus-ring-width,2px) solid var(--focus-ring-color,#fff); outline-offset:2px; }
.awh-fld { margin-bottom: var(--space-4,16px); }
.awh-fld label { display:block; font-size: var(--text-sm,.764rem); color: var(--ink-dim,#888); margin-bottom:6px; }
@@ -207,7 +207,7 @@ registerWalletTab({
function subStrip() {
const item = (id, label) => `<button type="button" data-sub="${id}" aria-pressed="${state.view === id}">${esc(label)}</button>`;
- return `<div class="awh-sub" role="tablist">${item('withdraw', 'Withdraw')}${item('limits', 'Limits & Safety')}${item('activity', 'Activity')}</div>`;
+ return `<div class="awh-wd-sub" role="group" aria-label="Withdraw sections">${item('withdraw', 'Withdraw')}${item('limits', 'Limits & Safety')}${item('activity', 'Activity')}</div>`;
}
function render() {
diff --git a/src/dashboard-next/pages/home.js b/src/dashboard-next/pages/home.js
index b2c815fdd..9f4325f4f 100644
--- a/src/dashboard-next/pages/home.js
+++ b/src/dashboard-next/pages/home.js
@@ -578,13 +578,22 @@ async function refreshActivity(host, ctx) {
const events = await collectActivity(ctx.widgets);
if (!events.length) {
+ ensureStateKitStyles();
+ // If the user has no live embed yet, point them at the step that unlocks
+ // activity; otherwise the feed is simply waiting for real visitor events.
+ const hasWidgets = (ctx.widgets?.length ?? 0) > 0;
host.innerHTML = `
<div class="dn-panel">
<div class="dn-panel-title">Recent activity</div>
- <div class="dn-empty" style="padding:24px 12px">
- <h3>Nothing here yet</h3>
- <p>Visitor chats, payments, and embed views show up as soon as your agents are live.</p>
- </div>
+ ${emptyStateHTML({
+ icon: '',
+ title: 'Nothing here yet',
+ body: hasWidgets
+ ? 'Visitor chats, payments, and embed views appear here the moment someone interacts with your agents.'
+ : 'Embed an agent on your site and visitor chats, payments, and views will stream in here in real time.',
+ actions: hasWidgets ? [] : [{ label: 'Embed an agent', href: '/dashboard/widgets', primary: true }],
+ compact: true,
+ })}
</div>
`;
return;