gitflarePublicPartly agent-ready50
cf-workflows-pipeline
Durable content pipeline on Cloudflare Workflows: ingest, extract, summarise with Workers AI via AI Gateway, human approval, publish.
- LicenseApache-2.0
- LanguageTypeScript
- Last landed
629b2faOct 20, 2026
Fix pipeline runs failing at ingest (steps.attempt NOT NULL)
629b2faimport { el, icon } from "./dom.js";import { api } from "./api.js";import { normState, stateLabel, filterRuns, preview } from "./lib.js";export const chip = (s, attempt) => { const n = normState(s); return el("span", { class: `chip s-${n}` }, icon(n), stateLabel(n, attempt)); };export function errorCard(msg, retry) { return el("div", { class: "card err", role: "alert" }, el("h2", {}, "Something went wrong"), el("p", {}, msg), retry && el("button", { class: "btn", onclick: retry }, "Try again")); }export function runsView(go) { const root = el("div", {}, el("h1", {}, "Runs")); const body = el("div", {}, el("div", { class: "skel", style: "height:56px" }), el("div", { class: "skel", style: "height:56px" })); let runs = [], filter = "all"; const bar = el("div", { class: "filters", role: "group", "aria-label": "Filter by status" }); const draw = () => { bar.replaceChildren(...["all", "running", "waiting", "done", "failed", "rejected"].map((f) => el("button", { class: "btn", "aria-pressed": String(f === filter), onclick: () => { filter = f; draw(); } }, f === "all" ? "All" : stateLabel(f)))); const l = filterRuns(runs, filter); body.replaceChildren(!l.length ? el("div", { class: "card" }, el("h2", {}, runs.length ? "No runs match" : "No runs yet"), el("p", { class: "muted" }, runs.length ? "Try another filter." : "Launch your first pipeline run."), el("a", { class: "btn pri", href: "/", "data-link": true }, "New run")) : el("ul", { class: "list" }, l.map((r) => el("li", {}, el("a", { class: "item", href: `/runs/${r.id}`, "data-link": true }, el("span", { class: "t" }, preview(r.title || r.url || r.source || r.id, 80)), chip(r.status)))))); }; const load = async () => { try { const d = await api("/api/runs"); runs = Array.isArray(d) ? d : d.runs || []; draw(); } catch (e) { body.replaceChildren(errorCard(e.message, load)); } }; root.append(bar, body); load(); return root;}