-
Notifications
You must be signed in to change notification settings - Fork 31
macOS: Update pending wide event logic #2220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Updates the wide event service to simplify the pending event logic by consolidating previously separate functions for abandoned and delayed pixels into a single unified approach, fixing bugs where delayed events weren't sent correctly.
- Replaced complex queue-based architecture with direct async/await implementation
- Unified abandoned and delayed pixel processing into a single
sendPendingEvents()
method - Added comprehensive test coverage for the simplified logic
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
WideEventService.swift | Simplified pending event logic by removing queue-based approach and consolidating abandoned/delayed processing |
WideEventServiceTests.swift | Added comprehensive test suite covering feature flag gating, timeout scenarios, and error cases |
AppDelegate.swift | Updated to use new async sendPendingEvents() method instead of callback-based approach |
project.pbxproj | Added test file to Xcode project configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
freemiumDBPScanResultPolling?.startPollingOrObserving() | ||
|
||
wideEventService.sendAbandonedPixels { } | ||
Task { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can still move it to utility if want to
Task(priority: .utility)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1199333091098016/task/1211656286347726?focus=true
Tech Design URL:
CC:
Description
This PR updates the pending wide event logic, simplifying the implementation and also fixing a bug where delayed events weren't sent correctly.
Testing Steps
Impact and Risks
What could go wrong?
Quality Considerations
Notes to Reviewer
Internal references:
Definition of Done | Engineering Expectations | Tech Design Template
Note
Replaces callback/queue-based wide event sending with async
sendPendingEvents
and updates AppDelegate; adds unit tests for purchase/restore flows and feature-flag gating.resume
,sendAbandonedPixels
, andsendDelayedPixels
with asyncsendPendingEvents()
that processes purchase and restore events (abandoned + delayed) based on feature flags.AppDelegate
, switch toTask { await wideEventService.sendPendingEvents() }
at launch.WideEventServiceTests.swift
covering feature flag gating, purchase/restore happy paths, timeouts, partial data, and entitlement checks.WideEventServiceTests.swift
in Xcode project and unit test targets.Written by Cursor Bugbot for commit 5480658. This will update automatically on new commits. Configure here.