Skip to content

Conversation

@jaissica12
Copy link
Contributor

@jaissica12 jaissica12 commented Jan 16, 2026

Background

  • Added verbose logging for developer passed attributes in selectPlacements call.

What Has Changed

  • Added verbose logging of developer passed attributes in selectPlacements call in roktManager.ts
  • Added test in roktManager.spec.ts for corresponding change

Screenshots/Video

  • {Include any screenshots or video demonstrating the new feature or fix, if applicable}

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Additional Notes

Reference Issue (For employees only. Ignore if you are an outside contributor)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a devPassedAttributes field to the selectPlacements functionality to improve debugging capabilities. The devPassedAttributes field preserves the original, unmapped attributes passed by developers, while attributes contains the transformed attributes after mapping and enrichment.

Changes:

  • Added devPassedAttributes field to the enriched options passed to kit.selectPlacements containing the original unmapped attributes
  • Updated all test expectations in roktManager.spec.ts to verify that devPassedAttributes is correctly passed through
  • Added two new test cases specifically for devPassedAttributes behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/roktManager.ts Added devPassedAttributes: attributes to the enriched options object passed to kit.selectPlacements
test/jest/roktManager.spec.ts Updated existing test expectations to include devPassedAttributes and added two new test cases verifying original attributes are preserved
Comments suppressed due to low confidence (3)

src/roktManager.ts:32

  • The IRoktSelectPlacementsOptions interface should include devPassedAttributes as an optional property to properly type the enriched options object that includes this field. Without this, the code at line 247 adds a property that is not part of the declared interface, creating a type mismatch. Add devPassedAttributes?: IRoktPartnerAttributes; to the interface.
export interface IRoktSelectPlacementsOptions {
    attributes: IRoktPartnerAttributes;
    identifier?: string;
}

src/roktManager.ts:42

  • The IRoktLauncher interface references IRoktSelectPlacementsOptions which should include devPassedAttributes as an optional field. Once the interface is updated, this signature will automatically reflect the correct type.
    selectPlacements: (options: IRoktSelectPlacementsOptions) => Promise<IRoktSelection>;

src/roktManager.ts:67

  • The IRoktKit interface references IRoktSelectPlacementsOptions which should include devPassedAttributes as an optional field. Once the interface is updated, this signature will automatically reflect the correct type.
    selectPlacements: (options: IRoktSelectPlacementsOptions) => Promise<IRoktSelection>;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jaissica12 jaissica12 changed the title feat: add devPassedAttributes to selectPlacements feat: add debugAttributes to selectPlacements Jan 22, 2026
@jaissica12 jaissica12 requested a review from rmi22186 January 22, 2026 22:00
@jaissica12 jaissica12 changed the title feat: add debugAttributes to selectPlacements feat: add initialAttributes to selectPlacements Jan 23, 2026
@rmi22186
Copy link
Member

rmi22186 commented Jan 29, 2026

@jaissica12 new requirements for this are to just add console logging to the core SDK to log the initial attributes. please follow this Apple PR https://github.com/mParticle/mparticle-apple-sdk/pull/533/changes for the proper wording

@jaissica12 jaissica12 changed the title feat: add initialAttributes to selectPlacements feat: add attribute logging in selectPlacements Jan 29, 2026
@jaissica12
Copy link
Contributor Author

jaissica12 commented Jan 30, 2026

@jaissica12 new requirements for this are to just add console logging to the core SDK to log the initial attributes. please follow this Apple PR https://github.com/mParticle/mparticle-apple-sdk/pull/533/changes for the proper wording

@rmi22186 Added console logging in the core SDK for initial attributes and also updated related kit PR

@jaissica12 jaissica12 requested a review from rmi22186 January 30, 2026 15:33
@jaissica12 jaissica12 requested a review from rmi22186 January 30, 2026 15:54
@jaissica12 jaissica12 force-pushed the feat/SDKE-786-log-custom-event-for-selectPlacements branch from c055a4f to 391d2f3 Compare January 30, 2026 21:54
@sonarqubecloud
Copy link

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.

4 participants