Skip to content

Conversation

@lmac012
Copy link
Contributor

@lmac012 lmac012 commented Dec 22, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1212546442226307?focus=truefocus=true

Description

Steps to test this PR

  • Remove .debug suffix from application ID to enable testing subscriptions OR apply staging patch
  • Purchase test subscription
  • Verify in logcat that pixels with wide_ prefix are sent, for example wide_auth-token-refresh.* or wide_subscription-purchase.*
  • Verify that whenever wide event pixel is sent, the app also makes POST request to improving.duckduckgo.com/e, with payload containing data matching the pixel.

No UI changes


Note

Add API-based wide event delivery and delegate between API/pixel via feature toggles; update processing to use new repo queries and schedule retries.

  • Wide events transport:
    • Add ApiWideEventSender using WideEventService (POST ${AppUrl.Url.PIXEL}/e) with request models (WideEventRequest, GlobalSection, AppSection, FeatureSection, FeatureData, ContextSection).
    • Introduce DelegatingWideEventSender to route to api and/or pixel senders based on wideEvents toggles (sendWideEventsViaPost, sendWideEventsViaPixels).
    • Extract PixelWideEventSender and keep pixel param removal plugin; no functional change noted.
  • Processing:
    • CompletedWideEventsProcessor now listens to hasCompletedWideEvents() and processes IDs via getCompletedWideEventIds() in mutex-guarded chunks; on failure, schedules a retry CompletedWideEventsWorker with network constraint.
  • Persistence:
    • WideEventDao/Repository: add getCompletedWideEventIds() (suspend) and hasCompletedWideEvents(): Flow<Boolean>; remove/combine previous flow API.
  • Feature toggles:
    • Add sendWideEventsViaPixels and sendWideEventsViaPost to WideEventFeature (defaults TRUE and INTERNAL respectively).
  • Tests:
    • Add ApiWideEventSenderTest, CompletedWideEventsProcessorTest; update WideEventRepositoryTest for new APIs.

Written by Cursor Bugbot for commit 8627e21. This will update automatically on new commits. Configure here.

Copy link
Contributor Author

lmac012 commented Dec 22, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@lmac012 lmac012 marked this pull request as ready for review December 22, 2025 11:57
@lmac012 lmac012 force-pushed the feature/lukasz/wide-event-post branch from 2bdbe0c to 8627e21 Compare December 22, 2025 15:57
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.

1 participant