Repository navigation
Report Actions Derived Value - #81280
Conversation
63fca3e to
a89ecc5
Compare
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b3dbff6ff
ℹ️ 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".
|
Product review not needed |
chuckdries
left a comment
There was a problem hiding this comment.
Looking pretty good overall, just a couple questions!
|
In testing please pay more attention to cases 81102, 80310, 80302 |
|
Please fix conflict |
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ 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". |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
Bug: LHN preview shows wrong last message. Repro step:
Expected: tracking $x.xx for test
Expected: You: moved this expense from ... This branch: Screen.Recording.2026-02-06.at.9.58.06.am.movStaging: Screen.Recording.2026-02-06.at.9.59.46.am.mov |
|
I'm on sick leave today, I take care of it on Monday |
|
Thanks for catch the bug @mkhutornyi but I wonder about the expected results, after 9 step it should be Screen.Recording.2026-02-09.at.08.47.42.mov |
|
@BartekObudzinski we should just match product behavior. This PR should not change any logic existing in production. |
Screen.Recording.2026-02-09.at.11.27.54.mov |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a615f72fe3
ℹ️ 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".
chuckdries
left a comment
There was a problem hiding this comment.
Tests well, just hoping for clarification on a comment above
|
|
This reverts commit e22d6a6. wq :wq
I don't know why it occur I have just merge main and solve conflicts it does not attach any area of it |
chuckdries
left a comment
There was a problem hiding this comment.
Thanks for seeing this one through everyone!
|
🚧 @chuckdries has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/chuckdries in version: 9.3.27-0 🚀
|
|
Deploy Blocker #83735 was identified to be related to this PR. |
Move the generic catch-all handler in getOptionData's if-else chain to after all specific system message handlers. PR #81280 added a new fallback in getLastMessageTextForReport that populates lastMessageTextFromReport for all action types, causing the catch-all to match before specific handlers could run. This resulted in raw server text being shown instead of properly translated messages. Fixes #83735 Co-authored-by: Chuck Dries <chuckdries@users.noreply.github.com>
Add 6 regression tests that verify specific system message handlers (ADD_EMPLOYEE, DELETE_INTEGRATION, UPDATE_ROOM_DESCRIPTION, ADD_APPROVER_RULE, RETRACTED, REOPENED) take priority over the generic catch-all handler in getOptionData. These tests would have caught the regression from PR #81280 where the generic handler was placed before specific handlers. Co-authored-by: Mykhailo <mkhutornyi@users.noreply.github.com>
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.27-8 🚀
|
Explanation of Change
Performance Optimization: Report Action Visibility
Introduces VISIBLE_REPORT_ACTIONS Onyx Derived Value to pre-compute which report actions should be displayed
Eliminates redundant shouldReportActionBeVisible() calculations across ~13 call sites (ReportActionsView, MoneyRequestReportActionsList, LHN, etc.)
Uses sourceValues for incremental updates - full recomputation only on OpenApp/ReconnectApp
Moves static checks (action type, whisper targeting, deleted state) to derived value; runtime checks (offline state, write permissions) remain in components
Performance gains: ~200ms faster app startup, ~1.2s faster expense creation, with only ~31ms initial compute for ~2500 actions
Fixed Issues
$ #79500
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
2. Go to workspace chat
3. Create an expense
4. Open expense report
5. Click Submit
6. Open test tool (CMD+D)
7. Enable "Simulate failing network requests"
8. Click More > Retract
2. Go to workspace chat
3. Click + > Create report
4. Click Add expense > Create expense > Manual
5. Create an expense
2. Go offline
3. Click on "Create expense"
4. Tap on "Manual"
5. Add amount and tap "Next"
6. Select "Manager McTest"
7. Create and open expense
2. Go to self DM
3. Create an expense
4. Open it and return to self DM
5. Go offline
6. Open the expense
7. Click More > Delete
2. Submit an expense
3. Open report
4. Click More > Change workspace
5. Select workspace
6. Click More > Delete
7. Go to workspace chat where moved
2. Go to workspace chat
3. Create expense with "google.com" as description
4. Open report field > Remove from report
5. Check self DM preview on LHN
2. Go to workspace chat
3. Create an expense
4. Open expense
5. Click More > Split > Save
6. Quickly open any split
2. Mention user not in chat
3. Select "Invite to submit expenses"
4. Tap "Got It" on whisper message
2. Create expense (merchant: random, no category)
3. Open report
4. Wait for Concierge message
5. Select any category
2. Go to self DM
3. Create an expense
4. Open the expense
2. Open any workspace chat
3. Create a new empty report
4. Right click on the created report and delete it
2. Go to workspace chat
3. Create an expense
4. Open expense report
5. Click Submit
6. Open test tool (CMD+D)
7. Enable "Simulate failing network requests"
8. Click More > Retract
2. Go to workspace chat
3. Create a manual expense
4. Open expense report
5. Click on the expense and open its transaction thread
6. Right click on the expense and delete it
7. Observe the transaction thread
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
80281.mov
80292.mov
80293.mov
80300.mov
80302.mov
80305.mov
80307.mov
80310.mov
80312.mov
81102.mov
81106.mov
80308.mov