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(agent-screen): add a page heading and keep the live badge off the controls at 320px

nirholasbd50ba6bc8e4
diff --git a/pages/agent-screen.html b/pages/agent-screen.html
index 64af1b56d..ae713c4ee 100644
--- a/pages/agent-screen.html
+++ b/pages/agent-screen.html
@@ -208,9 +208,20 @@
}
.asc-header-right::-webkit-scrollbar { width: 0; height: 0; }
.asc-header-right > * { flex: none; }
- /* The name + live badge must yield to the control bar rather than
- overrun it: at 320px the badge used to paint on top of the toggles. */
- .asc-agent-info { flex: 0 1 auto; overflow: hidden; }
+ /* Which agent you are watching is the one thing the header must never
+ lose, so the identity block keeps its width and the (scrolling)
+ control bar absorbs every pixel of shrink. Before this the badge
+ painted straight over the toggles at 320px. */
+ .asc-agent-info { flex: 0 0 auto; overflow: hidden; }
+
+ @media (max-width: 640px) {
+ /* On a phone the badge's word is the first thing to go: the dot
+ already carries the state, and dropping it buys the control bar
+ enough width to be worth swiping. */
+ .asc-live-badge #asc-badge-text { display: none; }
+ .asc-live-badge { padding: 0.3rem; }
+ .asc-agent-name { max-width: 42vw; }
+ }
.asc-ctl-group { display: flex; align-items: center; gap: 0.2rem; }
.asc-ctl-sep { width: 1px; height: 20px; background: rgba(255,255,255,0.12); margin: 0 0.25rem; flex: none; }
diff --git a/src/agent-screen.js b/src/agent-screen.js
index c9f9379a4..47c4a7c6e 100644
--- a/src/agent-screen.js
+++ b/src/agent-screen.js
@@ -676,8 +676,20 @@ async function boot(id) {
}, 250);
}
+ // Keeps the (screen-reader-only) page heading in step with whichever name
+ // resolves first: the agent record fetch, or the stream's own hello frame.
+ function setPageHeading(name) {
+ const el = document.getElementById('asc-page-heading');
+ if (el) el.textContent = `Agent screen: ${name}`;
+ }
+
// Build the stage DOM: full-bleed screen + floating panels + task bar.
+ // The watch view is chrome all the way down (the header name is a small
+ // breadcrumb, not a title), so it carried no h1 at all. This is the page
+ // heading for assistive tech; the setup view has its own visible one, and
+ // the two never render together because the stage stays empty until boot.
stageEl.innerHTML = `
+ <h1 class="sr-only" id="asc-page-heading">Agent screen</h1>
<div class="asc-screen-stage">
<canvas id="asc-screen-canvas"></canvas>
<!-- Newsroom Anchor lower-third (slides up on a bulletin) -->
@@ -1008,6 +1020,7 @@ async function boot(id) {
agentRecord = agent;
agentName = agent.name || 'Agent';
agentNameEl.textContent = agentName;
+ setPageHeading(agentName);
document.title = `${agentName} · Agent Screen · three.ws`;
webcamName.textContent = agentName;
backEl.href = `/agents/${id}`;
@@ -1879,7 +1892,7 @@ async function boot(id) {
const client = createAgentScreenClient(id, {
onOpen({ agentName: n }) {
- if (n) { agentNameEl.textContent = n; agentName = n; webcamName.textContent = n; }
+ if (n) { agentNameEl.textContent = n; agentName = n; webcamName.textContent = n; setPageHeading(n); }
badgeTextEl.textContent = 'Connecting…';
},
onFrame(frame) {