8000 Campaign senders: show capacity after warmup by uzairahmed242 · Pull Request #36 · tashfeenahmed/kinetic · GitHub
[go: up one dir, main page]

Skip to content

Campaign senders: show capacity after warmup - #36

Open
uzairahmed242 wants to merge 1 commit into
tashfeenahmed:mainfrom
uzairahmed242:fix/campaign-capacity-minus-warmup
Open

uzairahmed242 wants to merge 1 commit into
tashfeenahmed:mainfrom
uzairahmed242:fix/campaign-capacity-minus-warmup

Conversation

@uzairahmed242
Copy link
Copy Markdown

What

The campaign Senders tab now shows what each mailbox can actually send for the campaign today, after warmup.

  • GET /api/campaigns/:id/sender-emails also returns warmup_today (today's warmup ramp target, from rampTarget) and campaign_capacity (daily_limit - warmup_today, floored at 0). Existing fields are unchanged.
  • Senders tab: new For campaigns column with the warmup share in small text underneath. The capacity line uses campaign_capacity and, when warmup is on, reads e.g. "mailbox limits 180 minus 120 warmup, campaign limit 1,000".

Why

planCampaign already takes warmup sends out of the same daily limit ("so the two never stack"), but the tab added up raw daily_limits. We hit this in our first campaign: six 30/day mailboxes at the 20/day warmup cap showed 180/day, when only about 60 were really available. It looked like a hard 30/day limit was in the way.

How tested

  • New test in server/test/engine.test.ts: one mailbox warming for a month (20/day cap) and one not, both at 50/day. The route reports 20 → 30 and 0 → 50.
  • server/test/engine.test.ts passes (20/20). npm run typecheck -w server and -w web are clean.
  • I ran these locally on Node 22, not 24, and didn't finish the full npm test, so CI here is the real check.

Not changed (possible follow-up)

The Add sender emails modal still shows "+N emails/day capacity" from raw limits, because /api/sender-emails doesn't carry the ramp target. I left it out to keep this focused.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LQ9YMidHHSER256BUeZivC

Warmup mail comes out of the same daily limit as campaign mail (planCampaign
subtracts it), but the campaign Senders tab added up raw daily limits. With
warmup at its 20/day cap, six 30/day mailboxes showed 180/day when only about
60 were really available for the campaign.

- GET /api/campaigns/:id/sender-emails now also returns warmup_today (today's
  warmup ramp target) and campaign_capacity (daily_limit minus warmup_today).
- Senders tab: new "For campaigns" column with the warmup share underneath;
  the capacity line uses campaign_capacity and says how much went to warmup.
- Test covering a warming and a non-warming mailbox.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LQ9YMidHHSER256BUeZivC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0