From 9375c598ee62401acffe172807928fe573771f8d Mon Sep 17 00:00:00 2001 From: Dries Augustyns Date: Wed, 10 Dec 2025 19:52:09 +0100 Subject: [PATCH] chore: add indicator about campaign recipients recalculation --- apps/web/src/pages/campaigns/[id].tsx | 33 +++++++++++++++++++------- apps/web/src/pages/campaigns/index.tsx | 15 ++++++++++-- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/apps/web/src/pages/campaigns/[id].tsx b/apps/web/src/pages/campaigns/[id].tsx index bfe7930..c5d0215 100644 --- a/apps/web/src/pages/campaigns/[id].tsx +++ b/apps/web/src/pages/campaigns/[id].tsx @@ -41,6 +41,7 @@ import { ArrowLeft, Calendar, ChevronDown, + Info, Mail, MousePointer, Save, @@ -550,13 +551,19 @@ export default function CampaignDetailsPage() { {/* Show recipient count */} {draftRecipientCount > 0 && ( -
+
{draftRecipientCount.toLocaleString()} recipients
+
+ +

+ This count will be recalculated right before sending to ensure accuracy. The final number may differ if contacts subscribe, unsubscribe, or segment membership changes. +

+
)} @@ -970,13 +977,23 @@ export default function CampaignDetailsPage() {

Scheduled For

-
-

- {formatFullDateTime(new Date(c.scheduledFor))} -

-

- UTC: {formatUTCDateTime(new Date(c.scheduledFor))} -

+
+
+

+ {formatFullDateTime(new Date(c.scheduledFor))} +

+

+ UTC: {formatUTCDateTime(new Date(c.scheduledFor))} +

+
+ {c.status === CampaignStatus.SCHEDULED && ( +
+ +

+ Recipient count will be recalculated at send time +

+
+ )}
diff --git a/apps/web/src/pages/campaigns/index.tsx b/apps/web/src/pages/campaigns/index.tsx index c39bd3a..b4fee82 100644 --- a/apps/web/src/pages/campaigns/index.tsx +++ b/apps/web/src/pages/campaigns/index.tsx @@ -17,7 +17,7 @@ import type {Campaign} from '@plunk/db'; import {CampaignStatus} from '@plunk/db'; import {DashboardLayout} from '../../components/DashboardLayout'; import {network} from '../../lib/network'; -import {Calendar, Copy, Mail, Plus, Trash2, Users} from 'lucide-react'; +import {Calendar, Copy, Info, Mail, Plus, Trash2, Users} from 'lucide-react'; import {NextSeo} from 'next-seo'; import Link from 'next/link'; import {useState} from 'react'; @@ -216,11 +216,22 @@ export default function CampaignsPage() {
Recipients + {(campaign.status === 'DRAFT' || campaign.status === 'SCHEDULED') && ( +
+ +
+ This count will be recalculated before sending +
+
+ )}

{campaign.totalRecipients.toLocaleString()}

- {campaign.totalRecipients > 0 && ( + {campaign.totalRecipients > 0 && campaign.status !== 'DRAFT' && (

{deliveryProgress.toFixed(0)}% sent

)} + {campaign.status === 'DRAFT' && ( +

Estimated

+ )}
{/* Open Rate */}