import type { Metadata } from "next"; import AppShell from "@/components/shell/AppShell"; import LiveRefresh from "@/components/queue/LiveRefresh"; import QueuePanel from "@/components/queue/QueuePanel"; import RenderRecord from "@/components/queue/RenderRecord"; import { ActivityPanel } from "@/components/system/Status"; import { Panel } from "@/components/ui/panel"; import { listActivity, runningActivity } from "@/lib/activity"; import { queueView, rendersView } from "@/lib/queue/view"; import { displayText } from "yt-dlp-transcript-common/lib/privacy/privacy-server"; export const dynamic = "force-dynamic"; export const metadata: Metadata = { title: "Jobs · umtool" }; // JOBS (4 Nov 2026, "the apps do the work"): what `umtool jobs` prints, on a // page -- the durable queue (lib/queue/: each step, its state, its error, its // full log, Cancel and Retry), every recent take render's own record (takes/ // /render.json, whoever started it: a terminal, the Takes page, the queue), // and the app's in-memory jobs. Read from disk on every request; refreshed // while something runs, silent when nothing does. export default async function JobsPage() { const [queue, renders] = await Promise.all([queueView(), rendersView()]); const running = runningActivity(); const recent = listActivity(12); const live = renders.some((r) => r.state === "running" || r.state === "waiting"); return (
{queue.steps.length} step{queue.steps.length === 1 ? "" : "s"} · umtool queue ls}> the last 7 days · umtool take status}> {renders.length === 0 ? (

No take render recorded in the last 7 days.

) : (
{renders.map((r) => ( ))}
)}
); }