[CDX-386] Add seed item ids to rex events#266
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for passing seedItemIds through the SDK’s recommendation tracking APIs so recommendation view/click events can include seed item identifiers in their request payloads.
Changes:
- Extend
trackRecommendationResultsViewandtrackRecommendationResultClickpublic APIs to accept optionalseedItemIds. - Include
seed_item_idsin the HTTP body for recommendation view/click tracking request data when provided and non-empty. - Add/extend XCTest coverage for request payload building and tracking calls (plus an unrelated quiz integration test constant update).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| AutocompleteClient/FW/Logic/Worker/ConstructorIO.swift | Adds seedItemIds parameter + forwards into request data; updates doc examples. |
| AutocompleteClient/FW/Logic/Request/CIOTrackRecommendationResultsViewData.swift | Adds seedItemIds to request data and conditionally serializes seed_item_ids into payload. |
| AutocompleteClient/FW/Logic/Request/CIOTrackRecommendationResultClickData.swift | Adds seedItemIds to request data and conditionally serializes seed_item_ids into payload. |
| AutocompleteClientTests/FW/Logic/Worker/ConstructorIOTrackRecommendationResultsViewTests.swift | Adds worker-level test calling trackRecommendationResultsView(..., seedItemIds:). |
| AutocompleteClientTests/FW/Logic/Worker/ConstructorIOTrackRecommendationResultClickTests.swift | Adds worker-level test calling trackRecommendationResultClick(..., seedItemIds:). |
| AutocompleteClientTests/FW/Logic/Request/TrackRecommendationViewRequestBuilder.swift | Adds request-builder payload tests for seed_item_ids (single/multiple/empty). |
| AutocompleteClientTests/FW/Logic/Request/TrackRecommendationResultClickRequestBuilder.swift | Adds request-builder payload tests for seed_item_ids (single/multiple/empty). |
| AutocompleteClientTests/FW/Logic/Worker/ConstructorIOQuizIntegrationTests.swift | Updates quizVersionID constant used in quiz integration tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
esezen
previously approved these changes
Mar 27, 2026
…-item-ids-to-rex-events
There was a problem hiding this comment.
Code Review
This PR adds seedItemIDs support to trackRecommendationResultClick and trackRecommendationResultsView events. The implementation is clean, consistent with existing patterns, and well-tested — overall a solid addition.
Inline comments: 5 discussions added
Overall Assessment:
esezen
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for
seedItemIdsfor recommendation events:trackRecommendationResultClicktrackRecommendationResultsView