import { For, type JSX, Show } from "solid-js"; import { CONFIG } from "../config"; import { fmtAge, shortText } from "../format"; import { statusResource } from "../state"; import { type IssueRow, type LatestEvent, TERMINAL_ISSUE_STATES } from "../types"; import { GlassCard } from "./GlassCard"; import { IssueLink, PrLink } from "./IssueLink"; import { Pill } from "./Pill"; export interface IssuesProps { onRetry: (deliveryId: string) => void; } export function Issues(props: IssuesProps): JSX.Element { const active = (): IssueRow[] => { const s = statusResource(); if (!s) return []; return s.issues.filter((i) => !TERMINAL_ISSUE_STATES.has(i.state)); }; return ( {active().length}}> no active issues}>
{(issue) => }
issue state last event class branch pr error
); } interface RowProps { issue: IssueRow; onRetry: (deliveryId: string) => void; } function IssueRowView(props: RowProps): JSX.Element { const ev = (): LatestEvent | null => props.issue.latest_event; return ( {props.issue.state} —}> {(latest) => ( <> {latest().state} {latest().event_type} · attempt #{latest().attempts} ·{" "} {fmtAge(latest().received_at)} )} {props.issue.classification ?? ""} {props.issue.branch ? ( {props.issue.branch} ) : ( — )} —} > {shortText(ev()?.last_error)} —} > ); }