Skip to content

Conversation

Vangaorth
Copy link
Contributor

@Vangaorth Vangaorth commented Oct 15, 2025

Short description

This PR adds error tracking for the phase 2 of SEND's AAR.
It also fixes the error toast not showing when an attachment download fails.

Simulator.Screen.Recording.-.iPhone.16.-.2025-10-16.at.10.50.12.mp4

List of changes proposed in this pull request

  • Error tracking via mixpanel event with both phase and reason property
  • SENDAARErrorComponent uses the ladybug feature to display failure reasons when in debug
  • Proper toast showing (in case of a download failure) using the useIOToast hook instead of the Toast property of the design system

How to test

Using the io-dev-api-server, check that every failure entry point is properly tracked:

  • QR code fetch
  • Notification fetch (with all the service retrieval failures)
  • Attachment download

Also check that, in debug modo, the ladybug feature is working on the SENDAARErrorComponent

Copy link
Contributor

github-actions bot commented Oct 15, 2025

Jira Pull Request Link

This Pull Request refers to Jira issues:

Copy link
Contributor

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

Copy link

codecov bot commented Oct 15, 2025

Codecov Report

❌ Patch coverage is 97.93814% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.76%. Comparing base (2f9be5f) to head (aa778d7).

Files with missing lines Patch % Lines
.../features/messages/hooks/useAttachmentDownload.tsx 50.00% 1 Missing ⚠️
ts/features/pn/aar/screen/SendQRScanFlowScreen.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7485      +/-   ##
==========================================
+ Coverage   59.69%   59.76%   +0.06%     
==========================================
  Files        1839     1839              
  Lines       39659    39714      +55     
  Branches     9163     9115      -48     
==========================================
+ Hits        23675    23734      +59     
- Misses      15901    15909       +8     
+ Partials       83       71      -12     
Files with missing lines Coverage Δ
ts/features/messages/saga/handleLoadMessageData.ts 91.17% <ø> (ø)
ts/features/pn/aar/analytics/index.ts 100.00% <100.00%> (ø)
...pn/aar/components/errors/SendAARErrorComponent.tsx 92.85% <100.00%> (+1.19%) ⬆️
.../features/pn/aar/saga/downloadAARAttachmentSaga.ts 98.03% <100.00%> (ø)
.../features/pn/aar/saga/fetchNotificationDataSaga.ts 97.95% <100.00%> (+0.81%) ⬆️
ts/features/pn/aar/saga/fetchQrCodeSaga.ts 100.00% <100.00%> (+4.16%) ⬆️
ts/features/pn/aar/store/selectors/index.ts 100.00% <100.00%> (+5.40%) ⬆️
ts/features/pn/aar/utils/stateUtils.ts 100.00% <ø> (ø)
ts/features/pn/aar/utils/testUtils.ts 100.00% <ø> (ø)
ts/features/pn/screens/MessageDetailsScreen.tsx 87.50% <100.00%> (+0.70%) ⬆️
... and 3 more

... and 14 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 2f9be5f...aa778d7. 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.

Comment on lines +58 to +59
const titleReport = input.title != null ? ` ${input.title}` : "";
const traceIdReport = input.traceId != null ? ` ${input.traceId}` : "";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const titleReport = input.title != null ? ` ${input.title}` : "";
const traceIdReport = input.traceId != null ? ` ${input.traceId}` : "";
const titleReport = ` ${input.title??""}`;
const traceIdReport = ` ${input.traceId??""}`

what about nullish coalescence for this whole section?

Copy link
Contributor Author

@Vangaorth Vangaorth Oct 16, 2025

Choose a reason for hiding this comment

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

Doing it like that leads to a worst debug string when data is nullish. The "verbose" solution produces:
"Some other parts of the log"
while the nullish:
"Some other parts of the log "

While the extra spaces here seem minor, when combined with different nullish cases, thye lead to a dirtier log string.

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