99 useOpsOverview ,
1010 useOpsProgress ,
1111 useRunAutoLabel ,
12+ useRunLabelCleanup ,
1213 useRunMailboxBackfill ,
1314 useRunFullAnchorWorkflow ,
1415 useRunOpsScan ,
@@ -21,6 +22,7 @@ import {
2122 Anchor ,
2223 AlertTriangle ,
2324 ArrowRight ,
25+ Eraser ,
2426 Inbox ,
2527 Layers3 ,
2628 LogOut ,
@@ -71,6 +73,7 @@ function CommandCenter() {
7173 const scanMutation = useRunOpsScan ( ) ;
7274 const backfillMutation = useRunMailboxBackfill ( ) ;
7375 const autoLabelMutation = useRunAutoLabel ( ) ;
76+ const cleanLabelsMutation = useRunLabelCleanup ( ) ;
7477 const cleanupMutation = useRunSafeCleanupWorkflow ( ) ;
7578 const fullAnchorMutation = useRunFullAnchorWorkflow ( ) ;
7679 const overviewError = error instanceof Error ? error . message : "InboxAnchor could not load the live mailbox overview yet." ;
@@ -79,6 +82,7 @@ function CommandCenter() {
7982 scanMutation . isPending ||
8083 backfillMutation . isPending ||
8184 autoLabelMutation . isPending ||
85+ cleanLabelsMutation . isPending ||
8286 cleanupMutation . isPending ||
8387 fullAnchorMutation . isPending ;
8488 const { data : progress } = useOpsProgress ( timeRange , isLoading || busy ) ;
@@ -95,6 +99,13 @@ function CommandCenter() {
9599 { label : "Hydrated" , value : progress . hydrated_count } ,
96100 { label : "Batches" , value : progress . batch_count } ,
97101 ]
102+ : progress . latest_action === "remove_labels"
103+ ? [
104+ { label : "Emails read" , value : progress . read_count } ,
105+ { label : "Labels removed" , value : progress . labels_removed_count } ,
106+ { label : "Processed" , value : progress . processed_count } ,
107+ { label : "Remaining" , value : Math . max ( progress . target_count - progress . processed_count , 0 ) } ,
108+ ]
98109 : progress . mode === "workflow"
99110 ? [
100111 { label : "Emails read" , value : progress . read_count } ,
@@ -401,6 +412,15 @@ function CommandCenter() {
401412 loading = { autoLabelMutation . isPending }
402413 onClick = { ( ) => autoLabelMutation . mutate ( timeRange ) }
403414 />
415+ < WorkflowCard
416+ title = "Reset InboxAnchor labels"
417+ icon = { < Eraser className = "h-4 w-4" /> }
418+ description = "Remove only InboxAnchor-generated labels from the selected mailbox window without deleting or archiving any email."
419+ impact = { overview ?. workflows . find ( ( item ) => item . slug === "clean-labels" ) ?. impact }
420+ cta = "Clean labels"
421+ loading = { cleanLabelsMutation . isPending }
422+ onClick = { ( ) => cleanLabelsMutation . mutate ( timeRange ) }
423+ />
404424 < WorkflowCard
405425 title = "Safe cleanup"
406426 icon = { < ShieldCheck className = "h-4 w-4" /> }
0 commit comments