Files
UHD_Media_Tool/apps/web/app/routes/console/tasks.$id.tsx
T
rootandClaude Opus 5.5 7103bc8f7c feat(web): W3-3 site workbench, sources/feeds/snapshots, downloads with business timeline, organization records and agent sessions
- sites + /sites/:siteId: organized view with snapshot-first release list, inventory overlay,
  candidate reasons, volatile-field recheck, stale marking that keeps existing data, live search,
  unified download entry; origin view placeholder (M2)
- sources: feed CRUD/enable/fetch/reset, cursor/health/gap hints; per-site snapshot history
- tasks: download tasks with pause/resume (threshold pause cannot be bypassed), plans,
  cache volume thresholds and cleanup, business timeline (observation → plan → download →
  organization → agent/engine)
- organize: record list/detail with file-level results, manual organize with dryRun preview
- agent: session list/page and layout drawer with context prefix; streaming events,
  tool cards, rejection alerts, compaction, budget meters, model text vs server report;
  mock switch (?mock=1) until W2-D endpoints land

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-27 20:52:32 +08:00

39 lines
1.3 KiB
TypeScript

import { ArrowLeft } from "lucide-react";
import { Link, useParams } from "react-router";
import { useDownloadTask } from "~/api/downloads.ts";
import { ErrorState, LoadingState } from "~/components/console/empty-state.tsx";
import { PageHeader } from "~/components/console/page-header.tsx";
import { DownloadDetail } from "~/components/downloads/download-detail.tsx";
import { Button } from "~/components/ui/button.tsx";
export default function DownloadTaskPage() {
const { id = "" } = useParams();
const task = useDownloadTask(id);
return (
<>
<PageHeader
title={task.data?.name ?? "下载任务"}
description="下载 → 整理 → 核验的业务时间线与子任务"
className="[&_h1]:break-all"
actions={
<Button asChild variant="ghost" size="sm">
<Link to="/console/tasks">
<ArrowLeft />
下载与任务
</Link>
</Button>
}
/>
<div className="pg-slab rounded-xl p-4 md:p-5">
{task.isPending ? (
<LoadingState rows={5} />
) : task.error ? (
<ErrorState plain error={task.error} onRetry={() => void task.refetch()} />
) : (
<DownloadDetail task={task.data} />
)}
</div>
</>
);
}