fix(ui): toolbar CLI sans overlap + retrait du bouton History — #151 #160 (QA verte)

This commit is contained in:
2026-08-06 13:13:30 +02:00
parent 309c10e5e9
commit 03303aa276
2 changed files with 55 additions and 31 deletions

View File

@ -200,7 +200,6 @@ function NodeView({
workState={workState}
refreshWorkState={refreshWorkState}
refitSignal={refitSignal}
onOpenConversation={onOpenConversation}
/>
);
case "split":
@ -247,7 +246,6 @@ interface LeafViewProps {
workState: ProjectWorkState | null;
refreshWorkState: () => Promise<void>;
refitSignal: number;
onOpenConversation?: (conversationId: string) => void;
}
/**
@ -339,11 +337,13 @@ function goToCell(nodeId: string): void {
* 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)
*/
const CELL_Z = {
banner: 3,
veil: 4,
controls: 5,
turnActions: 6,
} as const;
function LeafView({
@ -359,7 +359,6 @@ function LeafView({
workState,
refreshWorkState,
refitSignal,
onOpenConversation,
}: LeafViewProps) {
// A cell can be closed only when it lives inside a (binary) split: closing it
// collapses the parent split, keeping the *sibling*. Splits are always binary
@ -679,9 +678,6 @@ function LeafView({
) ?? [];
const busyByWorkState = agentWork?.busy.state === "busy" || Boolean(activeTicket);
const delegatedTicket = activeTicket?.source.kind === "agent" ? activeTicket : undefined;
const historyConversationId =
activeTicket?.conversationId ?? conversationId ?? null;
async function interruptCurrentTurn(): Promise<void> {
if (!agentId || !input) return;
try {
@ -1176,20 +1172,21 @@ function LeafView({
</button>
)}
</div>
{agentId && (busyByWorkState || inboxDepth > 0 || completedBackgroundTasks.length > 0 || historyConversationId) && (
{agentId && (busyByWorkState || inboxDepth > 0 || completedBackgroundTasks.length > 0) && (
<div
role="status"
aria-live="polite"
style={{
position: "absolute",
top: 30,
top: 24,
left: 4,
zIndex: CELL_Z.banner,
zIndex: busyByWorkState ? CELL_Z.turnActions : CELL_Z.banner,
display: "flex",
maxWidth: "calc(100% - 8px)",
alignItems: "center",
gap: 4,
overflow: "hidden",
pointerEvents: "auto",
}}
>
{busyByWorkState && (
@ -1289,26 +1286,6 @@ function LeafView({
Cancel
</button>
)}
{historyConversationId && onOpenConversation && (
<button
type="button"
aria-label={`open cell conversation ${id}`}
title="Open conversation history"
onClick={() => onOpenConversation(historyConversationId)}
style={{
flexShrink: 0,
border: "1px solid var(--color-border, #3a3a3a)",
borderRadius: 3,
background: "var(--color-surface, #1e1e1e)",
color: "var(--color-content, #e0e0e0)",
cursor: "pointer",
fontSize: 11,
padding: "1px 6px",
}}
>
History
</button>
)}
</div>
)}
{/* Option 1 (Terminal + MCP): every cell — plain or agent — renders the