fix(layout): barre supérieure CLI custom cliquable — stacking context du corps de leaf
Le corps d'une leaf (layout-leaf-body) crée désormais son propre stacking context (z-index 0). Les vues CLI custom peuvent comporter des enfants à haut z local (toolbar z-20) qui restaient au-dessus des contrôles de cellule (CELL_Z 5) et captaient les clics ; ils restent désormais sous les contrôles. Test de layering dédié ajouté dans LayoutGrid.cellControlsLayering.test.tsx.
This commit is contained in:
@ -206,6 +206,29 @@ 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 () => {
|
||||
const setup = await makeSplitAgentGrid();
|
||||
window.localStorage.setItem(`idea.agent-cell-mode.p1.${setup.bId}`, "custom");
|
||||
|
||||
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");
|
||||
});
|
||||
|
||||
it("keeps busy Cancel above persistent cell controls and removes History (#151, #160)", async () => {
|
||||
const setup = await makeSplitAgentGrid();
|
||||
await setup.layout.mutateLayout("p1", {
|
||||
|
||||
Reference in New Issue
Block a user