diff --git a/frontend/src/features/layout/LayoutGrid.cellControlsLayering.test.tsx b/frontend/src/features/layout/LayoutGrid.cellControlsLayering.test.tsx index 8797d5e..a871167 100644 --- a/frontend/src/features/layout/LayoutGrid.cellControlsLayering.test.tsx +++ b/frontend/src/features/layout/LayoutGrid.cellControlsLayering.test.tsx @@ -232,12 +232,19 @@ describe("LayoutGrid — ticket #48 cell control layering", () => { const cancel = await screen.findByRole("button", { name: `cancel current turn ${setup.bId}`, }); - const status = cancel.parentElement as HTMLElement; + const status = screen + .getAllByRole("status") + .find((element) => element.textContent === "Busy") as HTMLElement; const { controls } = controlsFor(setup.bId); + expect(status).toBeTruthy(); + expect(cancel.style.position).toBe("absolute"); expect(status.style.top).toBe("24px"); - expect(status.style.zIndex).toBe("6"); - expect(Number(status.style.zIndex)).toBeGreaterThan(Number(controls.style.zIndex)); + expect(status.style.zIndex).toBe("3"); + expect(cancel.style.top).toBe("24px"); + expect(cancel.style.right).toBe("20px"); + expect(cancel.style.zIndex).toBe("6"); + expect(Number(cancel.style.zIndex)).toBeGreaterThan(Number(controls.style.zIndex)); expect(screen.queryByRole("button", { name: `open cell conversation ${setup.bId}`, })).toBeNull(); diff --git a/frontend/src/features/layout/LayoutGrid.tsx b/frontend/src/features/layout/LayoutGrid.tsx index c04cf0e..0c3bd30 100644 --- a/frontend/src/features/layout/LayoutGrid.tsx +++ b/frontend/src/features/layout/LayoutGrid.tsx @@ -1172,6 +1172,32 @@ function LeafView({ )} + {agentId && busyByWorkState && ( + + )} {agentId && (busyByWorkState || inboxDepth > 0 || completedBackgroundTasks.length > 0) && (
)} - {busyByWorkState && ( - - )}
)} {/* Option 1 (Terminal + MCP): every cell — plain or agent — renders the