From e195f40b14cc797b93f34d705be0fb9af8e97559 Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
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 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

(limited to 'apps/web/components/admin/BackgroundJobs.tsx')

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",
-- 
cgit v1.2.3-70-g09d2

