Repository navigation
Remove old getReportName - #92321
Remove old getReportName#92321neil-marcellini merged 14 commits into
Conversation
|
@eVoloshchak 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce98d0ebab
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| reportID, | ||
| from, | ||
| reportName: getSearchReportName({report, policy, personalDetails: data.personalDetailsList, transactions, invoiceReceiverPolicy, reports, isReportArchived}), | ||
| reportName: getReportName(report, reportAttributesDerivedValue), |
There was a problem hiding this comment.
Compute names for snapshot-only chat reports
When chat search returns a report that is only present in the search snapshot, useReportAttributes() has no entry for it because the derived report attributes are computed from COLLECTION.REPORT, not from SNAPSHOT data. This call then falls back to only report.reportName, which is empty/default for cases like policy expense chats, self DMs, and some group chats, so the search result loses the computed “In ” label; the removed code computed the name from the snapshot’s personal details/policy data in exactly this path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@shubham1206agra do you think this is valid codex comment?
There was a problem hiding this comment.
@sosek108 I would not think about this too much. It's valid, but will be super rare, since most reports are present in useReportAttributes. This trade-off has already been discussed on Slack.
|
I've refactored |
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.
|
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
# Conflicts: # src/libs/ReportUtils.ts # src/libs/SearchUIUtils.ts
|
reassure test failing seems to not to be related to this PR 🤔 |
|
Head's up: there is bank holiday in Poland on Thursday and I have planned day off on Friday. So I'll be back on Monday 8.06. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppvideo_2026-06-07_22-46-34.mp4Android: mWeb Chromevideo_2026-06-07_22-46-29.mp4iOS: HybridAppScreen.Recording.2026-06-07.at.22.39.07.moviOS: mWeb SafariScreenRecording_06-07-2026.22-44-43_1.MP4MacOS: Chrome / SafariScreen.Recording.2026-06-07.at.22.47.27.mov |
|
I'm excited that we've almost completed this! It says you'll have to fix merge conflicts @sosek108. |
Yesterday there were no conflicts 😭. I've resolved them and waiting for CI checks to pass/fail |
|
Eslint and typecheck fails are from |
|
OOO notice 🌴: tommorow I start my planned vacation and I'm back on Monday. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1c05693e3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
🚧 @neil-marcellini has triggered a test Expensify/App build. You can view the workflow run 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. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.4.2-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 No help site changes required. I reviewed the changes in this PR. This is a purely internal code refactor — it completes the effort of replacing the old Why no docs are needed
Since there's no observable product behavior change, no draft docs PR was created. @sosek108, please confirm there's no user-facing behavior change here. If you believe a help site update is warranted, let me know what behavior changed and I'll draft the docs PR. |
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.4.4-1 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: no changes required. I reviewed the changes in this PR against the help site articles under This PR is a pure internal code refactor with no user-facing behavior change:
Report names render exactly as before — this is an implementation swap, not a change to any feature, label, button, or workflow that the help site documents. There is nothing customer-facing to update, so no draft help site PR was created. @sosek108, since there are no user-facing changes here, there's no linked help site PR to review. If you believe a documented behavior did change, let me know and I'll create the draft PR. |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.4-3 🚀
|
Explanation of Change
This is final PR to effort of replacing old
getReportNamewith the new one which uses onyx derived values.getSearchReportNameReportUtils.getReportNameReportNameUtils.getReportNamein Spend pageFixed Issues
$ #76852
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Test case from #78409:
Prerequisite: Have two accounts opened on two different devices or environments.
Prerequisite 2: User A has at least one workspace.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
Nagranie.z.ekranu.2026-06-2.o.09.44.35.mov
Android: mWeb Chrome
iOS: Native
Nagranie.z.ekranu.2026-06-2.o.09.41.51.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Nagranie.z.ekranu.2026-06-2.o.09.35.26.mov