gumroad icon indicating copy to clipboard operation
gumroad copied to clipboard

feat: resend all button for missed posts/emails

Open sm17p opened this issue 1 month ago • 1 comments

Closes #1814

This PR enables a user to resend all missed posts/emails using a single button. Missed posts can be furthere filtered by workflows using a Select box.

Changes

  1. The section title is changed from Send Missed Posts to a Select box which allows you to filter missed posts by a workflow
  2. When Resend All is clicked, a sidekiq job is triggered to send all of the missed emails
  3. Business logic used for sending posts single/bulk is re-factored into SendPostsForPurchaseService service, which is then used throughout the code base.
  4. Users who have opted out of receiving comms are not sent any emails for single/bulk resend paths
  5. There is an additional empty state which wasn't a part of the design presented inside the demo video. It's displayed when no missed posts are present (had to do this so users could switch properly between selected workflows)

Before

https://github.com/user-attachments/assets/7996a12c-6263-4e06-9862-b3d57afe5e1c

After

Screenshots

Device Light Dark
Desktop d-light d-dark
Mobile m-light m-dark

Demo

  1. Send all missed posts with emails (All the mails were delivered, attaching screenshots of a few)
    • Mail #1
    • Mail #2

Specs Passing

bundle exec rspec spec/policies/installment_policy_spec.rb spec/services/send_posts_for_purchase_service_spec.rb spec/requests/customers/customers_spec.rb:457 spec/sidekiq/send_missed_posts_job_spec.rb spec/controllers/posts_controller_spec.rb spec/policies/audience/purchase_policy_spec.rb spec/controllers/workflows_controller_spec.rb spec/presenters/workflow_presenter_spec.rb spec/presenters/workflows_presenter_spec.rb

specs_passing

AI Disclosure

  • Cursor Ask Mode (Auto Model) for understanding code base
  • Cursor Plan Mode + Build (Sonnet 4.5 + Composer) for initial draft
  • Cursor Agent Mode (Auto) for co-ordinated edits + debugging

Live Stream Disclosure

  • Have watched all four live streams

sm17p avatar Nov 27 '25 16:11 sm17p

RFR! Please have a look @ershad 🙏

sm17p avatar Nov 27 '25 23:11 sm17p

Thank you for the review 🙏

I'll address the concerns raised over here and raise a new PR

sm17p avatar Dec 05 '25 17:12 sm17p