Repository navigation
Remove Onyx.connect() key ONYXKEYS.COLLECTION.REPORT_ACTIONS in src/libs/OptionsListUtils.ts - part 7 - #104326
Conversation
|
@DylanDylann 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] |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce120e4267
ℹ️ 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".
…ndefined explicitly
…etUserToInviteOption
…tSearchOptions call
…no-default-id-values
dylanexpensify
left a comment
There was a problem hiding this comment.
Product input not needed
|
Waiting for part 6 |
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.
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
@truph01 The steps check LHN rows, but the LHN doesn't go through this change. SidebarUtils calls getReportAlternateText directly. resolveLastActionContext is only called from OptionsListUtils.getAlternateText, which builds the Search and option-list previews. Could we test the preview line where it's actually built, using a one-transaction expense report whose newest activity is a comment in its transaction thread?
|
| const result = getAlternateText(option, {showChatPreviewLine: true}, buildConfig({transactionThreadIDs: {}})); | ||
|
|
||
| // Then the thread comment is not used, because the thread ID is no longer read from a module-level cache | ||
| expect(result).not.toContain('thread comment'); |
There was a problem hiding this comment.
expect(result).not.toContain('thread comment') passes for almost any wrong output: an empty string, the wrong actor prefix, or a fallback like "No activity yet". Could we assert the exact string we expect?
The Then comment ("because the thread ID is no longer read from a module-level cache") is also only half true for this call. getAlternateText passes the same oneTransactionThreadReportID to getReportAlternateText, which still does oneTransactionThreadReportID ?? deprecatedCachedOneTransactionThreadReportIDs[report.reportID]. In this fixture the cache holds '9301', because the reports are set before the actions are merged. So lastAction is parent-only while the message logic still treats the report as one-transaction. That mix is expected until the next part removes the second fallback, but the test should pin the exact output and say which path no longer reads the cache:
// Then the last action comes from the parent report only, because resolveLastActionContext no longer falls back to the module-level cache
expect(result).toBe('<exact expected text>');
There was a problem hiding this comment.
Thanks! Now asserting the exact output, and the Then comment names resolveLastActionContext as the path that no longer reads the cache. The remaining fallback goes in the next part.
@DylanDylann I replaced the Tests section with your Search router, server-results and share-destination steps. |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-11-12.at.16.17.14.mov |
…op duplicate getAlternateText test
|
@DylanDylann All good now! |
|
🚧 grgia 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/grgia in version: 9.5.40-0 🚀
|
|
No help site update needed — this PR refactors how existing search and selection previews retrieve transaction-thread data, without adding a user-facing workflow or making any existing article inaccurate. |
Explanation of Change
Part of removing the
Onyx.connectWithoutView()forONYXKEYS.COLLECTION.REPORT_ACTIONS(moved fromOptionsListUtilsintoReportAlternateTextUtils). This PR removes thedeprecatedCachedOneTransactionThreadReportIDsusage from the following flows by threadingtransactionThreadIDsfromuseSortedReportActionsData()(RAM_ONLY_SORTED_REPORT_ACTIONS) down toresolveLastActionContext:Fixed Issues
$ #66381
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include ""[No QA].""
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline testssectionQA stepssectionDesignlabel and/or tagged@Expensify/designso the design team can review the changes.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-10-19.at.11.10.50.mov
Screen.Recording.2026-11-10.at.17.00.39.mov