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(nav): keep the account chip on screen when the identity is long

nirholase7c1e5fb6346
diff --git a/public/app-next.css b/public/app-next.css
index 82e3cda96..416859528 100644
--- a/public/app-next.css
+++ b/public/app-next.css
@@ -178,6 +178,26 @@ body.app-next-body {
display: flex;
align-items: center;
gap: 8px;
+ /* The header is a fixed bar with no overflow: whatever the auth cluster
+ renders (a handle, an email, a long display name) has to fit inside it,
+ or it runs past the right edge of a phone and takes the account menu with
+ it. Let the cluster shrink and truncate instead. */
+ min-width: 0;
+ flex: 0 1 auto;
+}
+
+
+.nxt-user-btn,
+.nxt-signin {
+ max-width: min(38vw, 220px);
+ min-width: 0;
+}
+
+#nav-user-label {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ min-width: 0;
}
.nxt-more {
@@ -1685,6 +1705,20 @@ body.app-next-body.nxt-chat-merged .nxt-chat-input-wrap:focus-within {
@media (max-width: 640px) {
.nxt-brand-tag { display: none; }
+ /* Phone header: the account chip becomes the dot alone. A handle, a display
+ name or an email all have to share ~230px with the brand, the two icon
+ buttons and Explore, and any of them long enough pushed the chip (and the
+ menu behind it) off the edge of the screen. The identity still reads out
+ through the button's aria-label and sits at the top of its menu. */
+ #nav-user-label { display: none; }
+ .nxt-user-btn {
+ padding: 9px;
+ border-radius: 50%;
+ gap: 0;
+ }
+ /* The shared nav's own presence dot (.nav-user::before) is the whole chip at
+ this size; a second dot beside it just reads as a rendering glitch. */
+ .nxt-user-dot { display: none; }
.nxt-more { padding: 7px 8px; }
.nxt-more-menu a,
.nxt-more-menu button { padding: 12px 14px; font-size: 15px; min-height: 44px; }
diff --git a/src/app-next-overlay.js b/src/app-next-overlay.js
index ec45f6e53..41dfbfbd8 100644
--- a/src/app-next-overlay.js
+++ b/src/app-next-overlay.js
@@ -1011,6 +1011,14 @@ async function refreshAuthState() {
if (signinEl) signinEl.hidden = true;
if (userWrap) userWrap.hidden = false;
if (userLabel) userLabel.textContent = label;
+ // Phones hide the label and keep the dot, so the account button carries
+ // the identity for screen readers and as its tooltip.
+ const userBtn = document.getElementById('nav-user-btn');
+ if (userBtn) {
+ const full = me.email || me.username || label;
+ userBtn.title = full;
+ userBtn.setAttribute('aria-label', `Account: ${full}`);
+ }
// The public profile route is keyed by handle, so only link it once the
// user has a username — otherwise it would resolve to a dead page.
if (profileLink) {
diff --git a/src/app.js b/src/app.js
index 4792256e0..089fe7d31 100644
--- a/src/app.js
+++ b/src/app.js
@@ -740,10 +740,13 @@ class App {
// the right edge of a phone. Show the handle (or the address's local
// part) and keep the full identity in the button's tooltip.
if (label) {
- label.textContent =
- user.username || user.display_name || user.email?.split('@')[0] || 'Account';
- const full = user.email || user.username || '';
- if (full) btn.title = full;
+ const short = user.username || user.display_name || user.email?.split('@')[0] || 'Account';
+ label.textContent = short;
+ const full = user.email || user.username || short;
+ btn.title = full;
+ // The label is hidden on phones (see app-next.css), so the identity
+ // has to reach assistive tech through the button itself.
+ btn.setAttribute('aria-label', `Account: ${full}`);
}
if (profileLink && user.address) profileLink.href = `/u/${user.address}`;
@@ -968,7 +971,7 @@ class App {
body: JSON.stringify({ avatar_id: avatarId }),
});
}
- location.href = `/agent/${this._editingAgentId}`;
+ location.href = `/agents/${this._editingAgentId}`;
} else {
// Create a new agent linked to the uploaded avatar
const res = await fetch('/api/agents/me', {
@@ -999,7 +1002,7 @@ class App {
}
if (agentId) {
- location.href = `/agent/${agentId}`;
+ location.href = `/agents/${agentId}`;
} else {
this._flashSaved({ name: 'your account' });
if (btn) {
@@ -1191,7 +1194,7 @@ class App {
const publicLink = document.getElementById('view-public-profile-btn');
if (publicLink) {
- publicLink.href = `/agent/${agentId}`;
+ publicLink.href = `/agents/${agentId}`;
publicLink.hidden = false;
}
@@ -1226,7 +1229,7 @@ class App {
const shareLink = document.getElementById('agent-onboarding-share');
if (deployLink) deployLink.href = `/deploy?agent=${agentId}`;
- if (shareLink) shareLink.href = `/agent/${agentId}`;
+ if (shareLink) shareLink.href = `/agents/${agentId}`;
// Remember what had focus so we can restore it when the dialog closes.
const prevFocus = document.activeElement;