Skip to content

armgit / peach

Public Imported from GitHub
0

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

fix(web): 扫描与采集的跳转写明去处,amane 桥失败卡不放入口

longmeidaob03e49cb6c49
diff --git a/frontend/src/react/activity/tasks.ts b/frontend/src/react/activity/tasks.ts
index 7e31c9e50..910eee7dc 100644
--- a/frontend/src/react/activity/tasks.ts
+++ b/frontend/src/react/activity/tasks.ts
@@ -152,8 +152,8 @@ export function taskIssues(run: TaskRunPayload): TaskIssue[] {
}
/** 处理入口只对同一种任务最新那一轮有意义的任务:目标页只显示最新一轮,更早的失败已经被后来的结果取代。
- * 扫描与采集卡片上的「重试未完成项」只认最新一轮的失败集合;amane 桥重建成功一次,之前的失败就不用再管。 */
-const LATEST_ONLY = new Set(['library-processing', 'amane-bridge']);
+ * 扫描与采集卡片上的问题清单与「重试未完成项」只认最新一轮的失败集合。 */
+const LATEST_ONLY = new Set(['library-processing']);
export function problemDestination(run: TaskRunPayload, latest = true): { href: string; label: string } | null {
if (!hasResultProblems(run) && run.status !== 'failed') return null;
@@ -161,9 +161,8 @@ export function problemDestination(run: TaskRunPayload, latest = true): { href:
const targets: Record<string, [string, string]> = {
'link-check': ['/data-cleanup#link-manager', '查看有问题的链接'],
'link-prune': ['/data-cleanup#link-manager', '查看有问题的链接'],
- 'library-processing': ['/data-cleanup#libraryProcessing', '查看并处理'],
- // 重建键在来源和凭证页的 amane 那一段。
- 'amane-bridge': ['/sources', '查看并处理'],
+ // 「需要处理」不收这里的可重试项:问题清单有几百项,先看清单再在那张卡上重试。
+ 'library-processing': ['/data-cleanup#libraryProcessing', '查看未完成项'],
'follow-check': ['/subscriptions', '查看关注来源'],
'feed-check': ['/subscriptions?tab=feeds', '查看订阅源'],
'follow-resolve': ['/subscriptions?tab=add', '查看来源查找'],
diff --git a/frontend/test/react/activity.test.tsx b/frontend/test/react/activity.test.tsx
index 62a63a5a6..13df5b732 100644
--- a/frontend/test/react/activity.test.tsx
+++ b/frontend/test/react/activity.test.tsx
@@ -105,12 +105,15 @@ it('扫描与采集只有最新那一轮失败才去卡片上重试未完成项'
scan({ id: 5, finished_at: '2026-09-11T10:05:00Z' }),
scan({ id: 4, status: 'succeeded', error: '', finished_at: '2026-09-11T09:05:00Z' }),
scan({ id: 3, finished_at: '2026-09-11T08:05:00Z' }),
+ // amane 桥的处理入口在页顶「需要处理」那一行,卡上不放。
+ run({ id: 2, task_key: 'amane-bridge', task_label: '重建 amane 桥', status: 'failed',
+ progress_total: null, finished_at: '2026-09-11T07:05:00Z', error: '重建未完成' }),
] }));
await prefetchTasks(new AbortController().signal);
const host = await mount(page());
- const links = [...host.querySelectorAll('[data-task-key=library-processing] a')];
+ const links = [...host.querySelectorAll('[data-task-key=library-processing] a, [data-task-key=amane-bridge] a')];
expect(links.map((link) => [link.closest('[data-run-id]')?.getAttribute('data-run-id'),
- link.getAttribute('href'), link.textContent])).toEqual([['5', '/data-cleanup#libraryProcessing', '查看并处理']]);
+ link.getAttribute('href'), link.textContent])).toEqual([['5', '/data-cleanup#libraryProcessing', '查看未完成项']]);
});
/** 走完真实的首屏路径:先 prefetch 落进缓存,再挂载。 */
diff --git a/web/dist/peach-app.js b/web/dist/peach-app.js
index 68ffe80da..acb0dd10d 100644
--- a/web/dist/peach-app.js
+++ b/web/dist/peach-app.js
@@ -2,7 +2,7 @@
(function() {
try {
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "dd58f46a-3594-43e5-a7ba-11d1b86ba074", e._sentryDebugIdIdentifier = "sentry-dbid-dd58f46a-3594-43e5-a7ba-11d1b86ba074");
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "9cbee1d2-ac87-4ef0-b901-5c1a9f2645f6", e._sentryDebugIdIdentifier = "sentry-dbid-9cbee1d2-ac87-4ef0-b901-5c1a9f2645f6");
} 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), e = null), t.exports), s = (e, n) => {
@@ -38288,14 +38288,13 @@ function Sye(e) {
let t = e.result_summary?.issues;
return Array.isArray(t) ? t.filter((e) => !!e && typeof e == "object" && typeof e.error == "string" && typeof e.label == "string") : [];
}
-var DA = /* @__PURE__ */ new Set(["library-processing", "amane-bridge"]);
+var DA = /* @__PURE__ */ new Set(["library-processing"]);
function Cye(e, t = !0) {
if (!EA(e) && e.status !== "failed" || DA.has(e.task_key) && !t) return null;
let n = {
"link-check": ["/data-cleanup#link-manager", "查看有问题的链接"],
"link-prune": ["/data-cleanup#link-manager", "查看有问题的链接"],
- "library-processing": ["/data-cleanup#libraryProcessing", "查看并处理"],
- "amane-bridge": ["/sources", "查看并处理"],
+ "library-processing": ["/data-cleanup#libraryProcessing", "查看未完成项"],
"follow-check": ["/subscriptions", "查看关注来源"],
"feed-check": ["/subscriptions?tab=feeds", "查看订阅源"],
"follow-resolve": ["/subscriptions?tab=add", "查看来源查找"],
@@ -115619,4 +115618,4 @@ nxt(rxt);
//#endregion
export { HT as applyTheme, yk as peachHistory, Go as popCount, Agt as showToast };
-//# debugId=dd58f46a-3594-43e5-a7ba-11d1b86ba074
\ No newline at end of file
+//# debugId=9cbee1d2-ac87-4ef0-b901-5c1a9f2645f6
\ No newline at end of file