}
>
{/* Settled history recedes: dimmed favicon at rest, restored on
hover so the tail stays scannable when you're hunting. */}
{title}
{/* The PR badge stays outside the hover-fading slot: it must
remain visible AND clickable while the row is hovered. Only
the time/jump label yields to the settle affordance. */}
{prBadge}
{props.jumpLabel ??
compactSidebarTimeLabel(
formatRelativeTimeLabel(thread.latestUserMessageAt ?? thread.updatedAt),
)}
{!props.settlementSupported ? null : variantAction === "unsettle" ? (
) : (
)}
{detailsTooltip}
}
>
{newThreadShortcutLabel ? `New thread (${newThreadShortcutLabel})` : "New thread"}
{projects.length > 0 ? (
}
>
New project
) : null}
{orderedThreads.flatMap((thread, threadIndex) => {
const threadKey = scopedThreadKey(scopeThreadRef(thread.environmentId, thread.id));
const isSettledRow = settledThreadKeys.has(threadKey);
// Settled is the ONLY thing that collapses a row: every
// not-settled thread is a full card. Density comes from users
// (or the auto rules) actually settling work, not from the
// sidebar second-guessing what still matters.
const isCard = !isSettledRow;
const previousThread = threadIndex > 0 ? orderedThreads[threadIndex - 1] : null;
const previousWasCard =
previousThread != null &&
!settledThreadKeys.has(
scopedThreadKey(
scopeThreadRef(previousThread.environmentId, previousThread.id),
),
);
const showSettledGap = !isCard && previousWasCard;
const row = (
);
if (!showSettledGap) return [row];
// The divider is its own keyed list item (not part of the first
// settled row): it keeps one stable DOM node at the boundary,
// so settling a thread slides it instead of teleporting it
// along with whichever row happens to be first in the tail —
// and row heights stay independent of neighbor classification.
return [
Settled
,
row,
];
})}
{hiddenSettledCount > 0 ? (
) : null}
{orderedThreads.length === 0 ? (
{projects.length === 0 ? (
<>
No projects yet
>
) : scopedProject ? (
`No threads in ${scopedProject.title} yet`
) : (
"No threads yet"
)}