Skip to content

Conversation

@DavideOnano
Copy link
Collaborator

@DavideOnano DavideOnano commented Dec 4, 2025

Short description

Add origin context to all “unexpected” IT Wallet analytics events so Mixpanel receives more actionable reasons instead of generic UNEXPECTED values.

List of changes proposed in this pull request

  • Enrich CIE card reading unexpected tracking with event-derived origins and keep structured failure details.
  • Add origin metadata to credential and eID issuance unexpected tracking, wrapping serialized reasons when needed.
  • Extend remote and proximity presentation unexpected tracking to include origin hints and preserve reason structure for Mixpanel.

How to test

Unexpected test cases are unpredictable; in the current state, I couldn't cover the tests for this scenario.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Jira Pull Request Link

This Pull Request refers to Jira issues:

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 53.33333% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.98%. Comparing base (e2cbaed) to head (6dff53d).

Files with missing lines Patch % Lines
...on/cie/components/ItwCieCardReadFailureContent.tsx 0.00% 3 Missing ⚠️
...twallet/identification/cie/hooks/useCieManager.tsx 0.00% 2 Missing ⚠️
...llet/issuance/hooks/useCredentialEventsTracking.ts 50.00% 1 Missing ⚠️
...es/itwallet/issuance/hooks/useEidEventsTracking.ts 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7684   +/-   ##
=======================================
  Coverage   59.97%   59.98%           
=======================================
  Files        1898     1898           
  Lines       41445    41450    +5     
  Branches     9535     9616   +81     
=======================================
+ Hits        24858    24865    +7     
+ Misses      16510    16497   -13     
- Partials       77       88   +11     
Files with missing lines Coverage Δ
ts/features/itwallet/analytics/index.ts 40.00% <ø> (ø)
ts/features/itwallet/common/utils/itwStoreUtils.ts 83.87% <100.00%> (ø)
...n/proximity/hooks/useItwProximityEventsTracking.ts 81.25% <100.00%> (+1.25%) ⬆️
...ntation/remote/hooks/useItwRemoteEventsTracking.ts 89.65% <100.00%> (+0.36%) ⬆️
...llet/issuance/hooks/useCredentialEventsTracking.ts 7.69% <50.00%> (+3.69%) ⬆️
...es/itwallet/issuance/hooks/useEidEventsTracking.ts 8.33% <50.00%> (+3.98%) ⬆️
...twallet/identification/cie/hooks/useCieManager.tsx 1.81% <0.00%> (ø)
...on/cie/components/ItwCieCardReadFailureContent.tsx 2.70% <0.00%> (-0.04%) ⬇️

... and 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2cbaed...6dff53d. 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.

@gispada
Copy link
Collaborator

gispada commented Dec 17, 2025

I am not totally convinced of this new origin property that takes a few hardcoded values. Does it really help when dealing with serialization issues? I thought we had to improve [object Object] messages.

Was it asked explicitly by the analytics team?

@DavideOnano
Copy link
Collaborator Author

@gispada
We decided to add this new key together with @MonicaRungi-EY to at least get an idea of where the error originates.
Unclear values such as [object Object], empty string and similar are received by the client as response payload, and we haven’t found an effective way to handle them on our side so far.

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