Make agent dashboard immersive fullscreen

This commit is contained in:
Meta Vens 2026-05-05 00:56:10 +01:00
commit 227883e947
3 changed files with 1046 additions and 439 deletions

View file

@ -49,7 +49,7 @@ async function smokeViewport(browser, viewport, screenshotPath) {
const page = await browser.newPage({ viewport });
await page.goto(url, { waitUntil: "networkidle" });
await page.getByRole("heading", { name: "Operator Console" }).waitFor();
await page.getByRole("heading", { name: "Agent State", exact: true }).waitFor();
await page.locator(".immersiveShell").waitFor();
await page.getByRole("button", { name: "Self prepareCheckpoint" }).waitFor();
await page.locator(".agentSmokeCanvas").waitFor();
await page.waitForTimeout(350);
@ -81,16 +81,10 @@ async function smokeViewport(browser, viewport, screenshotPath) {
if (!canvasProbe.nonBlank) {
throw new Error(`agent smoke canvas did not render: ${canvasProbe.reason}`);
}
await page.getByRole("heading", { name: "Environment" }).waitFor();
await page.getByText("Unity Editor").waitFor();
await page.getByRole("heading", { name: "Rider", exact: true }).waitFor();
await page.getByText("Aetheria.sln").waitFor();
await page.getByRole("heading", { name: "Planning", exact: true }).waitFor();
await page.getByRole("heading", { name: "Build the planning dashboard slice", exact: true }).waitFor();
await page.getByRole("heading", { name: "State Graph", exact: true }).waitFor();
await page.getByText("Epiphany Typed Graph").waitFor();
await page.getByText("Role Lanes").waitFor();
await page.getByText("Artifact Bundles").waitFor();
await page.getByRole("button", { name: "Command" }).waitFor();
await page.getByRole("button", { name: "State" }).waitFor();
await page.getByRole("button", { name: "Agents" }).waitFor();
await page.getByRole("button", { name: "Artifacts" }).waitFor();
await page.getByRole("button", { name: "Prepare Checkpoint" }).waitFor();
await page.getByRole("button", { name: "Inspect Rider" }).waitFor();
await page.getByRole("button", { name: "Adopt Draft" }).waitFor();
@ -103,6 +97,25 @@ async function smokeViewport(browser, viewport, screenshotPath) {
await page.getByRole("button", { name: "Launch Reorient" }).waitFor();
await page.getByRole("button", { name: "Read Reorient" }).waitFor();
await page.getByRole("button", { name: "Accept Reorient" }).waitFor();
await page.getByRole("button", { name: "State" }).click();
await page.getByRole("button", { name: "environment" }).waitFor();
await page.getByText("Unity Editor").waitFor();
await page.getByRole("heading", { name: "Rider", exact: true }).waitFor();
await page.getByText("Aetheria.sln").waitFor();
await page.getByRole("button", { name: "planning" }).click();
await page.getByRole("heading", { name: "Build the planning dashboard slice", exact: true }).waitFor();
await page.getByRole("button", { name: "graph" }).click();
await page.getByText("Epiphany Typed Graph").waitFor();
await page.getByRole("button", { name: "Agents" }).click();
await page.getByRole("button", { name: "lanes" }).waitFor();
await page.getByRole("heading", { name: "Implementation", exact: true }).waitFor();
await page.getByRole("button", { name: "findings" }).click();
await page.getByRole("heading", { name: "Imagination / Planning", exact: true }).waitFor();
await page.getByRole("button", { name: "jobs" }).click();
await page.getByText("retrieval-index").waitFor();
await page.getByRole("button", { name: "Artifacts" }).click();
await page.getByText("runtime/unity-inspect-sample").waitFor();
await page.getByRole("button", { name: "Command" }).click();
if (viewport.width >= 900) {
await page.getByRole("button", { name: "Status Snapshot" }).click();
await page.getByText("statusSnapshot sample completed.").waitFor();
@ -124,15 +137,35 @@ async function smokeViewport(browser, viewport, screenshotPath) {
const result = await page.evaluate(() => {
const elements = Array.from(document.querySelectorAll("h1, h2, h3, p, dd, code, button, input, .pill"));
const overlaps = [];
function isPaintedAtSample(element, rect) {
const style = window.getComputedStyle(element);
if (style.visibility === "hidden" || style.display === "none" || Number(style.opacity) === 0) {
return false;
}
const points = [
[rect.left + rect.width / 2, rect.top + rect.height / 2],
[rect.left + Math.min(8, rect.width / 2), rect.top + rect.height / 2],
[rect.right - Math.min(8, rect.width / 2), rect.top + rect.height / 2],
[rect.left + rect.width / 2, rect.top + Math.min(8, rect.height / 2)],
[rect.left + rect.width / 2, rect.bottom - Math.min(8, rect.height / 2)],
];
return points.some(([x, y]) => {
if (x < 0 || y < 0 || x > window.innerWidth || y > window.innerHeight) return false;
const hit = document.elementFromPoint(x, y);
return hit === element || Boolean(hit && element.contains(hit));
});
}
for (let index = 0; index < elements.length; index += 1) {
const left = elements[index];
const a = elements[index].getBoundingClientRect();
if (a.width === 0 || a.height === 0) continue;
if (!isPaintedAtSample(left, a)) continue;
for (let other = index + 1; other < elements.length; other += 1) {
const right = elements[other];
if (left.contains(right) || right.contains(left)) continue;
const b = elements[other].getBoundingClientRect();
if (b.width === 0 || b.height === 0) continue;
if (!isPaintedAtSample(right, b)) continue;
const x = Math.min(a.right, b.right) - Math.max(a.left, b.left);
const y = Math.min(a.bottom, b.bottom) - Math.max(a.top, b.top);
if (x > 2 && y > 2) {

File diff suppressed because it is too large Load diff

View file

@ -412,6 +412,379 @@ dd {
min-height: 560px;
}
body:has(.immersiveShell) {
overflow: hidden;
background: #07110e;
}
.immersiveShell {
position: relative;
width: 100vw;
height: 100dvh;
min-width: 320px;
min-height: 720px;
overflow: hidden;
color: #f7fff7;
background: #07110e;
}
.immersiveConstellation {
position: absolute;
inset: 0;
z-index: 0;
}
.immersiveConstellation .agentStage {
width: 100%;
height: 100%;
min-height: 100%;
border: 0;
border-radius: 0;
background:
radial-gradient(circle at 16% 22%, rgba(47, 155, 103, 0.34), transparent 32%),
radial-gradient(circle at 82% 18%, rgba(79, 99, 182, 0.32), transparent 30%),
radial-gradient(circle at 62% 78%, rgba(207, 90, 47, 0.32), transparent 32%),
linear-gradient(135deg, #07110e, #171124 46%, #16241d);
box-shadow: none;
}
.immersiveConstellation .agentStageVignette {
background:
linear-gradient(90deg, rgba(5, 10, 8, 0.62), transparent 32%, transparent 64%, rgba(5, 10, 8, 0.58)),
linear-gradient(180deg, rgba(6, 11, 9, 0.64), transparent 22%, rgba(3, 7, 6, 0.72)),
radial-gradient(circle at 50% 48%, transparent 26%, rgba(3, 7, 6, 0.38) 100%);
}
.immersiveConstellation .constellationInspector {
right: 24px;
bottom: 24px;
left: auto;
width: min(560px, 38vw);
color: #172018;
}
.hudGrid {
position: absolute;
inset: 0;
z-index: 1;
pointer-events: none;
background-image:
linear-gradient(rgba(224, 255, 225, 0.045) 1px, transparent 1px),
linear-gradient(90deg, rgba(224, 255, 225, 0.045) 1px, transparent 1px);
background-size: 48px 48px;
mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.8), transparent 72%);
}
.immersiveTopbar,
.deckRail,
.diegeticPanel,
.hudToastStack {
position: absolute;
z-index: 8;
}
.immersiveTopbar {
top: 18px;
right: 24px;
left: 24px;
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 18px;
pointer-events: none;
}
.operatorIdentity {
max-width: min(760px, 48vw);
border-left: 3px solid rgba(147, 216, 118, 0.76);
padding-left: 13px;
text-shadow: 0 2px 18px rgba(0, 0, 0, 0.54);
}
.operatorIdentity .eyebrow {
color: rgba(232, 255, 234, 0.78);
}
.operatorIdentity h1 {
color: #f7fff7;
}
.operatorIdentity span {
display: block;
max-width: 100%;
margin-top: 6px;
overflow: hidden;
color: rgba(239, 255, 241, 0.74);
font-size: 0.84rem;
text-overflow: ellipsis;
white-space: nowrap;
}
.operatorTopControls {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 8px;
max-width: 560px;
pointer-events: auto;
}
.operatorTopControls .primaryButton {
border-color: rgba(209, 241, 214, 0.42);
background: rgba(36, 77, 58, 0.82);
backdrop-filter: blur(12px);
}
.deckRail {
top: 152px;
bottom: 24px;
left: 24px;
display: grid;
align-content: start;
gap: 10px;
width: 96px;
}
.deckRail button,
.subdeckTabs button {
border: 1px solid rgba(219, 238, 216, 0.28);
color: rgba(244, 255, 245, 0.78);
background: rgba(10, 19, 16, 0.66);
backdrop-filter: blur(12px);
cursor: pointer;
}
.deckRail button {
display: grid;
justify-items: center;
gap: 6px;
min-height: 72px;
border-radius: 8px;
padding: 9px 6px;
font-size: 0.72rem;
font-weight: 800;
text-transform: uppercase;
}
.deckRail button.active,
.subdeckTabs button.active {
border-color: rgba(247, 189, 88, 0.72);
color: #fff8df;
background: rgba(116, 71, 36, 0.72);
box-shadow: 0 0 24px rgba(241, 173, 78, 0.18);
}
.diegeticPanel {
top: 152px;
bottom: 24px;
left: 136px;
display: grid;
grid-template-rows: auto minmax(0, 1fr);
width: min(720px, 44vw);
min-width: 460px;
overflow: hidden;
border: 1px solid rgba(219, 238, 216, 0.32);
border-radius: 8px;
background: rgba(8, 17, 14, 0.72);
box-shadow: 0 22px 62px rgba(0, 0, 0, 0.34);
backdrop-filter: blur(16px);
}
.diegeticPanel.widePanel {
right: 24px;
width: auto;
min-width: 0;
}
.deckHeader {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 16px;
align-items: center;
border-bottom: 1px solid rgba(219, 238, 216, 0.18);
padding: 14px 16px;
background: rgba(255, 255, 255, 0.045);
}
.deckHeader span {
color: rgba(216, 235, 214, 0.66);
font-size: 0.72rem;
font-weight: 900;
text-transform: uppercase;
}
.deckHeader h2 {
margin-top: 2px;
color: #f7fff7;
font-size: 1rem;
text-transform: capitalize;
}
.subdeckTabs {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 8px;
}
.subdeckTabs button {
min-height: 32px;
border-radius: 999px;
padding: 0 11px;
font-size: 0.72rem;
font-weight: 850;
text-transform: uppercase;
}
.deckBody {
min-height: 0;
overflow: auto;
padding: 14px;
scrollbar-color: rgba(212, 236, 211, 0.32) transparent;
}
.hudActionGrid,
.hudFormGrid,
.signalStack {
display: grid;
gap: 10px;
}
.hudActionGrid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hudActionButton {
width: 100%;
min-width: 0;
border-color: rgba(219, 238, 216, 0.36);
color: #f5fff5;
background: rgba(244, 255, 245, 0.08);
}
.hudActionButton:disabled {
color: rgba(228, 242, 228, 0.48);
background: rgba(244, 255, 245, 0.045);
}
.hudResult {
margin-top: 12px;
color: rgba(240, 255, 241, 0.82);
}
.hudFormGrid {
grid-template-columns: 1fr;
}
.diegeticPanel label {
color: rgba(232, 255, 234, 0.78);
}
.diegeticPanel input,
.diegeticPanel select {
border-color: rgba(219, 238, 216, 0.28);
color: #f7fff7;
background: rgba(244, 255, 245, 0.1);
}
.diegeticPanel input::placeholder {
color: rgba(232, 255, 234, 0.48);
}
.diegeticPanel .environmentCard,
.diegeticPanel .planningItem,
.diegeticPanel .laneCard,
.diegeticPanel .findingCard,
.diegeticPanel .jobRow,
.diegeticPanel .artifactTable,
.diegeticPanel .selectedCodeRef,
.diegeticPanel .emptyState {
border-color: rgba(219, 238, 216, 0.24);
color: #f7fff7;
background: rgba(244, 255, 245, 0.09);
box-shadow: none;
}
.diegeticPanel h3,
.diegeticPanel dd,
.diegeticPanel strong {
color: #f7fff7;
}
.diegeticPanel p,
.diegeticPanel .reason,
.diegeticPanel .environmentNote,
.diegeticPanel .laneCard p,
.diegeticPanel .findingCard p,
.diegeticPanel .jobRow span,
.diegeticPanel .owner,
.diegeticPanel .pathList span,
.diegeticPanel code,
.diegeticPanel .planningMeta {
color: rgba(237, 255, 239, 0.72);
}
.diegeticPanel dt,
.diegeticPanel .pathList strong,
.diegeticPanel .selectedCodeRef span {
color: rgba(218, 239, 215, 0.58);
}
.diegeticPanel .artifactHeader {
color: rgba(218, 239, 215, 0.68);
background: rgba(244, 255, 245, 0.1);
}
.diegeticPanel .artifactRow + .artifactRow {
border-top-color: rgba(219, 238, 216, 0.16);
}
.hudEnvironmentGrid,
.hudPlanningGrid {
grid-template-columns: repeat(2, minmax(240px, 1fr));
}
.hudCardGrid {
grid-template-columns: repeat(2, minmax(220px, 1fr));
}
.hudGraphBand .graphViewerFrame {
height: min(62vh, 620px);
min-height: 360px;
}
.hudGraphBand .embeddedGraphViewer {
min-height: 100%;
}
.hudToastStack {
top: 96px;
right: 24px;
display: grid;
gap: 8px;
width: min(520px, 34vw);
pointer-events: none;
}
.hudToast {
display: flex;
align-items: center;
gap: 10px;
min-height: 38px;
border: 1px solid rgba(219, 238, 216, 0.28);
border-radius: 8px;
padding: 9px 11px;
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
backdrop-filter: blur(14px);
}
.hudToast span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.agentConstellation {
display: grid;
gap: 12px;
@ -923,6 +1296,19 @@ code {
.thoughtBubble {
width: min(224px, 34vw);
}
.diegeticPanel {
width: min(640px, calc(100vw - 172px));
min-width: 0;
}
.diegeticPanel.widePanel {
right: 14px;
}
.hudToastStack {
width: min(460px, 42vw);
}
}
@media (max-width: 640px) {
@ -958,6 +1344,102 @@ code {
padding: 10px 12px;
}
.immersiveShell {
min-height: 100dvh;
}
.immersiveTopbar {
top: 8px;
right: 8px;
left: 8px;
display: grid;
gap: 8px;
}
.operatorIdentity {
max-width: none;
padding-left: 10px;
}
.operatorIdentity h1 {
font-size: 1.5rem;
}
.operatorIdentity span {
display: none;
}
.operatorTopControls {
justify-content: flex-start;
max-width: none;
}
.operatorTopControls .pill {
font-size: 0.7rem;
}
.deckRail {
top: auto;
right: 8px;
bottom: 8px;
left: 8px;
grid-template-columns: repeat(4, minmax(0, 1fr));
width: auto;
}
.deckRail button {
min-height: 52px;
padding: 6px 4px;
font-size: 0.62rem;
}
.diegeticPanel,
.diegeticPanel.widePanel {
top: 174px;
right: 8px;
bottom: 70px;
left: 8px;
width: auto;
min-width: 0;
}
.deckHeader {
grid-template-columns: 1fr;
gap: 10px;
padding: 11px;
}
.subdeckTabs {
justify-content: flex-start;
}
.subdeckTabs button {
min-height: 29px;
padding: 0 9px;
font-size: 0.65rem;
}
.deckBody {
padding: 10px;
}
.hudActionGrid,
.hudEnvironmentGrid,
.hudPlanningGrid,
.hudCardGrid {
grid-template-columns: 1fr;
}
.hudToastStack,
.immersiveConstellation .constellationInspector {
display: none;
}
.immersiveConstellation .agentStage {
height: 100%;
min-height: 100%;
}
.agentStage {
min-height: 700px;
}
@ -1002,6 +1484,10 @@ code {
transform: translate(-50%, 0);
}
.immersiveConstellation .thoughtBubble.selected {
display: none;
}
.constellationInspector {
right: 10px;
bottom: 10px;