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:
2026-08-06 21:57:48 +02:00
parent bbcb303061
commit a3d94d4d5e
2 changed files with 29 additions and 0 deletions

View File

@ -338,6 +338,10 @@ function goToCell(nodeId: string): void {
* full-cell veils 4 (write-portal + F3 overlays; mutually exclusive)
* cell controls 5 (always on top and clickable)
* turn actions 6 (busy-state actions; Cancel must stay visible)
*
* The terminal/chat body must create its own z-index 0 stacking context. Custom
* CLI views can legitimately contain local high-z children (for example their
* own toolbar), but those children must stay below the cell controls.
*/
const CELL_Z = {
banner: 3,
@ -1300,8 +1304,10 @@ function LeafView({
navigating. The agent cell passes its {@link WritePortal} so keystroke
counting + injection suspension are wired; a plain cell passes none. */}
<div
data-testid="layout-leaf-body"
style={{
position: "relative",
zIndex: 0,
width: "100%",
height: "100%",
minHeight: 0,