Fix: Report-Expense report thread and reply title is shown as In expense report#77633
Fix: Report-Expense report thread and reply title is shown as In expense report#77633grgia merged 4 commits intoExpensify:mainfrom
Conversation
|
@mananjadhav Please 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] |
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.
|
trjExpensify
left a comment
There was a problem hiding this comment.
Yep, I seem to recall we agreed that a thread in an expense report should use the expense report as the subtitle in Reports > Chats.
P.S Can you try to make your PR titles more reflective of what code changes the PR is making / fill out the explanation of changes section? Thanks!
|
Reviewing the code. |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safariweb-expense-report-title.mov |
|
Quick bump @grgia on the PR. |
| while (currentParent) { | ||
| // Prevent infinite loops in case of circular references | ||
| if (visitedReportIDs.has(currentParent.reportID)) { | ||
| break; |
There was a problem hiding this comment.
If we break, we still return policy name?
|
|
||
| while (currentParent) { | ||
| // Prevent infinite loops in case of circular references | ||
| if (visitedReportIDs.has(currentParent.reportID)) { |
There was a problem hiding this comment.
Can we guarantee this reportID exists?
There was a problem hiding this comment.
No, we cannot guarantee reportID exists at runtime, even though TypeScript marks it as required. So I add a guard check logic.
| @@ -6107,6 +6107,38 @@ function getReportName( | |||
| function getSearchReportName(props: GetReportNameParams): string { | |||
| const {report, policy} = props; | |||
| if (isChatThread(report) && policy?.name) { | |||
There was a problem hiding this comment.
Why do we still need this policy?.name check
There was a problem hiding this comment.
The check ensures we only use this special traversal logic when we have a valid policy name to return. Without it, we could return undefined instead of letting getReportName() handle the case with its fallbacks.
|
@grgia Is this waiting on something? |
|
Hi @trjExpensify , could you please let me know why this hasn’t been merged yet, please? |
|
@annaweber830 the performance tests were failing, I reran now but all tests need to pass. |
|
@grgia The performance test that is failing seems to be unrelated to the actual code. Also the step at which it fails is "Post Setup Nodejs". |
|
Not sure @annaweber830, I approved it before. |
|
Please merge main @annaweber830 |
|
I have reran the tests, so let's see if merging main fixes it |
|
thank you! |
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.3.3-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.3.3-8 🚀
|




…space
Explanation of Change
Fixed Issues
$ #76058
PROPOSAL: #76058 (comment)
Tests
Offline tests
Same as Test
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Android: Native
Screen.Recording.2025-12-13.at.7.34.02.PM.mov
Android: mWeb Chrome
Screen.Recording.2025-12-13.at.7.16.36.PM.mp4
iOS: Native
Screen.Recording.2025-12-13.at.11.35.38.PM.mp4
iOS: mWeb Safari
Screen.Recording.2025-12-13.at.11.44.40.PM.mp4
MacOS: Chrome / Safari
Screen.Recording.2025-12-13.at.7.06.03.PM.mp4