fix(layout): retirer les affichages Busy et Cancel de la cellule agent au lancement sur une tâche — #277 (retrait badge Busy, bouton Cancel/interruptCurrentTurn et layer z turnActions; états inbox/tâches de fond et composer busy préservés; QA verte ré-exécutée: 25/25 tests LayoutGrid cellControlsLayering/chat)

This commit is contained in:
2026-09-08 12:14:30 +02:00
parent fc3d124574
commit bf9ec9b358
3 changed files with 13 additions and 86 deletions

View File

@ -395,7 +395,6 @@ function StoppedAgentCellPanel({
* status/error 3 (in-cell status strip, launch-error banner, notices)
* 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
@ -405,7 +404,6 @@ const CELL_Z = {
banner: 3,
veil: 4,
controls: 5,
turnActions: 6,
} as const;
const CUSTOM_CHAT_COMPOSER_DEFAULT_HEIGHT = 64;
@ -446,7 +444,6 @@ function LeafView({
const siblingIndex = parentSplit ? (parentSplit.index === 0 ? 1 : 0) : 0;
const {
agent: agentGateway,
input,
profile: profileGateway,
system,
terminal,
@ -812,16 +809,6 @@ function LeafView({
}
}, [agentId, freshRestartedSession, liveAgents]);
async function interruptCurrentTurn(): Promise<void> {
if (!agentId || !input) return;
try {
await input.interrupt(projectId, agentId);
await refreshWorkState();
} catch (err) {
setBusyNotice({ message: describeNotice(err) });
}
}
function requestMode(target: AgentCellMode): void {
if (!effectiveCustomCliAvailable || target === cellMode) return;
if (session) setPendingModeSwitch({ target });
@ -1323,33 +1310,7 @@ function LeafView({
</button>
)}
</div>
{agentId && busyByWorkState && (
<button
type="button"
aria-label={`cancel current turn ${id}`}
title="Cancel current turn"
onClick={() => void interruptCurrentTurn()}
disabled={!input}
style={{
position: "absolute",
top: 24,
right: 20,
zIndex: CELL_Z.turnActions,
flexShrink: 0,
border: "1px solid var(--color-danger, #d45a5a)",
borderRadius: 3,
background: "var(--color-surface, #1e1e1e)",
color: "var(--color-danger, #d45a5a)",
cursor: input ? "pointer" : "default",
fontSize: 11,
padding: "1px 6px",
pointerEvents: "auto",
}}
>
Cancel
</button>
)}
{agentId && (busyByWorkState || inboxDepth > 0 || completedBackgroundTasks.length > 0) && (
{agentId && (inboxDepth > 0 || completedBackgroundTasks.length > 0) && (
<div
role="status"
aria-live="polite"
@ -1357,38 +1318,15 @@ function LeafView({
position: "absolute",
top: 24,
left: 4,
right: busyByWorkState ? 76 : undefined,
zIndex: CELL_Z.banner,
display: "flex",
maxWidth: busyByWorkState ? undefined : "calc(100% - 8px)",
maxWidth: "calc(100% - 8px)",
alignItems: "center",
gap: 4,
overflow: "hidden",
pointerEvents: "auto",
}}
>
{busyByWorkState && (
<span
title={delegatedTicket?.requesterLabel ?? activeTicket?.taskPreview}
style={{
maxWidth: 180,
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
border: "1px solid var(--color-warning, #d49b3a)",
borderRadius: 3,
background: "rgba(212, 155, 58, 0.16)",
color: "var(--color-warning, #d49b3a)",
padding: "1px 6px",
fontSize: 11,
fontWeight: 600,
}}
>
{delegatedTicket
? `Busy · ${delegatedTicket.requesterLabel}`
: "Busy"}
</span>
)}
{!busyByWorkState && inboxDepth > 0 && (
<span
title={`${inboxDepth} pending message${inboxDepth === 1 ? "" : "s"}`}