-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add toggle to manually control the transaction thread report creation #68431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add toggle to manually control the transaction thread report creation #68431
Conversation
|
@hungvu193 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] |
|
cc @aldo-expensify @mountiny Let me know what you think about adding this toggle to simplify the expenses testing from the accounts that have all betas turned on by default. |
| function setShouldBlockTransactionThreadReportCreation(shouldBlockTransactionThreadReportCreation: boolean) { | ||
| Onyx.merge(ONYXKEYS.ACCOUNT, {shouldBlockTransactionThreadReportCreation}); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it not possible to change the value of the beta itself in Onyx instead of adding a new value in account? I think it would make this check less confusing:
const shouldGenerateTransactionThreadReport = !isBetaEnabled(CONST.BETAS.NO_OPTIMISTIC_TRANSACTION_THREADS) || !account?.shouldBlockTransactionThreadReportCreation;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible, but:
- if QA needs to
Clear cache and restartduring the test flow - the betas will be reset, while the account data is preserved - Right now, we show the toggle only if beta is on. If we want to modify the betas instead of the account flag, then we will need to always show the toggle to all of the users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh, I didn't know they would be reset, then I think what you have is better.
# Conflicts: # src/pages/iou/request/step/IOURequestStepAmount.tsx
|
Note: I'll be OOO tomorrow! |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-08-18.at.16.46.43.movAndroid: mWeb ChromeScreen.Recording.2025-08-18.at.16.48.15.moviOS: HybridAppiOS: mWeb SafariScreen.Recording.2025-08-18.at.16.36.50.movMacOS: Chrome / SafariBeta.enabled.-.toggled.movBeta.off.movMacOS: DesktopScreen.Recording.2025-08-18.at.16.34.49.mov |
|
cc @roryabraham |
iwiznia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remember to remove this once we are done
|
✋ 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/iwiznia in version: 9.1.96-0 🚀
|
|
@VickyStash For this step: bandicam.2025-08-18.13-53-06-727.mp4 |
@vincdargento All of the steps relate to The easiest way to check it even without debug mode:
example.mp4 |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.1.96-2 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.1.96-2 🚀
|
Explanation of Change
This PR is a follow-up to #68009.
It adds a troubleshoot toggle that QAs can manually enable to block the creation of transaction thread reports.
By default, transaction thread reports will now be created even if the
noOptimisticTransactionThreadsbeta is on. This change should simplify testing of the expenses functionality on accounts where all betas are enabled by default, while we continue working on the functionality refactoring.Fixed Issues
$ #67884
PROPOSAL: N/A
Tests
When
noOptimisticTransactionThreadsbeta is on:Open the troubleshoot section and see that a new toggle,
Block transaction thread report creationhas been added. By default, it should be off.In the troubleshoot section turn on the Debug Mode.
With
Block transaction thread report creationtoggle turned off:The expense creation and any expense-related functionality should work the same way as before:
transactionThreadReportID.With
Block transaction thread report creationtoggle turned on:RequestMoneyAPI call, thetransactionThreadReportIDshould be invalid (-1).childReportIDfield.❗ It's expected that the functionality related to the expense without the transaction thread won't work as expected/be limited. It will be implemented incrementally in separate issues. Please, TURN OFF
Block transaction thread report creationtoggle if you need to test the expenses-related functionality.When
noOptimisticTransactionThreadsbeta is off:There should be no
Block transaction thread report creationin the troubleshoot section.The expense creation and any expense-related functionality should work the same way as before:
transactionThreadReportID.Make sure there are no changes and it all works the same way as before.
Offline tests
Same, as in the Tests section
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same, as in the Tests section
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))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
With the beta turned off:
beta-off.mp4
With the beta turned on:
beta-is-on.mp4