chatwoot/app
Sojan Jose f27bbef73b
feat: show processing status for one-off campaigns (#14592)
## Summary

One-off SMS and WhatsApp campaigns now show a `Processing` state while
the audience send is in progress. The campaign moves to `Completed`
after processing finishes, and already-processing campaigns are skipped
by the scheduler to avoid duplicate sends.

## Closes

- [CW-6037: feat: Introduce an in-progress status for
campaigns](https://linear.app/chatwoot/issue/CW-6037/feat-introduce-an-in-progress-status-for-campaigns)

## Screenshot

SMS campaign card showing the new `Processing` status.

<img width="3840" height="2160" alt="framed-campaign-processing-status"
src="https://github.com/user-attachments/assets/de7913b5-65fb-4121-9034-24a568eb0382"
/>

## What changed

- Added `processing` as a campaign status.
- Mark one-off campaigns as `processing` under a row lock before the
send service runs.
- Complete SMS, Twilio SMS, and WhatsApp one-off campaigns after
audience processing finishes.
- Keep campaigns in `processing` if an unexpected service error escapes,
so the scheduler does not automatically resend the audience.
- Added the `Processing` label for SMS and WhatsApp campaign cards.

## Known operational behavior

If a worker is interrupted or an unexpected service error escapes after
a campaign is marked `processing`, the campaign can remain in
`processing`. This is intentional for now to avoid automatic
full-audience resends. Installation admins can decide whether to mark
the campaign completed or restart it manually from the Rails console
after checking what was sent.

## How to test

- Create a one-off SMS or WhatsApp campaign scheduled for now.
- Run the scheduled job or trigger the campaign job.
- Confirm the campaign card shows `Processing` while the audience is
being processed. For small audiences, refresh during processing or use a
larger audience so the state is observable.
- Confirm the campaign moves to `Completed` after audience processing
finishes.
- Confirm an already-processing campaign is not enqueued again by the
scheduled job.
2026-06-01 16:47:17 +05:30
..
actions fix: Skip redundant contact saves in ContactIdentifyAction (#13778) 2026-03-11 21:40:38 -07:00
assets feat: Hide installation identifier (#11722) 2025-06-17 15:45:40 -07:00
builders fix: prevent bot metrics double-counting when handoff and resolution coexist [CW-6210] (#14032) 2026-05-13 18:43:23 +05:30
channels fix: Move contact events to account stream rather than individual user stream (#11082) 2025-03-13 17:46:48 -07:00
controllers refactor(onboarding): use separate onboarding controller (#14507) 2026-06-01 13:34:11 +05:30
dashboards feat: Add platform-wide status banners for outage notifications (#13943) 2026-04-29 17:18:38 +04:00
dispatchers feat: Unread Count: added api, store refresher, invalidation and events (2/3)[CW-6851] (#14369) 2026-05-20 17:36:09 +05:30
drops fix: render agent variables in automation messages (#14338) 2026-05-04 13:25:40 +05:30
fields fix(super-admin): prefill confirmed_at in new user form (#13662) 2026-03-10 12:14:58 +05:30
finders feat(voice): Wire Twilio voice flow through unified call model (#14091) 2026-04-30 11:25:39 +04:00
helpers fix: captain-v2 cannot see image attachments shared via email (#14449) 2026-05-19 10:11:32 +05:30
javascript feat: show processing status for one-off campaigns (#14592) 2026-06-01 16:47:17 +05:30
jobs feat: scheduler fairness [AI-159] (#14425) 2026-05-27 16:01:51 +05:30
listeners feat: Unread Count: added api, store refresher, invalidation and events (2/3)[CW-6851] (#14369) 2026-05-20 17:36:09 +05:30
mailboxes fix: captain-v2 cannot see image attachments shared via email (#14449) 2026-05-19 10:11:32 +05:30
mailers fix: validate OpenAI hook credentials (#14068) 2026-05-18 14:08:57 +05:30
models feat: show processing status for one-off campaigns (#14592) 2026-06-01 16:47:17 +05:30
policies fix(contacts): align contact export permissions (#14601) 2026-06-01 13:58:57 +05:30
presenters feat(webhooks): Emit inbox_updated when an inbox is disconnected (#14504) 2026-05-22 09:00:18 +04:00
services feat: show processing status for one-off campaigns (#14592) 2026-06-01 16:47:17 +05:30
views feat(webhooks): Emit inbox_updated when an inbox is disconnected (#14504) 2026-05-22 09:00:18 +04:00