From e195f40b14cc797b93f34d705be0fb9af8e97559 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sat, 3 Jan 2026 19:21:49 +0000 Subject: feat: Add retry buttons for pending bookmarks in admin panel (#2341) --- apps/web/components/admin/BackgroundJobs.tsx | 28 +++++++++++++++++++++++++++ apps/web/lib/i18n/locales/en/translation.json | 3 +++ 2 files changed, 31 insertions(+) (limited to 'apps') diff --git a/apps/web/components/admin/BackgroundJobs.tsx b/apps/web/components/admin/BackgroundJobs.tsx index 26015eb4..382069c8 100644 --- a/apps/web/components/admin/BackgroundJobs.tsx +++ b/apps/web/components/admin/BackgroundJobs.tsx @@ -339,6 +339,13 @@ function useJobActions() { return { crawlActions: [ + { + label: t("admin.background_jobs.actions.recrawl_pending_links_only"), + onClick: () => + recrawlLinks({ crawlStatus: "pending", runInference: true }), + variant: "secondary" as const, + loading: isRecrawlPending, + }, { label: t("admin.background_jobs.actions.recrawl_failed_links_only"), onClick: () => @@ -359,6 +366,15 @@ function useJobActions() { }, ], inferenceActions: [ + { + label: t( + "admin.background_jobs.actions.regenerate_ai_tags_for_pending_bookmarks_only", + ), + onClick: () => + reRunInferenceOnAllBookmarks({ type: "tag", status: "pending" }), + variant: "secondary" as const, + loading: isInferencePending, + }, { label: t( "admin.background_jobs.actions.regenerate_ai_tags_for_failed_bookmarks_only", @@ -376,6 +392,18 @@ function useJobActions() { reRunInferenceOnAllBookmarks({ type: "tag", status: "all" }), loading: isInferencePending, }, + { + label: t( + "admin.background_jobs.actions.regenerate_ai_summaries_for_pending_bookmarks_only", + ), + onClick: () => + reRunInferenceOnAllBookmarks({ + type: "summarize", + status: "pending", + }), + variant: "secondary" as const, + loading: isInferencePending, + }, { label: t( "admin.background_jobs.actions.regenerate_ai_summaries_for_failed_bookmarks_only", diff --git a/apps/web/lib/i18n/locales/en/translation.json b/apps/web/lib/i18n/locales/en/translation.json index ad811fc8..1817db81 100644 --- a/apps/web/lib/i18n/locales/en/translation.json +++ b/apps/web/lib/i18n/locales/en/translation.json @@ -555,11 +555,14 @@ } }, "actions": { + "recrawl_pending_links_only": "Recrawl Pending Links Only", "recrawl_failed_links_only": "Recrawl Failed Links Only", "recrawl_all_links": "Recrawl All Links", "without_inference": "Without Inference", + "regenerate_ai_tags_for_pending_bookmarks_only": "Regenerate AI Tags for Pending Bookmarks Only", "regenerate_ai_tags_for_failed_bookmarks_only": "Regenerate AI Tags for Failed Bookmarks Only", "regenerate_ai_tags_for_all_bookmarks": "Regenerate AI Tags for All Bookmarks", + "regenerate_ai_summaries_for_pending_bookmarks_only": "Regenerate AI Summaries for Pending Bookmarks Only", "regenerate_ai_summaries_for_failed_bookmarks_only": "Regenerate AI Summaries for Failed Bookmarks Only", "regenerate_ai_summaries_for_all_bookmarks": "Regenerate AI Summaries for All Bookmarks", "reindex_all_bookmarks": "Reindex All Bookmarks", -- cgit v1.2.3-70-g09d2