fix: remove updateOptimisticReportNamesFromUpdates#77310
Conversation
|
@QichenZhu 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.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid-native.webmAndroid: mWeb Chromeandroid-web.webmiOS: HybridAppios-native.moviOS: mWeb Safariios-web.movMacOS: Chrome / SafariScreen.Recording.2025-12-15.at.8.16.02.PM.mov |
neil-marcellini
left a comment
There was a problem hiding this comment.
Great start, thank you. Let's remove even more of this, such as computeReportNameIfNeeded. As mentioned in the issue, remove "all code related to optimistically computing report names based on Onyx updates"
|
@QichenZhu I updated PR based on #77310 (review). Could you re-review it? |
neil-marcellini
left a comment
There was a problem hiding this comment.
One more thing to remove
| import {push as pushToSequentialQueue, waitForIdle as waitForSequentialQueueIdle} from '@libs/Network/SequentialQueue'; | ||
| import * as OptimisticReportNames from '@libs/OptimisticReportNames'; | ||
| import {getUpdateContext, initialize as initializeOptimisticReportNamesContext} from '@libs/OptimisticReportNamesConnectionManager'; | ||
| import {initialize as initializeOptimisticReportNamesContext} from '@libs/OptimisticReportNamesConnectionManager'; |
There was a problem hiding this comment.
We can also remove this right?
There was a problem hiding this comment.
Shoot now too much has been removed 😅.
The aim is to remove the optimistic computation middleware and the related code. However, we want to retain the ability to call a compute function. Moving forward the plan is to optimistically compute report names when reports are created. We would call Formula.compute and then set the result into the optimistic data. Please check out this related issue to familiarize yourself with the plan.
|
I made an update to address this comment. PR is ready for review again @QichenZhu |
neil-marcellini
left a comment
There was a problem hiding this comment.
Looking really close, one more thing.
| describe('Format options', () => { | ||
| test('nosymbol - should format without currency symbol', () => { | ||
| const result = compute('{report:total:nosymbol}', currencyContext); | ||
| expect(result).toBe('100.00'); | ||
|
|
||
| // Should not require backend computation | ||
| const parts = parse('{report:total:nosymbol}'); | ||
| expect(requiresBackendComputation(parts, currencyContext)).toBe(false); | ||
| }); |
There was a problem hiding this comment.
I think we should still have the format tests but remove the call to requiresBackendComputation
There was a problem hiding this comment.
I’ve restored the format-related tests.
|
Good to go thanks! This feature has always been under a limited beta so I'm confident removing it will have no impact on UX, so I won't wait for @heyjennahay's review. |
|
✋ 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/neil-marcellini in version: 9.2.90-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.90-2 🚀
|
Explanation of Change
Fixed Issues
$ #76848
PROPOSAL: #76848 (comment)
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 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
Screen.Recording.2025-12-11.at.10.57.44.mov