"use client"; import type { AutoQueueKindStatus } from "yt-dlp-transcript-common/views/autoQueueStatus"; import { fromInFlight } from "yt-dlp-transcript-common/views/jobRows"; import { JobRow } from "../../jobs/components/JobRow"; import type { AutoQueueKind } from "yt-dlp-transcript-common/lib/autoQueueTypes"; import { type Channel, leafOrder, leafSentence } from "./dispatch"; // The JOB kind a lane's unit runs under, so the row's label resolves // (jobKindLabel) rather than showing a raw lane id. A download unit is its own // registry job; every other lane's unit is a task on the lane's runner job. // Mirrors autoRunner.ts's RUNNER_JOB_KINDS / AUTO_DOWNLOAD_UNIT_KIND, which a // client component cannot import (that module reaches the filesystem); a // Record over the lane union, so a new lane is a compile error here. const UNIT_JOB_KIND: Record = { download: "auto-download-unit", transcription: "auto-transcribe", digest: "auto-digest", backfill: "auto-backfill", }; // What the runner is doing RIGHT NOW. `runner.inFlight` has always been in the // status payload — video id, owning channel, the leaf that claimed it and when // it started — and the old page rendered a count and threw the rest away. // // Each unit is drawn as a JOB ROW (jobs/components/JobRow.tsx, compact), off // the pure adapter `fromInFlight` — the same row the widget and /jobs draw. A // download unit is a registry job and links to its page; a transcription, // digest or backfill unit is a task on the runner's job and does not. export function InFlightList({ status, channels, now, }: { status: AutoQueueKindStatus; channels: Channel[]; now: number | null; }) { const items = status.runner.inFlight; if (items.length === 0) return null; const leaves = leafOrder(status.policy.root); return (

In flight

); }