[No QA] feat: Add sentryLabel for INP debugging across report page components (part 3)#77755
Conversation
…page-3 # Conflicts: # src/components/FloatingActionButton.tsx # src/components/FloatingReceiptButton.tsx # src/components/MenuItem.tsx
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@abdulrahuman5196 @rlinoz One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/Videos |
@dariusz-biela May I ask whether we have added data-sentry-label to the receipt attachment’s three-dots icon and the download icon?
The PDF file in the attachment modal doesn’t have a data-sentry-label |
Glad you found it. I honestly didn't notice it was a different modal than Attachments. I'll add a commit to add those sentryLabels.
This was a conscious decision. Currently, the PDF in attachment modal doesn't have a I might come back to this someday, but for now we wanted to form a general opinion about this solution, so we wanted to cover the most significant actions on the report page, in a relatively simple way (that's why we focused on |
|
The Eslint React Compiler throws errors that files already being compiled contain useMemo, useCallback, and React.memo. I haven't changed any logic in them, so I wouldn't want to refactor this PR, as it affects seven files and would dilute the main purpose of this PR. |
|
I think we are good here, just not sure if the react compiler failure will fail in main too, let me check. |
|
@dariusz-biela please resolve conflict |
…page-3 # Conflicts: # src/pages/media/AttachmentModalScreen/AttachmentModalBaseContent/index.tsx
Create a reusable WithSentryLabel type in src/types/utils/SentryLabel.ts and update all component types to use it via intersection instead of defining sentryLabel?: string inline. Updated files: - GenericPressable/types.ts - Button/index.tsx - MenuItem.tsx - Checkbox.tsx - FloatingActionButton.tsx - FloatingReceiptButton.tsx - ContextMenuItem.tsx - BaseMiniContextMenuItem.tsx - ThreeDotsMenu/types.ts - ButtonWithDropdownMenu/types.ts - VideoPlayer/IconButton.tsx - ContextMenuActions.tsx
|
@rlinoz looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
No emergency, but the check is new and is being discussed here https://expensify.slack.com/archives/C08CZDJFJ77/p1765984171175009?thread_ts=1765912376.034269&cid=C08CZDJFJ77 Also, this PR didn't add any new components and it doesn't make much sense to tackle those changes here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.2.82-0 🚀
|
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.2.82-0 🚀
|
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.2.82-0 🚀
|
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.2.84-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.84-8 🚀
|


















Explanation of Change
This PR continues adding Sentry INP (Interaction to Next Paint) labels to interactive components on the report page to enable performance monitoring and debugging of user interactions. This is part 3 following PR #77397 (part 2).
Changes made:
Added SENTRY_LABEL constants in
src/CONST/index.tsfor the following categories:NAVIGATION_TAB_BAR(extended) - floating action button, floating receipt buttonFAB_MENU- create expense, track distance, create report, start chat, send invoice, book travel, test drive, new workspace, quick actionATTACHMENT_CAROUSEL- previous/next buttons, item, moderation button, retry buttonATTACHMENT_MODAL- send button, image zoomHEADER- back button, download button, close buttonVIDEO_PLAYER- play/pause, fullscreen, more, expand, thumbnail, mute, videoHTML_RENDERER- imageRECEIPT- imageExtended component types with optional
sentryLabelprop:FloatingActionButtonFloatingReceiptButtonVideoPlayer/IconButtonApplied labels to interactive elements across report page components:
FloatingActionButton.tsx- main FAB buttonFloatingReceiptButton.tsx- receipt scanning buttonFloatingActionButtonAndPopover.tsx- FAB menu items (create expense, track distance, create report, start chat, send invoice, book travel, test drive, new workspace, quick action)CarouselButtons.tsx- previous/next navigation buttons in attachment carouselCarouselItem.tsx- individual attachment itemsAttachmentViewImage/index.tsx- moderation button on imagesAttachmentView/index.tsx- retry button for failed attachmentsAttachmentModalBaseContent/index.tsx- send button in attachment modalImageView/index.tsx- image zoom functionalityHeaderWithBackButton/index.tsx- back, download, and close buttonsBaseVideoPlayer.tsx- video elementVideoPlayerControls/index.tsx- play/pause, expand, fullscreen buttonsVideoPlayerControls/VolumeButton/index.tsx- mute/volume buttonVideoPlayer/IconButton.tsx- generic video player icon buttonsVideoPlayerThumbnail.tsx- video thumbnailVideoPlayerPreview/index.tsx- video previewImageRenderer.tsx- images rendered in HTML contentReportActionItemImage.tsx- receipt images in report actionsNo logic changes
This PR contains no functional changes - only metadata annotations for Sentry performance tracking.
Fixed Issues
$ #76128
PROPOSAL:
Tests
[data-sentry-label]attribute using Ctrl+F / Cmd+Fdata-sentry-labelattributes:Note: This is the third batch of labels for the report page. Additional labels will be added in follow-up PRs.
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
FloatingActionButtons
Attachment in chat
Attachment modal