fix(custom-cli): masquage des contrôles d'overlay persistants sur la custom CLI pendant un tour occupé — #249 (QA verte)
This commit is contained in:
@ -655,6 +655,13 @@ function LeafView({
|
||||
customCliAvailable && pinnedAgent ? pinnedAgent : trustedCustomCli?.agent;
|
||||
const customCliProfile =
|
||||
customCliAvailable && pinnedProfile ? pinnedProfile : trustedCustomCli?.profile;
|
||||
const customCliActive = Boolean(
|
||||
agentId &&
|
||||
cellMode === "custom" &&
|
||||
effectiveCustomCliAvailable &&
|
||||
customCliAgent &&
|
||||
customCliProfile,
|
||||
);
|
||||
useEffect(() => {
|
||||
if (cellMode !== "custom") {
|
||||
setTrustedCustomCli(null);
|
||||
@ -767,6 +774,7 @@ function LeafView({
|
||||
task.status === "completed" || task.status === "failed" || task.status === "cancelled",
|
||||
) ?? [];
|
||||
const busyByWorkState = agentWork?.busy.state === "busy" || Boolean(activeTicket);
|
||||
const suppressCellChrome = customCliActive && busyByWorkState;
|
||||
const delegatedTicket = activeTicket?.source.kind === "agent" ? activeTicket : undefined;
|
||||
const busyActive = announcementBusyActive || busyByWorkState;
|
||||
const targetAnnouncementsFallback = delegatedTicket?.requesterLabel
|
||||
@ -1130,25 +1138,27 @@ function LeafView({
|
||||
overflow: "hidden",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: 2,
|
||||
left: 4,
|
||||
// Clear the xterm viewport scrollbar (rendered flush against the right
|
||||
// edge, ~15px wide). Without this offset the right-most control — the
|
||||
// close button — sits *behind* the scrollbar and is hard to click.
|
||||
right: 16,
|
||||
// Above every banner/veil so a cell in an error state stays manageable
|
||||
// (ticket #48).
|
||||
zIndex: CELL_Z.controls,
|
||||
display: "flex",
|
||||
gap: 2,
|
||||
alignItems: "center",
|
||||
justifyContent: "flex-end",
|
||||
overflow: "hidden",
|
||||
}}
|
||||
>
|
||||
{!suppressCellChrome && (
|
||||
<div
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: 2,
|
||||
left: 4,
|
||||
// Clear the xterm viewport scrollbar (rendered flush against the right
|
||||
// edge, ~15px wide). Without this offset the right-most control — the
|
||||
// close button — sits *behind* the scrollbar and is hard to click.
|
||||
right: 16,
|
||||
// Above every banner/veil so a cell in an error state stays manageable
|
||||
// (ticket #48). Hidden while a custom CLI turn is busy: that surface
|
||||
// owns its own header, and cell chrome must not overlap the chat viewport.
|
||||
zIndex: CELL_Z.controls,
|
||||
display: "flex",
|
||||
gap: 2,
|
||||
alignItems: "center",
|
||||
justifyContent: "flex-end",
|
||||
overflow: "hidden",
|
||||
}}
|
||||
>
|
||||
{/* Agent selector */}
|
||||
<select
|
||||
aria-label={`agent selector ${id}`}
|
||||
@ -1320,8 +1330,9 @@ function LeafView({
|
||||
✕
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{agentId && busyByWorkState && (
|
||||
</div>
|
||||
)}
|
||||
{agentId && busyByWorkState && !suppressCellChrome && (
|
||||
<button
|
||||
type="button"
|
||||
aria-label={`cancel current turn ${id}`}
|
||||
@ -1347,7 +1358,7 @@ function LeafView({
|
||||
Cancel
|
||||
</button>
|
||||
)}
|
||||
{agentId && (busyByWorkState || inboxDepth > 0 || completedBackgroundTasks.length > 0) && (
|
||||
{agentId && !suppressCellChrome && (busyByWorkState || inboxDepth > 0 || completedBackgroundTasks.length > 0) && (
|
||||
<div
|
||||
role="status"
|
||||
aria-live="polite"
|
||||
|
||||
Reference in New Issue
Block a user