Skip to content

feat(IT-Wallet): [SIW-4177] Track third channel credentials#8082

Open
riccardosacco99 wants to merge 10 commits into
masterfrom
SIW-4177-tracking-third-channel-credentials
Open

feat(IT-Wallet): [SIW-4177] Track third channel credentials#8082
riccardosacco99 wants to merge 10 commits into
masterfrom
SIW-4177-tracking-third-channel-credentials

Conversation

@riccardosacco99

Copy link
Copy Markdown
Collaborator

Short description

This PR adds the new IT Wallet Mixpanel property ITW_THIRD_PARTY_CREDENTIAL, tracked both as a Super Property and a Profile Property. The property summarizes whether the user owns at least one credential obtained through the third-party/catalogue channel and whether at least one of those credentials is currently valid.

List of changes proposed in this pull request

  • Add ITW_THIRD_PARTY_CREDENTIAL to IT Wallet analytics base properties.
  • Compute the property as:
    • not_available when no third-party/catalogue credential is present.
    • valid when at least one third-party/catalogue credential is valid.
    • not_valid when third-party/catalogue credentials are present but none are valid.
  • Exclude PID and historical L2 credentials from the third-party aggregate calculation.
  • Keep the property synced on full analytics sync and after credential store/remove operations.
  • Reset the property to not_available when wallet analytics properties are reset.
  • Add unit tests for property calculation, profile/super updates, and credential store/remove saga updates.

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Jira Pull Request Link

This Pull Request refers to Jira issues:

@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 62.33%. Comparing base (b71fcee) to head (60f41b8).

Files with missing lines Patch % Lines
...wallet/analytics/properties/basePropertyBuilder.ts 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #8082   +/-   ##
=======================================
  Coverage   62.32%   62.33%           
=======================================
  Files        1954     1954           
  Lines       36943    36960   +17     
  Branches     6166     6168    +2     
=======================================
+ Hits        23026    23040   +14     
- Misses      12553    12555    +2     
- Partials     1364     1365    +1     
Files with missing lines Coverage Δ
...res/itwallet/analytics/properties/propertyTypes.ts 100.00% <ø> (ø)
.../itwallet/analytics/properties/propertyUpdaters.ts 66.66% <100.00%> (+3.80%) ⬆️
...llet/analytics/saga/credentialAnalyticsHandlers.ts 72.72% <100.00%> (+4.30%) ⬆️
...-app/ts/features/itwallet/analytics/utils/types.ts 57.14% <ø> (ø)
...wallet/analytics/properties/basePropertyBuilder.ts 95.23% <90.00%> (-1.64%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b71fcee...60f41b8. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 extends the IT Wallet analytics property set by adding a new Mixpanel aggregate property, ITW_THIRD_PARTY_CREDENTIAL, and ensures it is kept in sync both as a Profile Property and a Super Property. The new property summarizes whether the user has any third-party/catalogue credentials and whether at least one of them is currently valid, excluding PID and historical L2 credentials.

Changes:

  • Introduced the ITW_THIRD_PARTY_CREDENTIAL Mixpanel property with values not_available | valid | not_valid and added it to ITW base properties.
  • Implemented aggregate computation logic (filtering out PID and L2 credentials) and ensured it updates on full analytics sync, wallet revoked reset, and credential store/remove events.
  • Added unit tests covering aggregate computation and profile/super-property update flows, including saga handler updates.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/main-app/ts/features/itwallet/analytics/utils/types.ts Adds the ItwThirdPartyCredentials union type used by the new property.
apps/main-app/ts/features/itwallet/analytics/saga/credentialAnalyticsHandlers.ts Recomputes and syncs the aggregate property on credential store/remove operations.
apps/main-app/ts/features/itwallet/analytics/saga/tests/credentialAnalyticsHandlers.test.ts Updates saga tests to validate the new aggregate-property updater behavior.
apps/main-app/ts/features/itwallet/analytics/properties/propertyUpdaters.ts Adds updateThirdPartyCredentialProperty and resets the new property on wallet revoked.
apps/main-app/ts/features/itwallet/analytics/properties/propertyTypes.ts Extends analytics property typings to include ITW_THIRD_PARTY_CREDENTIAL.
apps/main-app/ts/features/itwallet/analytics/properties/basePropertyBuilder.ts Implements buildThirdPartyCredentialProperty and wires it into base property building.
apps/main-app/ts/features/itwallet/analytics/properties/tests/propertyUpdaters.test.ts Adds test coverage for syncing the new property to Profile and Super properties.
apps/main-app/ts/features/itwallet/analytics/properties/tests/basePropertyBuilder.test.ts Adds unit tests for the aggregate property calculation (not_available, valid, not_valid, L2 exclusion).

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

@riccardosacco99 riccardosacco99 force-pushed the SIW-4177-tracking-third-channel-credentials branch from 60f41b8 to aa870e5 Compare June 18, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants