Skip to content

Phase2 sub3 fix feedback - #97757

Draft
hoangzinh wants to merge 3 commits into
Expensify:mainfrom
hoangzinh:phase2-sub3-fix-feedback
Draft

Phase2 sub3 fix feedback#97757
hoangzinh wants to merge 3 commits into
Expensify:mainfrom
hoangzinh:phase2-sub3-fix-feedback

Conversation

@hoangzinh

Copy link
Copy Markdown
Contributor

Updated and applied the same principle across the rest of the commit.

getShareDestination now takes reportName?: string, and DynamicNewTaskPage sources it via the existing useDerivedReportNameByReportID selector instead of subscribing to the whole map.

getMovedTransactionMessage / getUnreportedTransactionMessage got the same change (derivedReportName?: string). These were the worst case — MovedTransactionAction / UnreportedTransactionAction are report-action list items, so every instance in a chat held the full map. Since the report they name is resolved internally from the action, I exported getMovedTransactionReportID / getUnreportedTransactionReportID so callers can key the selector without duplicating that logic

…ame across libs

Migrate call sites off deprecatedGetReportName to the new getReportName
signature, which takes the precomputed report name string directly
instead of the full reportAttributes map.
- Replace `reportAttributes` params with a single report-name arg in
  getMovedTransactionMessage, getUnreportedTransactionMessage,
  getShareDestination and getMovedFromOrToReportMessage
- Add getMovedTransactionReportID/getUnreportedTransactionReportID so
  components can subscribe via useDerivedReportNameByReportID instead of
  the whole report attributes map
- Fall back to module-level reportAttributesDerivedValue for imperative
  callers (SidebarUtils, OptionsListUtils, ReportNameUtils, ContextMenu)
- Drop reportAttributes from ContextMenuActionPayload and
  getReportPreviewMessageForCopy
@hoangzinh

Copy link
Copy Markdown
Contributor Author
image

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
...onents/ReportActionItem/MovedTransactionAction.tsx 100.00% <100.00%> (ø)
...s/ReportActionItem/UnreportedTransactionAction.tsx 100.00% <100.00%> (ø)
src/libs/ModifiedExpenseMessage.ts 90.67% <100.00%> (+0.03%) ⬆️
src/libs/ReportNameUtils.ts 81.69% <ø> (+0.10%) ⬆️
src/libs/SearchUIUtils.ts 65.14% <100.00%> (+0.89%) ⬆️
src/libs/actions/Task.ts 64.22% <100.00%> (-0.04%) ⬇️
...report/ContextMenu/BaseReportActionContextMenu.tsx 86.14% <ø> (+0.08%) ⬆️
...fication/LocalNotification/BrowserNotifications.ts 0.00% <0.00%> (ø)
src/libs/OptionsListUtils/index.ts 87.01% <75.00%> (+0.16%) ⬆️
src/libs/ReportUtils.ts 86.75% <96.15%> (+0.55%) ⬆️
... and 4 more
... and 895 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant