From fc923b7860b131dc1d2bd38c885e761d5049c039 Mon Sep 17 00:00:00 2001 From: Blomios Date: Sun, 23 Aug 2026 16:35:29 +0200 Subject: [PATCH] =?UTF-8?q?fix(custom-cli):=20retrait=20de=20l'overlay=20b?= =?UTF-8?q?usy=20plein=20panneau=20=E2=80=94=20blocage=20du=20chat=20seul?= =?UTF-8?q?=20=E2=80=94=20#247=20(QA=20verte)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Les cellules custom CLI ne rendent plus le TargetAnnouncementsOverlay quand l'agent est busy : le badge busy canonique et le lock du composer (comportement du chat après envoi d'un message) suffisent, la vue terminal/chat reste visible. Les cellules TUI natives conservent le voile plein panneau. --- .../src/features/layout/LayoutGrid.chat.test.tsx | 16 +++++++++++----- frontend/src/features/layout/LayoutGrid.tsx | 9 ++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/frontend/src/features/layout/LayoutGrid.chat.test.tsx b/frontend/src/features/layout/LayoutGrid.chat.test.tsx index ff41c1dc..5091bab6 100644 --- a/frontend/src/features/layout/LayoutGrid.chat.test.tsx +++ b/frontend/src/features/layout/LayoutGrid.chat.test.tsx @@ -182,7 +182,7 @@ describe("LayoutGrid custom agent CLI (#147)", () => { expect(screen.getAllByText(/mock-attachment.txt/).length).toBeGreaterThan(0); }); - it("keeps the target announcement overlay visible in custom mode while busy (#232)", async () => { + it("keeps custom CLI visible while busy and locks only the composer (#247)", async () => { const gateways = await seeded(structuredProfile); const layout = gateways.layout as MockLayoutGateway; const workState = gateways.workState as MockWorkStateGateway; @@ -218,8 +218,14 @@ describe("LayoutGrid custom agent CLI (#147)", () => { renderGrid(gateways); expect(await screen.findByTestId("custom-agent-chat-view")).toBeTruthy(); - expect(await screen.findByTestId("target-announcements-overlay")).toBeTruthy(); - expect(screen.getByText("Travaille sur une demande de Main.")).toBeTruthy(); + expect(screen.queryByTestId("target-announcements-overlay")).toBeNull(); + expect(screen.getByText("Busy · Main")).toBeTruthy(); + await waitFor(() => + expect(screen.getByLabelText(/message CLI custom/)).toHaveProperty( + "disabled", + true, + ), + ); }); it("renders requester-side delegation fallback in custom mode after remount (#232)", async () => { @@ -265,13 +271,13 @@ describe("LayoutGrid custom agent CLI (#147)", () => { const view = renderGrid(gateways); expect(await screen.findByTestId("custom-agent-chat-view")).toBeTruthy(); - expect(await screen.findByText("Délégation en cours.")).toBeTruthy(); + expect(await screen.findByText("Worker attend Architect")).toBeTruthy(); view.unmount(); renderGrid(gateways); expect(await screen.findByTestId("custom-agent-chat-view")).toBeTruthy(); - expect(await screen.findByText("Délégation en cours.")).toBeTruthy(); + expect(await screen.findByText("Worker attend Architect")).toBeTruthy(); }); it("persists custom CLI composer height per layout cell", async () => { diff --git a/frontend/src/features/layout/LayoutGrid.tsx b/frontend/src/features/layout/LayoutGrid.tsx index 196047a5..c99802f3 100644 --- a/frontend/src/features/layout/LayoutGrid.tsx +++ b/frontend/src/features/layout/LayoutGrid.tsx @@ -1561,11 +1561,10 @@ function LeafView({ )} {/* F3 (ticket #4): while another agent is talking to THIS agent (target), - an availability veil showing its live réflexions. Driven by the target's - busy state (agentBusyChanged + read-model hydration), never by the raw - PTY — it retracts at idle even when a turn ends without a completion - event. Self-guards on `active` (busy) and renders null otherwise. */} - {!modelServerOverlay && agentId != null && ( + an availability veil showing its live réflexions. Native TUI cells + need the full-cell guard; custom CLI cells keep the canonical busy + badge and composer lock only, matching their normal chat turn flow. */} + {!modelServerOverlay && cellMode !== "custom" && agentId != null && (