Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

fix(tasks): 做完的自动修复批次在最近完成里也并成一张卡片

longmeidao195f18cd0557
diff --git a/frontend/src/react/activity/activity-page.tsx b/frontend/src/react/activity/activity-page.tsx
index d120f7b38..66cc73a64 100644
--- a/frontend/src/react/activity/activity-page.tsx
+++ b/frontend/src/react/activity/activity-page.tsx
@@ -42,6 +42,8 @@ import {
/** 一张卡里最多列多少条后继。几批合成一张卡时会有上千条,全画出来一屏都是同一句。 */
const FOLLOWUP_ROWS = 50;
+/** 自己只负责派发后继的任务:一轮只是「安排了几项」,要看的是那几项的结果。 */
+const DISPATCHERS = new Set(['upgrade-repairs']);
/* 完成绿、失败红、进行中蓝、意外中断黄,主动取消和排队为中性。 */
const BADGE_COLORS: Record<string, 'lime' | 'rose' | 'yellow' | 'blue' | 'neutral'> = {
@@ -102,7 +104,8 @@ function RunCard(
) {
/* 一轮派出上千条后继时只下发最近几十条,合并的几批又可能各带几十条:标题写全数,
列表先列在跑与排队的、再列最近结束的,最多 `FOLLOWUP_ROWS` 条,并说清只列了其中几条。 */
- const rank = (row: TaskRunPayload) => (row.status === 'running' ? 2 : row.status === 'pending' ? 1 : 0);
+ const rank = (row: TaskRunPayload) => (row.status === 'running' ? 3 : row.status === 'pending' ? 2
+ : row.status === 'failed' || row.status === 'interrupted' ? 1 : 0);
const listed = followups ? [...followups].sort((a, b) =>
rank(b) - rank(a) || b.id - a.id).slice(0, FOLLOWUP_ROWS) : [];
const shown = listed.length;
@@ -173,11 +176,17 @@ function RunningRun({ run, followups }: { run: TaskRunPayload; followups?: TaskR
* 任务卡只记这一轮的历史:此刻还没解决的问题和「立即重试」在页顶「需要处理」那一块。
* `latest` 说它是不是同一种任务最新的那一轮:有些任务只有那一轮还有处理入口。 */
function SettledRun(
- { run, followups, runs, latest, followupTotal }:
+ { run, followups, runs, latest, followupTotal, followupFailed = 0 }:
{ run: TaskRunPayload; followups?: TaskRunPayload[]; runs?: TaskRunPayload[]; latest: boolean;
- followupTotal?: number },
+ followupTotal?: number; followupFailed?: number },
) {
- const summary = summaryItems(run.result_summary).filter((line) => line !== run.error);
+ /* 几批派发并成一张时,最新那一批的「已安排 64 项」说不清整件事:改说一共处理了几项、失败几项,
+ 有失败时徽章写发现问题,失败的那几条在任务明细里排在前面。 */
+ const batches = Boolean(runs && runs.length > 1 && followupTotal);
+ const summary = batches
+ ? [`共处理 ${followupTotal!.toLocaleString()} 项`, followupFailed ? `其中 ${followupFailed.toLocaleString()} 项失败` : '']
+ .filter(Boolean)
+ : summaryItems(run.result_summary).filter((line) => line !== run.error);
const issues = taskIssues(run);
const destination = problemDestination(run, latest);
const elapsed = elapsedText(run.elapsed_seconds);
@@ -188,7 +197,8 @@ function SettledRun(
: [TRIGGER_LABELS[run.trigger] || run.trigger, momentText(run.finished_at),
elapsed && `用时 ${elapsed}`]).filter(Boolean).join(' · ');
return (
- <RunCard run={run} meta={meta} footer={run.error} followups={followups} followupTotal={followupTotal}>
+ <RunCard run={run} meta={meta} footer={run.error} followups={followups} followupTotal={followupTotal}
+ badge={batches && followupFailed ? <Chip color="yellow">发现问题</Chip> : undefined}>
{/* 只有一句摘要时不加项目符号:单独一个圆点读起来像漏了下文。 */}
{summary.length === 1
? <p className="text-caption-1-regular text-text-secondary wrap-anywhere">{summary[0]}</p>
@@ -321,13 +331,15 @@ export function ActivityPage() {
const finished = settled.filter((run) => !working.includes(run)
&& !skipped.some((row) => row.id === run.id));
// 每小时一轮的定时检查什么也没发生时一条条摆出来,一页就被同一句「已检查 83」占满。
- // 派了后继的那一轮,后继全部顺利做完才算例行,有一条失败就单独摆出来。
+ // 派了后继的那一轮,后继全部顺利做完才算例行,有一条失败就单独摆出来。只负责派发的那种
+ // (自动修复每分钟一批)例外:同一件事的几批照样并成一张,失败数写在卡上。
const quietChildren = (run: TaskRunPayload) => {
const children = byParent.get(run.id) || [];
return children.every((row) => row.status === 'succeeded' && !hasResultProblems(row))
&& followupTally(counts, [run]).failed === 0;
};
- const folds = foldRoutine(finished, (run) => isRoutine(run) && quietChildren(run));
+ const folds = foldRoutine(finished, (run) => isRoutine(run)
+ && (quietChildren(run) || DISPATCHERS.has(run.task_key)));
const newest = latestOfKind(allRuns);
const quiet = !running.length && !working.length && !skipped.length && !finished.length;
return (
@@ -364,9 +376,11 @@ export function ActivityPage() {
{finished.length || hasEarlier
? <Section title="最近完成">
{finished.length
- ? <RunList>{folds.map(({ run, runs }) => (
- <SettledRun key={run.id} run={run} runs={runs} latest={newest.has(run.id)}
- followups={childrenOf(runs)} followupTotal={followupTally(counts, runs).total} />))}</RunList>
+ ? <RunList>{folds.map(({ run, runs }) => {
+ const tally = followupTally(counts, runs);
+ return <SettledRun key={run.id} run={run} runs={runs} latest={newest.has(run.id)}
+ followups={childrenOf(runs)} followupTotal={tally.total} followupFailed={tally.failed} />;
+ })}</RunList>
: null}
{more.error ? <Note tone="error">{errorMessage(more.error)}</Note> : null}
{hasEarlier
diff --git a/frontend/test/react/activity.test.tsx b/frontend/test/react/activity.test.tsx
index 80a060c9a..385951e48 100644
--- a/frontend/test/react/activity.test.tsx
+++ b/frontend/test/react/activity.test.tsx
@@ -244,6 +244,28 @@ it('跑完那一轮显示摘要,失败那一轮显示原因', async () => {
expect(host.querySelector('[data-status=succeeded] ul')).toBeNull();
});
+it('做完的几批派发并成一张卡,摘要说一共处理了几项、失败几项,失败的明细排在前面', async () => {
+ const batch = (id: number, minute: number) => run({
+ id, task_key: 'upgrade-repairs', task_label: '自动修复', trigger: 'scheduled', status: 'succeeded',
+ progress_total: null, finished_at: `2026-10-28T08:${minute}:00Z`, result_summary: { outcome: '已安排 64 项处理' } });
+ const child = (id: number, parent: number, status: string) => followup(parent, {
+ id, task_key: 'upgrade-library', task_label: '自动修复资料', status,
+ result_summary: { outcome: '影片升级补全完成', name: `ABC-${id}` }, followup_key: `upgrade-library:x:${id}` });
+ const { host } = await open(payload({
+ finished: [batch(3, 43), batch(2, 42), batch(1, 41), child(31, 3, 'succeeded'), child(21, 2, 'failed'), child(11, 1, 'succeeded')],
+ followup_counts: { 1: { succeeded: 64 }, 2: { succeeded: 62, failed: 2 }, 3: { succeeded: 63, failed: 1 } },
+ }));
+ const cards = host.querySelectorAll('[data-task-key=upgrade-repairs]');
+ expect(cards).toHaveLength(1);
+ const card = cards[0]!;
+ expect(card.textContent).toContain('近 3 轮');
+ expect(card.querySelector('span')?.textContent).toBe('发现问题');
+ expect([...card.querySelectorAll(':scope > div:first-child ul > li')].map((node) => node.textContent))
+ .toEqual(['共处理 192 项', '其中 3 项失败']);
+ expect(card.querySelector('summary')?.textContent).toBe('任务明细 · 192 项');
+ expect(card.querySelector('[data-followup-key]')?.getAttribute('data-status')).toBe('failed');
+});
+
it('派出几十条后继的几批合成一张进行中的卡,进度按计数,正在跑的排最前,排队的不给空的技术详情', async () => {
const parent = (id: number, finished_at: string) => run({
id, task_key: 'upgrade-repairs', task_label: '自动修复', trigger: 'scheduled', status: 'succeeded',
diff --git a/web/dist/peach-app.activity-page-DXU2jLVg.js b/web/dist/peach-app.activity-page-B66P-r0P.js
similarity index 80%
rename from web/dist/peach-app.activity-page-DXU2jLVg.js
rename to web/dist/peach-app.activity-page-B66P-r0P.js
index c79079f93..cabc265ce 100644
--- a/web/dist/peach-app.activity-page-DXU2jLVg.js
+++ b/web/dist/peach-app.activity-page-B66P-r0P.js
@@ -1,10 +1,10 @@
(function() {
try {
var e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, t = new e.Error().stack;
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "29ef22fd-501f-43c1-bfd3-ef1934939de5", e._sentryDebugIdIdentifier = "sentry-dbid-29ef22fd-501f-43c1-bfd3-ef1934939de5");
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7391b49e-1786-4359-92f7-886e1ebb4c6f", e._sentryDebugIdIdentifier = "sentry-dbid-7391b49e-1786-4359-92f7-886e1ebb4c6f");
} catch {}
})();
-import { Button as e, Chip as t, Disclosure as n, DownloadsPanel as r, EmptyState as i, LinkButton as a, LoadingDots as o, Note as s, Progress as c, TASKS_KEY as l, TRIGGER_LABELS as u, __toESM as d, apiGet as f, apiSend as p, busyProps as m, cardClass as h, elapsedText as g, errorMessage as _, f1 as ee, fetchEarlier as te, fetchTasks as v, foldByKind as ne, foldRoutine as re, followupDetail as y, followupTally as b, groupFollowups as ie, hasResultProblems as x, i2 as S, isActive as C, isRoutine as w, latestOfKind as ae, mergeFinished as T, momentText as E, pollInterval as oe, problemDestination as D, progressText as O, require_jsx_runtime as k, require_react as A, statusLabel as j, summaryItems as M, taskIssues as N, uo as se, useMutation as P, useQuery as F, useQueryClient as I } from "./peach-app.js";
+import { Button as e, Chip as t, Disclosure as n, DownloadsPanel as r, EmptyState as i, LinkButton as a, LoadingDots as o, Note as s, Progress as c, TASKS_KEY as l, TRIGGER_LABELS as u, __toESM as d, apiGet as f, apiSend as p, busyProps as m, cardClass as h, elapsedText as g, errorMessage as _, f1 as ee, fetchEarlier as v, fetchTasks as te, foldByKind as ne, foldRoutine as y, followupDetail as b, followupTally as x, groupFollowups as re, hasResultProblems as S, i2 as C, isActive as w, isRoutine as ie, latestOfKind as ae, mergeFinished as T, momentText as E, pollInterval as oe, problemDestination as D, progressText as O, require_jsx_runtime as k, require_react as A, statusLabel as j, summaryItems as M, taskIssues as N, uo as se, useMutation as P, useQuery as F, useQueryClient as I } from "./peach-app.js";
import { CodeBlock as L } from "./peach-app.code-block-CyDva4Ms.js";
import { Page as R } from "./peach-app.page-QAncjzM1.js";
import { ErrorDetails as z, ErrorExcerpt as B } from "./peach-app.error-excerpt-B8v2xEIP.js";
@@ -44,7 +44,7 @@ function W({ issue: t }) {
children: [/* @__PURE__ */ (0, H.jsx)(a, {
href: t.href,
size: "small",
- trailingIcon: S,
+ trailingIcon: C,
children: t.link_label
}), t.retry ? /* @__PURE__ */ (0, H.jsx)(e, {
variant: "secondary",
@@ -59,7 +59,7 @@ function W({ issue: t }) {
});
}
// src/react/activity/activity-page.tsx
-var G = 50, K = {
+var G = 50, le = /* @__PURE__ */ new Set(["upgrade-repairs"]), K = {
succeeded: "lime",
failed: "rose",
cancelled: "neutral",
@@ -68,7 +68,7 @@ var G = 50, K = {
pending: "neutral"
};
function q({ run: e }) {
- let n = e.status === "failed" && e.task_key === "library-processing" && e.result_summary?.outcome === "partial", r = n || e.status === "succeeded" && x(e);
+ let n = e.status === "failed" && e.task_key === "library-processing" && e.result_summary?.outcome === "partial", r = n || e.status === "succeeded" && S(e);
return /* @__PURE__ */ (0, H.jsx)(t, {
color: r ? "yellow" : K[e.status] ?? "neutral",
children: n ? "部分项目需处理" : r ? "发现问题" : j(e.status)
@@ -78,7 +78,7 @@ function J({ rows: e }) {
return /* @__PURE__ */ (0, H.jsx)("ul", {
className: "flex min-w-0 flex-col",
children: e.map((e) => {
- let t = y(e);
+ let t = b(e);
return /* @__PURE__ */ (0, H.jsxs)("li", {
"data-status": e.status,
"data-followup-key": e.followup_key,
@@ -111,7 +111,7 @@ function J({ rows: e }) {
});
}
function Y({ run: e, meta: t, children: r, footer: i, followups: a, followupTotal: o = 0, badge: s }) {
- let c = (e) => e.status === "running" ? 2 : +(e.status === "pending"), l = a ? [...a].sort((e, t) => c(t) - c(e) || t.id - e.id).slice(0, G) : [], u = l.length, d = Math.max(a?.length || 0, o);
+ let c = (e) => e.status === "running" ? 3 : e.status === "pending" ? 2 : +(e.status === "failed" || e.status === "interrupted"), l = a ? [...a].sort((e, t) => c(t) - c(e) || t.id - e.id).slice(0, G) : [], u = l.length, d = Math.max(a?.length || 0, o);
return /* @__PURE__ */ (0, H.jsxs)("li", {
id: `run-${e.id}`,
"data-status": e.status,
@@ -145,7 +145,7 @@ function Y({ run: e, meta: t, children: r, footer: i, followups: a, followupTota
children: /* @__PURE__ */ (0, H.jsxs)(n, {
summary: `任务明细 · ${d.toLocaleString()} 项`,
contentClassName: "pb-2.5",
- defaultOpen: l.some((e) => C(e)),
+ defaultOpen: l.some((e) => w(e)),
children: [u < d ? /* @__PURE__ */ (0, H.jsxs)("p", {
className: "text-caption-1-regular text-text-secondary",
children: [
@@ -178,7 +178,7 @@ function Y({ run: e, meta: t, children: r, footer: i, followups: a, followupTota
]
});
}
-function le({ run: e, followups: t }) {
+function ue({ run: e, followups: t }) {
let n = e.progress_total || 0, r = e.progress_current || 0, i = e.progress_label || "正在进行", a = g(e.elapsed_seconds), s = [u[e.trigger] || e.trigger, a && `已跑 ${a}`].filter(Boolean).join(" · ");
return /* @__PURE__ */ (0, H.jsx)(Y, {
run: e,
@@ -202,39 +202,43 @@ function le({ run: e, followups: t }) {
}) : /* @__PURE__ */ (0, H.jsx)(o, { label: i })
});
}
-function X({ run: e, followups: t, runs: r, latest: i, followupTotal: o }) {
- let s = M(e.result_summary).filter((t) => t !== e.error), c = N(e), l = D(e, i), d = g(e.elapsed_seconds), f = r && r.length > 1 ? r[r.length - 1] : void 0, p = (f ? [
+function X({ run: e, followups: r, runs: i, latest: o, followupTotal: s, followupFailed: c = 0 }) {
+ let l = !!(i && i.length > 1 && s), d = l ? [`共处理 ${s.toLocaleString()} 项`, c ? `其中 ${c.toLocaleString()} 项失败` : ""].filter(Boolean) : M(e.result_summary).filter((t) => t !== e.error), f = N(e), p = D(e, o), m = g(e.elapsed_seconds), h = i && i.length > 1 ? i[i.length - 1] : void 0, _ = (h ? [
u[e.trigger] || e.trigger,
- `近 ${r.length} 轮`,
- `${E(f.finished_at)} – ${E(e.finished_at)}`
+ `近 ${i.length} 轮`,
+ `${E(h.finished_at)} – ${E(e.finished_at)}`
] : [
u[e.trigger] || e.trigger,
E(e.finished_at),
- d && `用时 ${d}`
+ m && `用时 ${m}`
]).filter(Boolean).join(" · ");
return /* @__PURE__ */ (0, H.jsxs)(Y, {
run: e,
- meta: p,
+ meta: _,
footer: e.error,
- followups: t,
- followupTotal: o,
+ followups: r,
+ followupTotal: s,
+ badge: l && c ? /* @__PURE__ */ (0, H.jsx)(t, {
+ color: "yellow",
+ children: "发现问题"
+ }) : void 0,
children: [
- s.length === 1 ? /* @__PURE__ */ (0, H.jsx)("p", {
+ d.length === 1 ? /* @__PURE__ */ (0, H.jsx)("p", {
className: "text-caption-1-regular text-text-secondary wrap-anywhere",
- children: s[0]
- }) : s.length ? /* @__PURE__ */ (0, H.jsx)("ul", {
+ children: d[0]
+ }) : d.length ? /* @__PURE__ */ (0, H.jsx)("ul", {
className: "flex list-disc flex-col gap-1 pl-5 text-caption-1-regular text-text-secondary wrap-anywhere",
- children: s.map((e, t) => /* @__PURE__ */ (0, H.jsx)("li", { children: e }, t))
+ children: d.map((e, t) => /* @__PURE__ */ (0, H.jsx)("li", { children: e }, t))
}) : null,
- c.length ? /* @__PURE__ */ (0, H.jsx)(n, {
- summary: `问题详情 · ${c.length} 项`,
+ f.length ? /* @__PURE__ */ (0, H.jsx)(n, {
+ summary: `问题详情 · ${f.length} 项`,
contentClassName: "pt-2",
children: /* @__PURE__ */ (0, H.jsx)(z, {
label: "任务问题详情",
children: /* @__PURE__ */ (0, H.jsx)("ul", {
className: "flex min-w-0 flex-col gap-3",
"data-task-issues": "",
- children: c.map((e, t) => /* @__PURE__ */ (0, H.jsxs)("li", {
+ children: f.map((e, t) => /* @__PURE__ */ (0, H.jsxs)("li", {
className: "flex min-w-0 flex-col gap-1 text-body-2-regular wrap-anywhere",
children: [/* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-regular text-text-primary",
@@ -250,22 +254,22 @@ function X({ run: e, followups: t, runs: r, latest: i, followupTotal: o }) {
}, `${e.source}-${t}`))
})
})
- }) : x(e) && ["follow-check", "feed-check"].includes(e.task_key) ? /* @__PURE__ */ (0, H.jsx)("p", {
+ }) : S(e) && ["follow-check", "feed-check"].includes(e.task_key) ? /* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: "未取得本轮逐项详情,可到来源列表查看检查结果。"
}) : null,
- l ? /* @__PURE__ */ (0, H.jsx)(a, {
- href: l.href,
+ p ? /* @__PURE__ */ (0, H.jsx)(a, {
+ href: p.href,
size: "small",
- trailingIcon: S,
+ trailingIcon: C,
className: "self-start",
- children: l.label
+ children: p.label
}) : null
]
});
}
-function ue({ runs: e, followups: n, counts: r }) {
- let i = e[0], a = e[e.length - 1], o = b(r, e), s = Math.max(o.total, n.length), l = o.total ? o.settled : n.filter((e) => !C(e)).length, d = o.total ? o.failed : n.filter((e) => e.status === "failed" || e.status === "interrupted").length, f = [
+function de({ runs: e, followups: n, counts: r }) {
+ let i = e[0], a = e[e.length - 1], o = x(r, e), s = Math.max(o.total, n.length), l = o.total ? o.settled : n.filter((e) => !w(e)).length, d = o.total ? o.failed : n.filter((e) => e.status === "failed" || e.status === "interrupted").length, f = [
u[i.trigger] || i.trigger,
e.length > 1 ? `${e.length} 批` : "",
`${E(a.started_at || a.finished_at)} 开始`
@@ -319,41 +323,41 @@ function Q({ live: e = !1, children: t }) {
function $() {
let t = F({
queryKey: l,
- queryFn: ({ signal: e }) => v(e),
+ queryFn: ({ signal: e }) => te(e),
refetchInterval: (e) => oe(e.state.data)
}), n = t.data, a = n?.finished, [o, c] = (0, V.useState)([]), [u, d] = (0, V.useState)(!1), [f, p] = (0, V.useState)({}), [h, g] = (0, V.useState)(a);
a !== h && (g(a), o.length && h && c(T(o, h)));
- let y = P({
- mutationFn: ({ oldest: e }) => te(e),
+ let b = P({
+ mutationFn: ({ oldest: e }) => v(e),
onSuccess: (e, { shown: t }) => {
c((n) => T(n, t, e.finished || [])), d(!!e.finished_has_more), p((t) => ({
...t,
...e.followup_counts
}));
}
- }), S = t.error ? _(t.error) : "";
+ }), C = t.error ? _(t.error) : "";
if (!n) return /* @__PURE__ */ (0, H.jsx)(R, { children: /* @__PURE__ */ (0, H.jsx)(s, {
tone: "error",
- children: S || "读取任务中心失败"
+ children: C || "读取任务中心失败"
}) });
let E = T(n.finished || [], o), D = n.working_parents || [], O = [
...n.running || [],
...n.skipped || [],
...E,
...D
- ], k = ie(O), A = new Set(O.map((e) => e.id)), j = (e) => e.filter((e) => !(e.followup_key && e.parent_run_id != null && A.has(e.parent_run_id))), M = j(E), N = M[M.length - 1], I = !!N && (o.length ? u : !!n.finished_has_more), L = () => {
- !y.isPending && N && y.mutate({
+ ], k = re(O), A = new Set(O.map((e) => e.id)), j = (e) => e.filter((e) => !(e.followup_key && e.parent_run_id != null && A.has(e.parent_run_id))), M = j(E), N = M[M.length - 1], I = !!N && (o.length ? u : !!n.finished_has_more), L = () => {
+ !b.isPending && N && b.mutate({
oldest: N,
shown: E
});
}, z = {
...f,
...n.followup_counts
- }, B = (e) => e.flatMap((e) => k.get(e.id) || []), U = [...M, ...j(D)].filter((e) => b(z, [e]).active > 0 || k.get(e.id)?.some(C)).sort((e, t) => t.id - e.id), W = j(n.running || []), G = j(n.skipped || []), K = M.filter((e) => !U.includes(e) && !G.some((t) => t.id === e.id)), q = (e) => (k.get(e.id) || []).every((e) => e.status === "succeeded" && !x(e)) && b(z, [e]).failed === 0, J = re(K, (e) => w(e) && q(e)), Y = ae(O), $ = !W.length && !U.length && !G.length && !K.length;
+ }, B = (e) => e.flatMap((e) => k.get(e.id) || []), U = [...M, ...j(D)].filter((e) => x(z, [e]).active > 0 || k.get(e.id)?.some(w)).sort((e, t) => t.id - e.id), W = j(n.running || []), G = j(n.skipped || []), K = M.filter((e) => !U.includes(e) && !G.some((t) => t.id === e.id)), q = (e) => (k.get(e.id) || []).every((e) => e.status === "succeeded" && !S(e)) && x(z, [e]).failed === 0, J = y(K, (e) => ie(e) && (q(e) || le.has(e.task_key))), Y = ae(O), $ = !W.length && !U.length && !G.length && !K.length;
return /* @__PURE__ */ (0, H.jsxs)(R, { children: [
- S ? /* @__PURE__ */ (0, H.jsx)(s, {
+ C ? /* @__PURE__ */ (0, H.jsx)(s, {
tone: "error",
- children: S
+ children: C
}) : null,
n.available === !1 ? /* @__PURE__ */ (0, H.jsx)(s, {
tone: "warning",
@@ -369,10 +373,10 @@ function $() {
title: "正在进行",
children: W.length || U.length ? /* @__PURE__ */ (0, H.jsxs)(Q, {
live: !0,
- children: [W.map((e) => /* @__PURE__ */ (0, H.jsx)(le, {
+ children: [W.map((e) => /* @__PURE__ */ (0, H.jsx)(ue, {
run: e,
followups: k.get(e.id)
- }, e.id)), ne(U).map(({ run: e, runs: t }) => /* @__PURE__ */ (0, H.jsx)(ue, {
+ }, e.id)), ne(U).map(({ run: e, runs: t }) => /* @__PURE__ */ (0, H.jsx)(de, {
runs: t,
followups: B(t),
counts: z
@@ -393,23 +397,27 @@ function $() {
K.length || I ? /* @__PURE__ */ (0, H.jsxs)(Z, {
title: "最近完成",
children: [
- K.length ? /* @__PURE__ */ (0, H.jsx)(Q, { children: J.map(({ run: e, runs: t }) => /* @__PURE__ */ (0, H.jsx)(X, {
- run: e,
- runs: t,
- latest: Y.has(e.id),
- followups: B(t),
- followupTotal: b(z, t).total
- }, e.id)) }) : null,
- y.error ? /* @__PURE__ */ (0, H.jsx)(s, {
+ K.length ? /* @__PURE__ */ (0, H.jsx)(Q, { children: J.map(({ run: e, runs: t }) => {
+ let n = x(z, t);
+ return /* @__PURE__ */ (0, H.jsx)(X, {
+ run: e,
+ runs: t,
+ latest: Y.has(e.id),
+ followups: B(t),
+ followupTotal: n.total,
+ followupFailed: n.failed
+ }, e.id);
+ }) }) : null,
+ b.error ? /* @__PURE__ */ (0, H.jsx)(s, {
tone: "error",
- children: _(y.error)
+ children: _(b.error)
}) : null,
I ? /* @__PURE__ */ (0, H.jsx)(e, {
variant: "secondary",
size: "small",
leadingIcon: ee,
className: "self-start",
- ...m(y.isPending),
+ ...m(b.isPending),
onClick: L,
children: "加载更早"
}) : null
@@ -421,4 +429,4 @@ function $() {
}
export { $ as ActivityPage };
-//# debugId=29ef22fd-501f-43c1-bfd3-ef1934939de5
\ No newline at end of file
+//# debugId=7391b49e-1786-4359-92f7-886e1ebb4c6f
\ No newline at end of file
diff --git a/web/dist/peach-app.js b/web/dist/peach-app.js
index da46afbf4..b22f58c94 100644
--- a/web/dist/peach-app.js
+++ b/web/dist/peach-app.js
@@ -2,7 +2,7 @@
(function() {
try {
var e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, t = new e.Error().stack;
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "f7b1a729-5e16-4213-b5d7-05e186ef5e19", e._sentryDebugIdIdentifier = "sentry-dbid-f7b1a729-5e16-4213-b5d7-05e186ef5e19");
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "bfe0b3c3-2688-4dbb-9446-19fc79c0fce9", e._sentryDebugIdIdentifier = "sentry-dbid-bfe0b3c3-2688-4dbb-9446-19fc79c0fce9");
} catch {}
})();
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), s = (e, n) => {
@@ -75243,7 +75243,7 @@ var y6 = _6(() => import("./peach-app.jav-page-C5uPjDXP.js")), b6 = _6(() => imp
ConfigurationPage: e,
DiagnosticsPage: t
};
-}), O6 = _6(() => import("./peach-app.activity-page-DXU2jLVg.js")), k6 = _6(() => import("./peach-app.follow-manage-page-36Z6mSDD.js")), A6 = _6(() => import("./peach-app.playlists-page-Be7ygGCR.js"));
+}), O6 = _6(() => import("./peach-app.activity-page-B66P-r0P.js")), k6 = _6(() => import("./peach-app.follow-manage-page-36Z6mSDD.js")), A6 = _6(() => import("./peach-app.playlists-page-Be7ygGCR.js"));
function Qje(e, t, n) {
if (e === "duplicates") {
n("/duplicates");
@@ -80458,4 +80458,4 @@ if (!$9) throw Error("主界面宿主缺失");
dFe($9);
export { AI as $2ec61d1d4f780267$export$a8a3e93435678ff9, RI as $3a442827418ebe87$export$eb2fcfdbd7ba97d4, tR as $542a13ca2fa5b484$export$5b6b19405a83ff9d, PT as $72abaeab4d80592f$export$78efe591171d7d45, qR as $76d00c5a4edb230a$export$76ccd210b9029917, WR as $76d00c5a4edb230a$export$816b5d811295e6bc, XR as $76d00c5a4edb230a$export$b59bdbef9ce70de2, QR as $76d00c5a4edb230a$export$f6f0c3fe4ec306ea, UR as $76d00c5a4edb230a$export$f850895b287ef28e, Sfe as $b4f18e3395fe64d7$export$3d96ec278d3efce4, xfe as $b4f18e3395fe64d7$export$3e41faf802a29e71, vfe as $b4f18e3395fe64d7$export$b2539bed5023c21c, nz as $b4f18e3395fe64d7$export$e51a686c67fdaa2d, Tfe as $bd263d78e9bf3c56$export$f5c9f3c2c4054eec, xw as $ea3928288112382f$export$439d29a4e110a164, mR as $f2ff30fde7b014be$export$3ddf2d174ce01153, xR as $fe21c36db05242bb$export$a98f0dcb43a68a25, SR as $fe21c36db05242bb$export$d7b12c4107be0d61, spe as $l, nA as ACCENTS, GTe as AMANE_BRIDGE_CHECK_URL, X$ as AMANE_BRIDGE_KEY, KTe as AMANE_BRIDGE_REBUILD_URL, Hn as ApiError, MW as ArtSlot, q as Button, iI as ButtonLink, gpe as Bx, Qt as CLOUD_LOCATIONS, X1 as CLOUD_PROXY_HELP, Dr as COLUMN_SORT, c1 as CONFIGURATION_KEY, qY as CONFIGURATION_URL, qTe as COOKIE_TEXT_LIMIT, Y$ as COVER_JOB_KEY, Ai as CREDENTIAL_STATE, G$ as CUSTOM_SOURCES_KEY, W$ as CUSTOM_SOURCES_URL, nV as Checkbox, tV as CheckboxGlyph, KB as ChevronSortDown, sZ as Chip, q2 as CloudDownloadDialog, GH as CollapseChevron, WH as CollapseRegion, f$ as CollectionSummary, wbe as DEFAULT_CATEGORY, Kn as DEFAULT_SORT, jQ as DIAGNOSTICS_KEY, Cxe as DIRECTORY_TEMPLATE_ERROR, j0 as DISCOVERY_SORTS, V2 as DOWNLOADS_KEY, B2 as DOWNLOADS_URL, pY as DUPLICATES_KEY, JJ as DataTableFooter, WJ as DataTableFrame, qJ as DataTableSort, ZH as Disclosure, nke as DownloadsPanel, Qfe as E3, Tbe as ENTITY_REVIEW_KINDS, J1 as ENTRY_LINKS_HELP, Y1 as ENTRY_LINKS_HINT, upe as Ea, Dpe as EmptyFocusButton, Pz as EmptyState, YH as ErrorText, lge as ExternalLink, Sr as FEEDS_KEY, tX as FEED_SCHEDULE_KEY, D$ as FIELDSET_FOOT, tje as FLOW_LABEL_X, R3 as FLOW_VIEWBOX, br as FOLLOW_CHECK_KEY, yr as FOLLOW_CREDENTIALS_KEY, N8 as FOLLOW_INITIAL_RANGE_OPTIONS, vr as FOLLOW_MANAGE_KEY, FZ as FOLLOW_MANAGE_NAV, xr as FOLLOW_RESOLVE_KEY, eX as FOLLOW_SCHEDULE_KEY, fge as Fact, dge as FactList, XH as FieldLabel, L$ as Fieldset, I$ as FieldsetTitle, JF as FilterGlass, YF as FilterGlassRows, qF as FilterIconButton, ZF as FilterPill, cge as Footer, vz as Gg, $F as GlassPill, JH as Help, Tz as HintText, qAe as IDLE_POLL_MS, pbe as IDLE_REPAIR, HF as IconButton, Az as Input, kz as InputBase, bA as JAV_LAYOUTS, N0 as JAV_RECOMMENDATION_GRID, wX as JUNK_KEY, Z3 as JavHeader, sbe as KEEP_LABELS, wr as LAYOUTS, q1 as LIBRARY_FOLDER_HELP, lH as LIBRARY_PROCESSING_KEY, zY as LINKS_KEY, BY as LINK_CHECK_KEY, Ybe as LINK_KINDS, VY as LINK_PRUNE_KEY, Ln as LOC, wz as Label, B$ as LibraryProcessingCard, Zz as LibraryShortcuts, TH as LinkButton, zH as LoadingDots, epe as M6, exe as MEDIA_PROCESSING_KEY, rX as MEDIA_PROCESSING_URL, vY as MEDIA_REPAIR_KEY, _Y as MEDIA_REPAIR_URL, er as MEDIA_SOURCES_KEY, Qo as MEDIA_SOURCE_ICONS, Xt as MEDIA_SOURCE_OPTIONS, XB as MENU_ITEM, ZB as MENU_ITEM_INTERACTIVE, YB as MENU_POPOVER_SURFACE, kH as MenuDialog, OG as MixCard, jz as ModalFrame, cy as MotionConfigContext, Cz as NR, Nz as Note, Cpe as OA, oX as ORGANIZE_KEY, lX as ORPHAN_RECORDS_KEY, _z as OV, uz as P7, sTe as PHASES, JY as PICK_FOLDER_URL, H$ as PLAYLISTS_KEY, qEe as POLICY_COLUMNS, YEe as POLICY_COVER_NOTE, JEe as POLICY_MATRIX, K1 as POLICY_SUMMARY, KJ as Pagination, z$ as PathLine, dF as PillTabList, VH as Progress, CY as QUALITY_GOALS_KEY, A$ as REPAIR_CARD_TEXT, yY as REPAIR_LIBRARIES_KEY, mX as RESOURCE_APPLY_KEY, pX as RESOURCE_SCAN_KEY, bTe as RESULT_PANEL, xTe as RESULT_SECTION, Cbe as REVIEW_CATEGORIES, CX as REVIEW_COUNTS_KEY, Ebe as REVIEW_DECISION_LABELS, EY as REVIEW_KEY, DY as REVIEW_LABELS, kY as REVIEW_QUEUES, AY as REVIEW_QUEUE_LABELS, jW as RetryNote, Spe as Rf, age as Rows, UTe as SCRAPING_CHECK_URL, q$ as SCRAPING_COVER_URL, J$ as SCRAPING_KEY, HTe as SCRAPING_SETTINGS_URL, PU as SEGMENT, NU as SEGMENTED_TRACK, $Y as SETTINGS_KEY, YY as SETTINGS_URL, qn as SORT_DEFAULT_DIR, Gn as SORT_OPTIONS, $t as SOURCE_LABELS, l3 as STATS_KEY, ige as Section, sge as SectionSkeleton, MU as SegmentedRadioGroup, n_e as SegmentedTabList, lW as Segments, GJ as Select, TU as Select$1, f1 as SelectField, EU as SelectItem, tY as SelectionActions, Pk as SelectionDock, nY as SelectionPopover, KH as SettingsCard, rge as SettingsRow, qH as SettingsSectionLabel, gge as SiteLabel, zU as SortDirectionIcon, fW as SortKeys, mQ as SourceAvatar, tU as SourceLabel, QH as SourceMark, oge as Stack, R$ as StatusLabel, P2 as Switch, bF as TASKS_KEY, IAe as TASTE_REFRESH_KEY, LAe as TASTE_WINDOWS, nX as THUMBNAIL_JOBS_KEY, EX as TRASH_KEY, hue as TRIGGER_LABELS, FJ as Table, rY as TableColumnControls, iY as TableColumnResizer, oY as TableSelectionHeader, t$ as TagManager, uge as TaskCenterLink, HH as TaskProgress, Dz as TextField, Ez as TextFieldContext, gz as Un, g$ as WANTS_KEY, r4 as WantMagnets, gp as WithPromise, dz as Wt, hz as Xc, Sz as Xf, npe as Xt, $fe as _8, o as __commonJSMin, s as __exportAll, l as __toESM, xpe as aB, si as addAlias, oi as addSource, v$ as addWant, tb as animate, B as apiGet, V as apiSend, mA as appSettingsStore, Hxe as applyConfirmText, SX as applyLeftovers, Vxe as applyPlanText, Wxe as applyText, vA as applyTheme, n_ as asNumber, Axe as attachOrphan, Ur as authorAvatar, Gr as authorGroups, Hr as authorInitial, Vr as authorName, Cq as autoResetPageIndex, Za as avatarInner, h3 as bandRows, wxe as baseName, fbe as batchOperate, zk as boundedPreference, lbe as bulkCloudPreferences, Rz as busyProps, bpe as cB, fke as cachedMagnetStates, op as calcGeneratorVelocity, Nbe as canApprove, Af as cancelFrame, Fxe as candidateText, RH as cardClass, NA as cardRatio, mz as cc, Ei as checkEvidenceGap, Ti as checkFailures, gi as checkFeeds, $be as checkLine, Ci as checkReceipt, wi as checkSummary, YTe as checkText, Di as checkedText, eG as clickedBlank, tbe as cloudLocations, D0 as cloudProxySkeleton, Hx as clsx, ppe as cn, mh as collectMotionValues, Uq as columnVisibilityFeature, AJ as column_getCanSort, EJ as column_getSortFn, jbe as commonReviewSources, oV as configurationSection, VAe as configureTasteBrowser, Hc as confirmModal, aq as copyInstancePropertiesWithoutMemos, Wa as coverUrl, Pq as createColumnHelper, ITe as createPlaylist, ji as credentialDone, C0 as credentialsSkeleton, Hbe as currentReviewRow, cF as cx, bz as dZ, zbe as decisionPayload, Bbe as decisionReceipt, Rbe as defaultChoice, RTe as deletePlaylist, x as diagnosticHeaders, G1 as diagnosticsSkeleton, hTe as discoveryArtwork, C$ as discoveryKey, yDe as discoveryScore, abe as distinctName, xi as dropSources, ype as du, ube as duplicateVictims, OF as elapsedText, Xa as entityFaceImg, hn as entityPath, Ir as errorHeadline, Wn as errorMessage, z as esc, Sq as expandRowModel, sz as f1, Fr as feedIntervalText, $$ as fetchAmaneBridge, $r as fetchCheckJob, l1 as fetchConfiguration, Q$ as fetchCoverJob, Qr as fetchCredentials, K$ as fetchCustomSources, MQ as fetchDiagnostics, w$ as fetchDiscoveries, hY as fetchDuplicates, uue as fetchEarlier, rxe as fetchFeedSchedule, pi as fetchFeeds, Zr as fetchFollow, nxe as fetchFollowSchedule, OX as fetchJunkSummary, WY as fetchLinkCheck, GY as fetchLinkPrune, UY as fetchLinkStats, txe as fetchMediaProcessing, bY as fetchMediaRepair, tr as fetchMediaSources, sX as fetchOrganize, gxe as fetchOrganizeExample, uX as fetchOrphanRecords, fi as fetchPending, U$ as fetchPlaylists, wY as fetchQualityGoals, xY as fetchRepairLibraries, ei as fetchResolveJob, gX as fetchResourceApply, hX as fetchResourceScan, IY as fetchReview, DX as fetchReviewCounts, iX as fetchSettings, Z$ as fetchSources, u3 as fetchStats, ti as fetchSuggestions, SF as fetchTasks, F3 as fetchTaste, HAe as fetchTasteJob, ixe as fetchThumbnailJobs, kX as fetchTrashSummary, _$ as fetchWants, kbe as filterReviewRows, Fn as firstGrapheme, IK as flexRender, rje as flowGraph, ije as flowLabel, nAe as fmtCount, kn as fmtDur, jn as fmtSize, lue as foldByKind, wue as foldRoutine, vi as followFeedByName, Cr as followSuggestKey, DF as followupDetail, cue as followupTally, kf as frame, Ufe as g4, Kq as getDefaultPaginationState, MA as gridLayout, Wr as groupByAuthor, Cue as groupFollowups, NY as groupReviewRows, zxe as hasChanges, _X as hasResourceRoots, wF as hasResultProblems, JAe as historySpan, cz as i2, KAe as importTasteExport, w0 as indexersSkeleton, Qf as interpolate, b$ as invalidateWants, EF as isActive, Pr as isBroken, Or as isLayout, zh as isMotionValue, OY as isReviewCategory, Tue as isRoutine, T0 as javBrowserSkeleton, F0 as javContentSkeleton, TA as javLayout, P0 as javTagSkeleton, Yxe as junkBreakdown, zTe as keepPlaylist, ke as keepPreviousData, Jr as keepSelected, d3 as known, qfe as l7, Sue as latestOfKind, mAe as lengthRows, ir as localTime, _i as lookupFeedActor, Xfe as m7, yz as mM, cn as mapLimit, di as markItem, g3 as max, fAe as mediumRows, due as mergeFinished, _3 as min, qbe as mirrorText, gbe as missingToolText, gY as mixedCloudPreferences, IF as momentText, nb as motion, gh as motionValue, Exe as organizeOutcome, X0 as overlayHost, kr as pageSizeOf, qr as pageWindow, Xn as paginationRange, bi as patchSource, JV as peachHistory, JV as peachHistory$1, Lbe as pendingGenres, iAe as percentText, yxe as pickOrganizeFolder, Txe as planSummary, f3 as playedFor, oAe as playedItemUrl, xF as pollInterval, As as popCount, FTe as posterUrl, XW as previewLibraryColor, vxe as previewOrganize, ybe as previewUrl, xue as problemDestination, kF as progressText, eU as providerIcon, Qbe as pruneText, yX as purgeCount, jxe as purgeOrphan, xz as pv, vpe as qE, H as queryClient, lz as r2, eje as radarRows, lAe as radialArc, uAe as radialBarSize, cAe as radialCeiling, sAe as radialSlices, Yj as randomId, QAe as rankDetail, $Ae as rankShares, m3 as reachedShare, jF as readableErrorHeadline, bDe as recommendationScore, Ube as recordGenre, Nxe as recordsText, BTe as recreatePlaylist, NTe as refreshPlaylists, Sl as relayoutCovers, Si as reloadFollowManage, Kbe as reloadReview, QEe as rememberShape, xxe as rememberTemplates, ci as removeAlias, hi as removeFeed, ai as removeSource, GAe as removeTasteSource, y$ as removeWants, li as renameAliasGroup, LTe as renamePlaylist, gAe as replayRows, ie as require_jsx_runtime, A as require_react, te as require_react_dom, tq as require_with_selector, uTe as resetWants, Yn as resolveFollowSort, fp as resolveStartTime, PTe as resumeAssetId, Obe as reviewGroupingOptions, MY as reviewQueueData, jY as reviewQueueOf, Jxe as reviewSummary, Abe as reviewWindow, Fbe as rowEvidence, FY as rowFieldName, $q as rowPaginationFeature, bJ as rowSelectionFeature, NJ as rowSortingFeature, PY as rowSubject, Ibe as rowTags, Pbe as rowTitle, Wfe as s5, ui as saveCredential, Bxe as scanLine, lxe as schedulePollInterval, fTe as searchNote, Mbe as selectReviewRange, Yr as selectionState, mi as setFeedEnabled, ii as setSourceEnabled, uV as settingsPath, Gbe as settleReviewRows, ibe as sharedNamePrefix, YV as shellNavigate, b8 as showToast, xn as siteMarkUrl, pq as skipFirstRun, lF as sortCx, jr as sortLabel, en as sourceDefaultCost, ki as sourceIconUrl, Uxe as sourceMeta, xs as spinnerHtml, Yf as spring, Iz as spriteGlyph, ni as startCheck, Xbe as startLinkCheck, Zbe as startLinkPrune, bxe as startOrganize, ri as startResolve, Lxe as startResourceApply, Ixe as startResourceScan, WAe as startTasteRefresh, _ue as statusLabel, hbe as statusLine, Nr as statusText, PA as storeJavLayout, Vbe as submitDecision, RF as summaryItems, Fq as tableFeatures, mq as tableMemo, Kr as tableRows, bue as taskIssues, I3 as tasteDate, XAe as tasteDimensions, YAe as tasteHours, P3 as tasteKey, zAe as tasteRefetchInterval, BAe as tasteTime, hF as textLang, ud as time, ope as tl, Xr as toggleGroup, L3 as topScores, lpe as uo, EH as useAction, AZ as useBackgroundJob, vU as useClientUpdates, Su as useConstant, GF as useHorizontalScroller, Cu as useIsomorphicLayoutEffect, QW as useLibraryTints, Ft as useMutation, rV as useOverlayScrollbar, Pt as useQuery, oe as useQueryClient, qy as useReducedMotion, cxe as useRunSchedule, oxe as useSaveFollowSchedule, aX as useSaveSettings, uxe as useSaveThumbnailMode, PJ as useTable, ZJ as useTablePreferences, nI as useViewGlide, dbe as victimBytes, dTe as wantName, aAe as watchNote, p3 as watchedShare, lc as wireHorizontalScroller, Sxe as withOrganizeJob };
-//# debugId=f7b1a729-5e16-4213-b5d7-05e186ef5e19
\ No newline at end of file
+//# debugId=bfe0b3c3-2688-4dbb-9446-19fc79c0fce9
\ No newline at end of file