Skip to content
Merged
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
6 changes: 2 additions & 4 deletions src/pages/inbox/sidebar/SidebarLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type {ValueOf} from 'type-fest';
import LHNOptionsList from '@components/LHNOptionsList/LHNOptionsList';
import OptionsListSkeletonView from '@components/OptionsListSkeletonView';
import useConfirmReadyToOpenApp from '@hooks/useConfirmReadyToOpenApp';
import useEnvironment from '@hooks/useEnvironment';
import useOnyx from '@hooks/useOnyx';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useStyleUtils from '@hooks/useStyleUtils';
Expand Down Expand Up @@ -37,7 +36,6 @@ type SidebarLinksProps = {
};

function SidebarLinks({insets, optionListItems, priorityMode = CONST.PRIORITY_MODE.DEFAULT, isActiveReport}: SidebarLinksProps) {
const {isProduction} = useEnvironment();
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
const {shouldUseNarrowLayout} = useResponsiveLayout();
Expand Down Expand Up @@ -73,9 +71,9 @@ function SidebarLinks({insets, optionListItems, priorityMode = CONST.PRIORITY_MO
cancelSpan(`${CONST.TELEMETRY.SPAN_OPEN_REPORT}_${option.reportID}`);
return;
}
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(option.reportID, isProduction ? undefined : option.actionTargetReportActionID));
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(option.reportID));

Choose a reason for hiding this comment

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

P2 Badge Preserve reportActionID when opening badge-marked chats

In non-production builds the LHN still shows Approve/Pay/Submit/Fix badges (src/components/LHNOptionsList/OptionRowLHN.tsx:164), but this change always drops actionTargetReportActionID from the route. ReportScreen feeds that param into usePaginatedReportActions(reportID, reportActionID), and the hook only loads the chain containing the linked action; without it, it falls back to the newest page of actions (src/hooks/usePaginatedReportActions.ts:17-20,47-76). So when the actionable preview or failing action is older than the latest chat messages, clicking the badge-marked row now opens the room without the target action loaded, which makes the badge unable to take QA/internal users to the item it refers to.

Useful? React with 👍 / 👎.

},
[shouldUseNarrowLayout, isActiveReport, isProduction],
[shouldUseNarrowLayout, isActiveReport],
);

const viewMode = priorityMode === CONST.PRIORITY_MODE.GSD ? CONST.OPTION_MODE.COMPACT : CONST.OPTION_MODE.DEFAULT;
Expand Down
Loading