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
chore: shared header user menu + dashboard/settings polish
nirholas2c802e2e9dac
diff --git a/.test-bento.mjs b/.test-bento.mjsdeleted file mode 100644index 485c5c98b..000000000--- a/.test-bento.mjs+++ /dev/null@@ -1,43 +0,0 @@-import { chromium } from 'playwright-core';-const browser = await chromium.launch();-const page = await browser.newPage({ viewport: { width: 1920, height: 1200 }, deviceScaleFactor: 2 });-await page.goto('http://localhost:3000/home.html', { waitUntil: 'load', timeout: 30000 });-await page.evaluate(async () => {- const parallax = document.querySelector('.home-parallax');- const target = document.getElementById('bento-cz-canvas');- let y = 0, max = parallax.scrollHeight;- while (y < max - 1000) {- y += 400;- parallax.scrollTo(0, y);- await new Promise(r => setTimeout(r, 80));- const rect = target.getBoundingClientRect();- if (rect.top > 0 && rect.top < window.innerHeight - 200) break;- }- await new Promise(r => setTimeout(r, 200));- target.scrollIntoView({ block: 'center' });-});-await page.waitForTimeout(8000);--// dump the canvas as PNG via toDataURL — but canvas with alpha=true and DPR has gotchas-const dataUrl = await page.evaluate(() => {- const c = document.getElementById('bento-cz-canvas');- // force a render frame to flush- return new Promise(res => requestAnimationFrame(() => res(c.toDataURL())));-});-console.log('canvas data url len:', dataUrl.length);-// save it-import fs from 'fs';-fs.writeFileSync('/tmp/bento-canvas-direct.png', Buffer.from(dataUrl.split(',')[1], 'base64'));-console.log('saved');--// also screenshot the bento card region-const rect = await page.evaluate(() => {- const c = document.getElementById('bento-cz-canvas');- const r = c.getBoundingClientRect();- return { x: r.x, y: r.y, w: r.width, h: r.height };-});-console.log('rect', rect);-if (rect.y > -50 && rect.y < 1200) {- await page.screenshot({ path: '/tmp/bento-card-zoomed.png', clip: { x: Math.max(0,rect.x), y: Math.max(0,rect.y), width: rect.w, height: Math.min(1200-Math.max(0,rect.y), rect.h) } });-}-await browser.close();diff --git a/home.css b/home.cssindex 4b573f784..fe7e2ccc1 100644--- a/home.css+++ b/home.css@@ -291,6 +291,7 @@grid-column: 1;grid-row: 1 / span 4;display: grid;+ grid-template-columns: minmax(0, 1fr);grid-template-rows: 1fr auto auto;}diff --git a/public/dashboard/index.html b/public/dashboard/index.htmlindex af5606d1d..56f299ff1 100644--- a/public/dashboard/index.html+++ b/public/dashboard/index.html@@ -1121,10 +1121,7 @@<a href="/my-agents" title="ERC-8004 agents controlled by your linked wallets">My Agents</a><a href="/dashboard" class="active" aria-current="page">Dashboard</a></nav>- <div class="dash-header-user">- <span id="user-email" class="muted"></span>- <button class="btn sec" onclick="signOut()">Sign out</button>- </div>+ <div class="dash-header-user" id="header-user-slot"></div></header><div class="layout"><aside>@@ -1246,6 +1243,7 @@<script type="module">import { state, api, navigate, installRouting, signOut } from '/dashboard/dashboard.js';+ import { renderHeaderUser } from '/header-user.js';window.signOut = signOut;(async () => {@@ -1261,7 +1259,7 @@return;}state.user = me.user;- document.getElementById('user-email').textContent = me.user.email;+ renderHeaderUser(document.getElementById('header-user-slot'), me.user, { activePath: '/dashboard' });if (me.user.is_admin) document.getElementById('admin-link').style.display = '';installRouting();navigate();diff --git a/public/dashboard/sessions.html b/public/dashboard/sessions.htmlindex 4bcace04d..4ae64de80 100644--- a/public/dashboard/sessions.html+++ b/public/dashboard/sessions.html@@ -198,7 +198,7 @@<body data-auth-pending><header><div class="brand"><a href="/"><img src="/three.svg" alt="" class="header-logo" aria-hidden="true" />three.ws</a></div>- <button class="btn sec" onclick="signOut()">Sign out</button>+ <div id="header-user-slot"></div></header><main><h1>Sessions</h1>@@ -226,11 +226,11 @@<div class="empty" id="loadingMessage">Loading sessions...</div></main>+ <script type="module">+ import { mountHeaderUser } from '/header-user.js';+ mountHeaderUser({ slot: '#header-user-slot', activePath: '/dashboard/sessions' });+ </script><script>- function signOut() {- location.href = '/login';- }-function showToast(message, isError = false) {const toast = document.createElement('div');toast.className = 'toast' + (isError ? ' error' : '');diff --git a/public/dashboard/wallets.html b/public/dashboard/wallets.htmlindex a9f45b35f..1da740689 100644--- a/public/dashboard/wallets.html+++ b/public/dashboard/wallets.html@@ -191,8 +191,7 @@<div class="brand"><a href="/"><img src="/three.svg" alt="" class="header-logo" aria-hidden="true" />three.ws</a></div><div class="row"><a href="/dashboard" class="muted" style="font-size:13px">← Dashboard</a>- <span class="muted" id="user-email"></span>- <button class="btn sec" onclick="signOut()">Sign out</button>+ <div id="header-user-slot"></div></div></header><main>@@ -213,13 +212,9 @@</main><script type="module">+ import { renderHeaderUser } from '/header-user.js';let apiUrl = '/api';- async function signOut() {- await fetch(`${apiUrl}/auth/logout`, { method: 'POST', credentials: 'include' });- location.href = '/login';- }-async function fetchUser() {const res = await fetch(`${apiUrl}/auth/me`, { credentials: 'include' });const data = res.ok ? await res.json() : null;@@ -536,7 +531,7 @@(async () => {const me = await fetchUser();if (me) {- document.getElementById('user-email').textContent = me.user.email;+ renderHeaderUser(document.getElementById('header-user-slot'), me.user, { activePath: '/dashboard/wallets' });loadWallets();}})();diff --git a/public/header-user.js b/public/header-user.jsnew file mode 100644index 000000000..5475bb6ba--- /dev/null+++ b/public/header-user.js@@ -0,0 +1,274 @@+// Shared avatar + dropdown for the authenticated header.+//+// Replaces the long "wallet-0x…@wallet.local" pill with a compact avatar+// button. Clicking it opens a menu with the user's identity and quick+// actions (View profile, Settings, Sign out).+//+// Usage:+// <div id="header-user-slot"></div>+// <script type="module">+// import { mountHeaderUser } from '/header-user.js';+// mountHeaderUser({ slot: '#header-user-slot' }).then(({ user }) => { ... });+// </script>+//+// If a `user` object is already available, pass it in to skip the fetch:+// mountHeaderUser({ slot: '#header-user-slot', user });++let stylesInjected = false;++function injectStyles() {+ if (stylesInjected) return;+ stylesInjected = true;+ const css = `+.hu-root { position: relative; display: inline-flex; }+.hu-avatar {+ width: 32px; height: 32px; border-radius: 50%;+ background: linear-gradient(135deg, #6a5cff 0%, #9a8cff 100%);+ color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.02em;+ border: 1px solid rgba(255,255,255,0.08);+ display: inline-flex; align-items: center; justify-content: center;+ cursor: pointer; padding: 0; line-height: 1;+ transition: transform 0.12s ease, box-shadow 0.15s ease;+ font-family: inherit;+}+.hu-avatar:hover { box-shadow: 0 0 0 3px rgba(106,92,255,0.18); }+.hu-avatar:focus-visible { outline: 2px solid #9a8cff; outline-offset: 2px; }+.hu-avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(106,92,255,0.28); }+.hu-avatar svg { width: 16px; height: 16px; display: block; }++.hu-menu {+ position: absolute; top: calc(100% + 8px); right: 0;+ min-width: 260px;+ background: #14141d;+ border: 1px solid #2a2a36;+ border-radius: 12px;+ box-shadow: 0 12px 32px rgba(0,0,0,0.5);+ padding: 8px;+ z-index: 1000;+ opacity: 0; transform: translateY(-4px); pointer-events: none;+ transition: opacity 0.12s ease, transform 0.12s ease;+}+.hu-menu[data-open="true"] { opacity: 1; transform: translateY(0); pointer-events: auto; }++.hu-identity {+ display: flex; align-items: center; gap: 10px;+ padding: 10px 10px 12px;+ border-bottom: 1px solid #23232f;+ margin-bottom: 6px;+}+.hu-identity-avatar {+ width: 36px; height: 36px; border-radius: 50%;+ background: linear-gradient(135deg, #6a5cff 0%, #9a8cff 100%);+ color: #fff; font-size: 14px; font-weight: 600;+ display: inline-flex; align-items: center; justify-content: center;+ flex-shrink: 0;+}+.hu-identity-text { min-width: 0; flex: 1; }+.hu-identity-name {+ color: #eee; font-size: 13px; font-weight: 600;+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;+}+.hu-identity-sub {+ color: #888; font-size: 12px; margin-top: 2px;+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;+}++.hu-item {+ display: flex; align-items: center; gap: 10px;+ padding: 9px 10px;+ color: #ccc; font-size: 13px;+ border-radius: 8px;+ text-decoration: none; cursor: pointer;+ background: transparent; border: 0; width: 100%; text-align: left;+ font-family: inherit;+}+.hu-item:hover { background: rgba(255,255,255,0.04); color: #fff; }+.hu-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.75; }+.hu-item.danger { color: #ff9c9c; }+.hu-item.danger:hover { background: rgba(255,80,80,0.08); color: #ffb3b3; }++.hu-divider { height: 1px; background: #23232f; margin: 6px 4px; }+.hu-copy-flash { color: #9a8cff !important; }+`;+ const style = document.createElement('style');+ style.setAttribute('data-header-user', '');+ style.textContent = css;+ document.head.appendChild(style);+}++function isWalletEmail(email) {+ return typeof email === 'string' && /^wallet-0x[0-9a-f]{40}@wallet\.local$/i.test(email);+}++function shortAddr(addr) {+ if (!addr || typeof addr !== 'string') return '';+ if (addr.length <= 12) return addr;+ return `${addr.slice(0, 6)}…${addr.slice(-4)}`;+}++function deriveIdentity(user) {+ const walletAddr = user?.wallet_address || (isWalletEmail(user?.email) ? user.email.slice(7, 49) : null);+ const displayName = user?.display_name || user?.username || null;+ const hasRealEmail = user?.email && !isWalletEmail(user.email);++ let primary;+ if (displayName) primary = displayName;+ else if (hasRealEmail) primary = user.email;+ else if (walletAddr) primary = shortAddr(walletAddr);+ else primary = 'Account';++ let secondary = '';+ if (walletAddr) secondary = shortAddr(walletAddr);+ else if (hasRealEmail && displayName) secondary = user.email;++ const initial = (displayName || (hasRealEmail ? user.email : '') || 'A').trim().charAt(0).toUpperCase();+ return { primary, secondary, initial, walletAddr, hasRealEmail };+}++const WALLET_ICON = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="6" width="18" height="13" rx="2"/><path d="M3 10h18"/><circle cx="16.5" cy="14.5" r="1.2" fill="currentColor" stroke="none"/></svg>';+const USER_ICON = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>';+const SETTINGS_ICON = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09a1.65 1.65 0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09a1.65 1.65 0 0 0 1.51-1 1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33h0a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82v0a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>';+const WALLETS_ICON = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12V7a2 2 0 0 0-2-2H5a2 2 0 0 0 0 4h16v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7"/><circle cx="17" cy="13" r="1" fill="currentColor" stroke="none"/></svg>';+const COPY_ICON = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>';+const DASHBOARD_ICON = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="9" rx="1"/><rect x="14" y="3" width="7" height="5" rx="1"/><rect x="14" y="12" width="7" height="9" rx="1"/><rect x="3" y="16" width="7" height="5" rx="1"/></svg>';+const SIGNOUT_ICON = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>';++async function fetchUser() {+ const res = await fetch('/api/auth/me', { credentials: 'include' });+ if (!res.ok) return null;+ const data = await res.json();+ return data?.user || null;+}++async function performSignOut() {+ try {+ await fetch('/api/auth/logout', { method: 'POST', credentials: 'include' });+ } finally {+ try { localStorage.removeItem('3dagent:auth-hint'); } catch {}+ location.href = '/';+ }+}++function buildMenu(user, identity, options) {+ const profileSlug = user.username || user.address || identity.walletAddr;+ const profileHref = profileSlug ? `/u/${profileSlug}` : null;++ const items = [];+ if (profileHref) {+ items.push(`<a class="hu-item" href="${profileHref}">${USER_ICON}<span>View profile</span></a>`);+ }+ if (options.activePath !== '/dashboard') {+ items.push(`<a class="hu-item" href="/dashboard">${DASHBOARD_ICON}<span>Dashboard</span></a>`);+ }+ if (options.activePath !== '/settings') {+ items.push(`<a class="hu-item" href="/settings">${SETTINGS_ICON}<span>Settings</span></a>`);+ }+ items.push(`<a class="hu-item" href="/dashboard/wallets">${WALLETS_ICON}<span>Linked wallets</span></a>`);++ const copyTarget = identity.walletAddr || (identity.hasRealEmail ? user.email : '');+ if (copyTarget) {+ const label = identity.walletAddr ? 'Copy wallet address' : 'Copy email';+ items.push(`<button type="button" class="hu-item" data-copy="${copyTarget}">${COPY_ICON}<span>${label}</span></button>`);+ }++ items.push('<div class="hu-divider"></div>');+ items.push(`<button type="button" class="hu-item danger" data-action="signout">${SIGNOUT_ICON}<span>Sign out</span></button>`);++ const identityAvatar = identity.walletAddr+ ? `<span class="hu-identity-avatar">${WALLET_ICON}</span>`+ : `<span class="hu-identity-avatar">${identity.initial}</span>`;++ return `+ <div class="hu-identity">+ ${identityAvatar}+ <div class="hu-identity-text">+ <div class="hu-identity-name">${escapeHtml(identity.primary)}</div>+ ${identity.secondary ? `<div class="hu-identity-sub">${escapeHtml(identity.secondary)}</div>` : ''}+ </div>+ </div>+ ${items.join('')}+ `;+}++function escapeHtml(s) {+ return String(s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));+}++export function renderHeaderUser(container, user, options = {}) {+ injectStyles();+ if (!user) return null;+ const identity = deriveIdentity(user);+ const activePath = options.activePath || location.pathname;+ const opts = { ...options, activePath };++ const avatarLabel = identity.walletAddr+ ? `Account menu — wallet ${shortAddr(identity.walletAddr)}`+ : `Account menu — ${identity.primary}`;+ const avatarInner = identity.walletAddr ? WALLET_ICON : identity.initial;++ container.classList.add('hu-root');+ container.innerHTML = `+ <button type="button" class="hu-avatar" aria-haspopup="menu" aria-expanded="false" aria-label="${escapeHtml(avatarLabel)}" title="${escapeHtml(identity.primary)}">${avatarInner}</button>+ <div class="hu-menu" role="menu" data-open="false">${buildMenu(user, identity, opts)}</div>+ `;++ const btn = container.querySelector('.hu-avatar');+ const menu = container.querySelector('.hu-menu');++ function open() {+ menu.dataset.open = 'true';+ btn.setAttribute('aria-expanded', 'true');+ document.addEventListener('mousedown', onDocClick, true);+ document.addEventListener('keydown', onKey);+ }+ function close() {+ menu.dataset.open = 'false';+ btn.setAttribute('aria-expanded', 'false');+ document.removeEventListener('mousedown', onDocClick, true);+ document.removeEventListener('keydown', onKey);+ }+ function toggle() {+ menu.dataset.open === 'true' ? close() : open();+ }+ function onDocClick(e) {+ if (!container.contains(e.target)) close();+ }+ function onKey(e) {+ if (e.key === 'Escape') { close(); btn.focus(); }+ }++ btn.addEventListener('click', toggle);++ menu.addEventListener('click', async (e) => {+ const copyBtn = e.target.closest('[data-copy]');+ if (copyBtn) {+ const value = copyBtn.getAttribute('data-copy');+ try { await navigator.clipboard.writeText(value); } catch {}+ const span = copyBtn.querySelector('span');+ if (span) {+ const orig = span.textContent;+ span.textContent = 'Copied';+ copyBtn.classList.add('hu-copy-flash');+ setTimeout(() => { span.textContent = orig; copyBtn.classList.remove('hu-copy-flash'); close(); }, 900);+ }+ return;+ }+ const actionBtn = e.target.closest('[data-action="signout"]');+ if (actionBtn) {+ actionBtn.disabled = true;+ performSignOut();+ }+ });++ return { close, open, element: container };+}++export async function mountHeaderUser(options = {}) {+ const slot = typeof options.slot === 'string' ? document.querySelector(options.slot) : options.slot;+ if (!slot) return { user: null };+ const user = options.user || (await fetchUser());+ if (!user) return { user: null };+ const controller = renderHeaderUser(slot, user, options);+ return { user, controller };+}diff --git a/public/home.css b/public/home.cssindex 66d19008a..fe7e2ccc1 100644--- a/public/home.css+++ b/public/home.css@@ -291,6 +291,7 @@grid-column: 1;grid-row: 1 / span 4;display: grid;+ grid-template-columns: minmax(0, 1fr);grid-template-rows: 1fr auto auto;}@@ -298,6 +299,8 @@position: relative;min-height: 360px;background: rgba(255, 255, 255, 0.02);+ /* isolate compositing layer so WebGL canvas renders correctly inside the+ CSS 3D perspective context on .home-parallax */will-change: transform;transform: translateZ(0);}@@ -1703,6 +1706,7 @@.home-page a:focus-visible,.home-page button:focus-visible,+.home-nav a:focus-visible,.h-btn-primary:focus-visible,.h-btn-ghost:focus-visible,.h-feature-link:focus-visible,@@ -1716,6 +1720,220 @@width: 100%;}+/* ── Nav ── */++.home-nav {+ margin-left: auto;+ display: flex;+ align-items: center;+ gap: var(--space-lg);+ -webkit-app-region: no-drag;+}++.home-nav a {+ color: rgba(255, 255, 255, 0.6);+ text-decoration: none;+ font-size: 0.92rem;+ font-weight: 500;+ letter-spacing: 0.005em;+ font-family: 'Space Grotesk', 'Inter', sans-serif;+ transition: color 0.2s ease;+}++.home-nav a:hover {+ color: #fff;+}++.home-nav .nav-cta {+ padding: 0.5rem 1.2rem;+ background: linear-gradient(135deg, #ffd76a 0%, #ff8f4d 100%);+ color: #1a0f08;+ border-radius: 6px;+ font-weight: 600;+ font-size: 0.9rem;+ box-shadow: 0 4px 18px -6px rgba(255, 143, 77, 0.6);+ transition:+ transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1),+ box-shadow 0.25s ease;+}++.home-nav .nav-cta:hover {+ transform: translateY(-1px) scale(1.03);+ box-shadow: 0 8px 24px -6px rgba(255, 143, 77, 0.8);+ color: #1a0f08;+}++.home-nav .nav-user {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ padding: 4px 10px;+ border-radius: 20px;+ border: 1px solid rgba(255, 255, 255, 0.1);+ background: rgba(255, 255, 255, 0.04);+ font-size: 0.85rem;+ color: rgba(255, 255, 255, 0.55);+ max-width: 140px;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+}++.home-nav .nav-user::before {+ content: '';+ width: 6px;+ height: 6px;+ border-radius: 50%;+ background: #4ade80;+ flex-shrink: 0;+}++.home-nav .nav-user:hover {+ color: rgba(255, 255, 255, 0.85);+ border-color: rgba(255, 255, 255, 0.2);+ background: rgba(255, 255, 255, 0.07);+}++/* ── Dropdown nav ── */+.home-nav .nav-root,+.home-nav .nav-menu {+ list-style: none !important;+ margin: 0;+ padding: 0;+}++.home-nav .nav-root {+ display: flex !important;+ align-items: center;+ gap: var(--space-lg);+}++.home-nav .nav-item {+ position: relative;+ display: block;+}++.home-nav .nav-item[hidden] {+ display: none !important;+}++.home-nav .nav-menu li {+ display: block;+ margin: 0;+ padding: 0;+}++.home-nav .nav-trigger {+ display: inline-flex;+ align-items: center;+ gap: 4px;+ background: none;+ border: 0;+ padding: 0;+ cursor: pointer;+ color: rgba(255, 255, 255, 0.6);+ font: inherit;+ font-size: 0.92rem;+ font-weight: 500;+ letter-spacing: 0.005em;+ font-family: 'Space Grotesk', 'Inter', sans-serif;+ transition: color 0.2s ease;+}++.home-nav .nav-trigger:hover,+.home-nav .nav-trigger[aria-expanded='true'] {+ color: #fff;+}++.home-nav .nav-caret {+ font-size: 0.7em;+ opacity: 0.7;+ transition: transform 0.2s ease;+}++.home-nav .nav-trigger[aria-expanded='true'] .nav-caret {+ transform: rotate(180deg);+}++.home-nav .nav-menu {+ position: absolute;+ top: calc(100% + 14px);+ left: -12px;+ min-width: 240px;+ margin: 0;+ padding: 8px;+ list-style: none;+ background: rgba(14, 12, 22, 0.92);+ backdrop-filter: blur(18px) saturate(140%);+ -webkit-backdrop-filter: blur(18px) saturate(140%);+ border: 1px solid rgba(255, 255, 255, 0.08);+ border-radius: 12px;+ box-shadow:+ 0 20px 40px -12px rgba(0, 0, 0, 0.6),+ 0 4px 12px -4px rgba(0, 0, 0, 0.5);+ opacity: 0;+ transform: translateY(-6px);+ pointer-events: none;+ transition:+ opacity 0.18s ease,+ transform 0.18s ease;+ z-index: 1000;+}++.home-nav .nav-trigger[aria-expanded='true'] + .nav-menu {+ opacity: 1;+ transform: translateY(0);+ pointer-events: auto;+}++.home-nav .nav-menu a {+ display: flex;+ flex-direction: column;+ gap: 2px;+ padding: 10px 12px;+ border-radius: 8px;+ color: rgba(255, 255, 255, 0.85);+ text-decoration: none;+ transition:+ background 0.15s ease,+ color 0.15s ease;+}++.home-nav .nav-menu a:hover,+.home-nav .nav-menu a:focus-visible {+ background: rgba(255, 255, 255, 0.06);+ color: #fff;+}++.home-nav .nav-mi-title {+ font-size: 0.92rem;+ font-weight: 500;+ letter-spacing: 0.005em;+}++.home-nav .nav-mi-sub {+ font-size: 0.78rem;+ color: rgba(255, 255, 255, 0.45);+ font-weight: 400;+}++.home-nav .nav-menu a:hover .nav-mi-sub,+.home-nav .nav-menu a:focus-visible .nav-mi-sub {+ color: rgba(255, 255, 255, 0.65);+}++@media (max-width: 900px) {+ .home-nav .nav-root {+ gap: var(--space-md);+ flex-wrap: wrap;+ justify-content: flex-end;+ }+ .home-nav .nav-menu {+ left: auto;+ right: 0;+ }+}+/* ── Scroll reveal ── */.h-reveal {@@ -2630,7 +2848,14 @@}}+/* ── prefers-reduced-motion ──────────────────────────────────────────────── */+/*+ * Users who request reduced motion (vestibular disorders, slow devices, battery+ * saver) get: no looping animations, instant transitions, no parallax.+ * WebGL viewers are still shown but stop auto-rotating (handled in JS).+ */@media (prefers-reduced-motion: reduce) {+ /* kill ALL CSS animations and transitions site-wide */*,*::before,*::after {@@ -2640,28 +2865,41 @@scroll-behavior: auto !important;}+ /* reveal elements immediately — no fade/slide in */.h-reveal {opacity: 1;transform: none;}+ /* hide the star canvas entirely — it's decorative */.h-star-canvas {display: none;}+ /* flatten the CSS scroll-driven parallax layers */.h-layer {transform: none !important;}- .h-avatar-wrap,+ /* stop the hero avatar scroll-based float */+ .h-avatar-wrap {+ animation: none !important;+ }++ /* stop ambient glow / mesh drift */.h-hero-mesh,.h-hero-glow-a,.h-hero-glow-b,- .h-hero-haze,+ .h-hero-haze {+ animation: none !important;+ }++ /* stop the floor scroll ribbon */.h-floor-ribbon {animation: none !important;}+ /* stop the status dot pulse */.h-status-dot::before {animation: none !important;}diff --git a/public/settings/index.html b/public/settings/index.htmlindex 639187484..40c2e27b2 100644--- a/public/settings/index.html+++ b/public/settings/index.html@@ -318,10 +318,7 @@<a href="/dashboard">Dashboard</a><a href="/settings" class="active" aria-current="page">Settings</a></nav>- <div class="dash-header-user">- <span id="user-email" class="muted"></span>- <button class="btn sec" id="sign-out-btn">Sign out</button>- </div>+ <div class="dash-header-user" id="header-user-slot"></div></header><div class="layout">@@ -542,6 +539,7 @@</div><script type="module">+ import { renderHeaderUser } from '/header-user.js';const API = '';async function apiFetch(path, opts = {}) {@@ -578,7 +576,7 @@throw new Error('unauthenticated');}user = data.user;- document.getElementById('user-email').textContent = user.email || user.display_name || '';+ renderHeaderUser(document.getElementById('header-user-slot'), user, { activePath: '/settings' });document.getElementById('inp-display-name').value = user.display_name || '';document.getElementById('inp-username').value = user.username || '';updateProfileUrlPreview();@@ -705,14 +703,6 @@}});- // ── Sign out ──────────────────────────────────────────────────- document.getElementById('sign-out-btn').addEventListener('click', () => {- fetch('/api/auth/logout', { method: 'POST', credentials: 'include' }).finally(() => {- try { localStorage.removeItem('3dagent:auth-hint'); } catch {}- location.href = '/';- });- });-document.getElementById('sign-out-everywhere-btn').addEventListener('click', async () => {const btn = document.getElementById('sign-out-everywhere-btn');btn.disabled = true;diff --git a/public/sitemap.xml b/public/sitemap.xmlindex f2b9a98e1..6824dce0a 100644--- a/public/sitemap.xml+++ b/public/sitemap.xml@@ -2,19 +2,140 @@<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://three.ws/</loc>- <lastmod>2026-04-27</lastmod>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq><priority>1.0</priority></url>+ <url>+ <loc>https://three.ws/discover</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>daily</changefreq>+ <priority>0.9</priority>+ </url>+ <url>+ <loc>https://three.ws/marketplace</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>daily</changefreq>+ <priority>0.9</priority>+ </url>+ <url>+ <loc>https://three.ws/gallery</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>daily</changefreq>+ <priority>0.8</priority>+ </url><url><loc>https://three.ws/create</loc>- <lastmod>2026-04-27</lastmod>+ <lastmod>2026-05-13</lastmod><changefreq>weekly</changefreq><priority>0.8</priority></url><url>- <loc>https://three.ws/discover</loc>- <lastmod>2026-04-27</lastmod>+ <loc>https://three.ws/studio</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.8</priority>+ </url>+ <url>+ <loc>https://three.ws/app</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.8</priority>+ </url>+ <url>+ <loc>https://three.ws/agents</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>daily</changefreq>+ <priority>0.8</priority>+ </url>+ <url>+ <loc>https://three.ws/widgets</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.7</priority>+ </url>+ <url>+ <loc>https://three.ws/pay</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.7</priority>+ </url>+ <url>+ <loc>https://three.ws/pay/calls</loc>+ <lastmod>2026-05-13</lastmod><changefreq>daily</changefreq>+ <priority>0.6</priority>+ </url>+ <url>+ <loc>https://three.ws/pump-live</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>hourly</changefreq><priority>0.8</priority></url>+ <url>+ <loc>https://three.ws/pump-dashboard</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>hourly</changefreq>+ <priority>0.7</priority>+ </url>+ <url>+ <loc>https://three.ws/strategy-lab</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.6</priority>+ </url>+ <url>+ <loc>https://three.ws/reputation</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.6</priority>+ </url>+ <url>+ <loc>https://three.ws/validation</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.6</priority>+ </url>+ <url>+ <loc>https://three.ws/hydrate</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.5</priority>+ </url>+ <url>+ <loc>https://three.ws/artifact</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.5</priority>+ </url>+ <url>+ <loc>https://three.ws/cz</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.5</priority>+ </url>+ <url>+ <loc>https://three.ws/eth-vanity</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>monthly</changefreq>+ <priority>0.5</priority>+ </url>+ <url>+ <loc>https://three.ws/tutorials</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.7</priority>+ </url>+ <url>+ <loc>https://three.ws/docs</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.7</priority>+ </url>+ <url>+ <loc>https://three.ws/docs/widgets</loc>+ <lastmod>2026-05-13</lastmod>+ <changefreq>weekly</changefreq>+ <priority>0.6</priority>+ </url></urlset>