- {/* Stacked header bars — one per task relationship. */}
-
- {bars.map((bar, index) => {
- const { relationship, task, summary, tooltip, runActionLabel } =
- bar;
- const showRunAction = !!runActionLabel;
- const isExpanded = expanded === relationship;
- const isInteractive = !!task;
- // When we have both an expandable task and a run button, the outer
- // element becomes a
so we can legally nest the
- // run button inside. Without a task, there's nothing to expand; the
- // run button becomes the sole interactive control.
- const hideStatusLabel = showRunAction && !task;
-
- const rowClassName = [
- "flex w-full items-center gap-2 bg-transparent px-2 @md:px-3 @lg:px-4 @xl:px-5 @2xl:px-6 @3xl:px-8 @4xl:px-10 @5xl:px-12 py-2 text-left transition-colors",
- index > 0 ? "border-gray-5 border-t" : "",
- isInteractive
- ? "cursor-pointer hover:bg-gray-2"
- : showRunAction
- ? "cursor-default"
- : "cursor-default opacity-70",
- isExpanded && isInteractive ? "bg-gray-2" : "",
- ]
- .filter(Boolean)
- .join(" ");
-
- const toggleExpand = () =>
- setExpanded((curr) =>
- curr === relationship ? null : relationship,
- );
-
- const rowInner = (
- <>
-
{summary.icon}
-
- {RELATIONSHIP_LABELS[relationship]}
-
- {hideStatusLabel ? (
-
- ) : (
-
- {bar.prUrl
- ? summary.label
- : relationship === "implementation" &&
- (task?.latest_run?.status === "queued" ||
- task?.latest_run?.status === "in_progress")
- ? "Working on a PR…"
- : summary.label}
-
- )}
- {bar.prUrl && (
-
- )}
- {showRunAction && (
-
- )}
- {isInteractive && (
-
-
-
- )}
- >
- );
-
- const row = isInteractive ? (
- showRunAction ? (
- // biome-ignore lint/a11y/useSemanticElements: a