fix(custom-cli): retrait de l'overlay busy plein panneau — blocage du chat seul — #247 (QA verte)

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.
This commit is contained in:
2026-08-23 16:35:29 +02:00
parent c62a2638fb
commit fc923b7860
2 changed files with 15 additions and 10 deletions

View File

@ -182,7 +182,7 @@ describe("LayoutGrid custom agent CLI (#147)", () => {
expect(screen.getAllByText(/mock-attachment.txt/).length).toBeGreaterThan(0); 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 gateways = await seeded(structuredProfile);
const layout = gateways.layout as MockLayoutGateway; const layout = gateways.layout as MockLayoutGateway;
const workState = gateways.workState as MockWorkStateGateway; const workState = gateways.workState as MockWorkStateGateway;
@ -218,8 +218,14 @@ describe("LayoutGrid custom agent CLI (#147)", () => {
renderGrid(gateways); renderGrid(gateways);
expect(await screen.findByTestId("custom-agent-chat-view")).toBeTruthy(); expect(await screen.findByTestId("custom-agent-chat-view")).toBeTruthy();
expect(await screen.findByTestId("target-announcements-overlay")).toBeTruthy(); expect(screen.queryByTestId("target-announcements-overlay")).toBeNull();
expect(screen.getByText("Travaille sur une demande de Main.")).toBeTruthy(); 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 () => { 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); const view = renderGrid(gateways);
expect(await screen.findByTestId("custom-agent-chat-view")).toBeTruthy(); 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(); view.unmount();
renderGrid(gateways); renderGrid(gateways);
expect(await screen.findByTestId("custom-agent-chat-view")).toBeTruthy(); 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 () => { it("persists custom CLI composer height per layout cell", async () => {

View File

@ -1561,11 +1561,10 @@ function LeafView({
</div> </div>
)} )}
{/* F3 (ticket #4): while another agent is talking to THIS agent (target), {/* 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 an availability veil showing its live réflexions. Native TUI cells
busy state (agentBusyChanged + read-model hydration), never by the raw need the full-cell guard; custom CLI cells keep the canonical busy
PTY — it retracts at idle even when a turn ends without a completion badge and composer lock only, matching their normal chat turn flow. */}
event. Self-guards on `active` (busy) and renders null otherwise. */} {!modelServerOverlay && cellMode !== "custom" && agentId != null && (
{!modelServerOverlay && agentId != null && (
<TargetAnnouncementsOverlay <TargetAnnouncementsOverlay
projectId={projectId} projectId={projectId}
agentId={agentId} agentId={agentId}