Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/pages/inbox/report/ReportActionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -441,14 +441,21 @@ function ReportActionsListContent({reportID, onLayout}: ReportActionsListProps)
return <ReportActionsSkeletonView />;
}

// The FIX badge points at the errored child (the just-failed expense), which is the newest action at the
// bottom of the chat — never above the viewport — so it must surface regardless of scroll position, but only
// when it has a resolved, rendered target (actionBadgeTargetIndex >= 0) so pressing the pill scrolls to it
// instead of being a no-op (some RBR sources leave actionTargetReportActionID undefined). Green badges stay a
// "scroll up to your queue" affordance and remain gated to the above-viewport case.
const shouldShowActionBadge = !isProduction && (isActionBadgeAboveViewport || (reportAttributes?.actionBadge === CONST.REPORT.ACTION_BADGE.FIX && actionBadgeTargetIndex >= 0));

return (
<>
<FloatingMessageCounter
hasNewMessages={!!unreadMarkerReportActionID}
isActive={isFloatingMessageCounterVisible}
onClick={scrollToBottomAndMarkReportAsRead}
actionBadge={!isProduction && isActionBadgeAboveViewport ? reportAttributes?.actionBadge : undefined}
actionBadgeBrickRoadStatus={!isProduction && isActionBadgeAboveViewport ? reportAttributes?.brickRoadStatus : undefined}
actionBadge={shouldShowActionBadge ? reportAttributes?.actionBadge : undefined}
actionBadgeBrickRoadStatus={shouldShowActionBadge ? reportAttributes?.brickRoadStatus : undefined}
onActionBadgePress={scrollToActionBadgeTarget}
isMarkAsDone={shouldUseMarkAsDoneCopy}
/>
Expand Down
Loading