From a9346476ee3a884ab81d3e0e1df198f83c110439 Mon Sep 17 00:00:00 2001 From: Blomios Date: Thu, 6 Aug 2026 14:29:31 +0200 Subject: [PATCH] =?UTF-8?q?fix(layout):=20bouton=20Cancel=20en=20z-order?= =?UTF-8?q?=20propre=20pendant=20un=20tour=20agent=20=E2=80=94=20#151=20(Q?= =?UTF-8?q?A=20verte)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extrait le bouton Cancel du banner inline et le rend en position absolue (top:24, right:20) avec zIndex CELL_Z.turnActions. Le banner de statut est décalé (right:76 en état busy) et rétrogradé en CELL_Z.banner, afin que Cancel reste au premier plan et cliquable sans recouvrement en état busy. Co-Authored-By: Claude Opus 4.8 --- .../LayoutGrid.cellControlsLayering.test.tsx | 13 +++-- frontend/src/features/layout/LayoutGrid.tsx | 52 +++++++++++-------- 2 files changed, 39 insertions(+), 26 deletions(-) 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