fix(custom-cli): masquage des contrôles d'overlay persistants sur la custom CLI pendant un tour occupé — #249 (QA verte)

This commit is contained in:
2026-08-23 17:01:02 +02:00
parent 38f5572ce5
commit 55dc7c9dad
3 changed files with 60 additions and 32 deletions

View File

@ -206,27 +206,40 @@ describe("LayoutGrid — ticket #48 cell control layering", () => {
expect(controls.style.overflow).toBe("hidden");
});
it("keeps cell controls above the custom CLI view stacking context", async () => {
it("does not render persistent cell chrome over the custom CLI surface (#249)", async () => {
const setup = await makeSplitAgentGrid();
window.localStorage.setItem(`idea.agent-cell-mode.p1.${setup.bId}`, "custom");
setup.workState._setProjectWorkState("p1", {
agents: [
{
agentId: setup.agentId,
name: "Worker",
profileId: "mock-claude",
busy: { state: "busy", sinceMs: 1 },
},
],
});
renderGrid(setup.gateways);
await screen.findByTestId("custom-agent-chat-view");
window.localStorage.removeItem(`idea.agent-cell-mode.p1.${setup.bId}`);
const leafBody = screen.getAllByTestId("layout-leaf-body").find((element) =>
element.closest(`[data-node-id="${setup.bId}"]`),
) as HTMLElement;
const customToolbar = screen.getByRole("toolbar", {
name: "custom agent chat actions",
});
const { controls } = controlsFor(setup.bId);
expect(leafBody).toBeTruthy();
expect(leafBody.style.position).toBe("relative");
expect(leafBody.style.zIndex).toBe("0");
expect(customToolbar.className).toContain("z-20");
expect(controls.style.zIndex).toBe("5");
expect(screen.queryByLabelText(`agent selector ${setup.bId}`)).toBeNull();
expect(screen.queryByRole("group", {
name: `mode CLI agent ${setup.bId}`,
})).toBeNull();
expect(screen.queryByLabelText(`split ${setup.bId} columns`)).toBeNull();
expect(screen.queryByLabelText(`split ${setup.bId} rows`)).toBeNull();
expect(screen.queryByLabelText(`close ${setup.bId}`)).toBeNull();
expect(screen.queryByRole("button", {
name: `cancel current turn ${setup.bId}`,
})).toBeNull();
expect(screen.queryByText("Busy")).toBeNull();
});
it("keeps busy Cancel above persistent cell controls and removes History (#151, #160)", async () => {