huskies: merge 983

This commit is contained in:
dave
2026-05-13 15:25:02 +00:00
parent f268dca5bb
commit e6d051d016
4 changed files with 283 additions and 152 deletions
+22 -64
View File
@@ -65,70 +65,29 @@ const STAGE_LABELS: Record<string, string> = {
/// A single story row inside a project pipeline card.
/** Render one story row in a gateway-aggregate panel: `#<id> <name>` with stage badge. */
export function StoryRow({ item }: { item: PipelineItem }) {
const color = STAGE_COLORS[item.stage] ?? "#8b949e";
const label = STAGE_LABELS[item.stage] ?? item.stage;
const idNum = item.story_id.match(/^(\d+)/)?.[1];
const agentStatus = item.agent?.status;
const isStuck = item.blocked || (item.merge_failure != null && item.merge_failure !== "");
const isStuck = item.merge_failure != null || item.blocked;
const recoveryBadge = isStuck
? agentStatus === "running"
? (
<span
data-testid={`recovery-badge-${item.story_id}`}
title="Recovery in progress — no human action needed"
style={{
fontSize: "0.75em",
fontWeight: 700,
color: "#e3b341",
background: "#2a1e00",
border: "1px solid #6e4f00",
borderRadius: "4px",
padding: "1px 5px",
flexShrink: 0,
}}
>
RECOVERING
</span>
)
: agentStatus === "pending"
? (
<span
data-testid={`recovery-badge-${item.story_id}`}
title="Recovery scheduled — waiting for a slot"
style={{
fontSize: "0.75em",
fontWeight: 700,
color: "#e3b341",
background: "#2a1e00",
border: "1px solid #6e4f00",
borderRadius: "4px",
padding: "1px 5px",
flexShrink: 0,
}}
>
QUEUED
</span>
)
: (
<span
data-testid={`recovery-badge-${item.story_id}`}
title={item.merge_failure ? "Merge failed — needs human" : "Blocked — awaiting human unblock"}
style={{
fontSize: "0.75em",
fontWeight: 700,
color: "#f85149",
background: "#2a1010",
border: "1px solid #6e1b1b",
borderRadius: "4px",
padding: "1px 5px",
flexShrink: 0,
}}
>
STUCK
</span>
)
: null;
let color: string;
let label: string;
if (isStuck) {
const agentStatus = item.agent?.status;
if (agentStatus === "running") {
color = "#e3b341";
label = "⟳ RECOVERING";
} else if (agentStatus === "pending") {
color = "#e3b341";
label = "⏳ QUEUED";
} else {
color = "#f85149";
label = item.merge_failure != null ? "✕ FAILED" : "⊘ BLOCKED";
}
} else {
color = STAGE_COLORS[item.stage] ?? "#8b949e";
label = STAGE_LABELS[item.stage] ?? item.stage;
}
const idNum = item.story_id.match(/^(\d+)/)?.[1];
return (
<div
@@ -153,7 +112,6 @@ export function StoryRow({ item }: { item: PipelineItem }) {
>
{label}
</span>
{recoveryBadge}
<span style={{ color: "#e6edf3", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
{idNum && <span style={{ color: "#8b949e", fontFamily: "monospace" }}>#{idNum}{" "}</span>}
{item.name}