You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-03-19] [Onyx Audit] Remove allowStaleData from useOnyx #80094
In order to simplify useOnyx API (and consequently Onyx) let's work on proposing the removal of some configurations we think are anti-patterns / unnecessary at this point.
The allowStaleData configuration controls whether the data will be retrieved from cache during the first render even if there is a pending merge for the key.
This, however, looks more like an anti-pattern and prone to bugs (we should always rely on updated data) and there are only 8 usages in the entire E/App codebase. I think we can remove this property and treat these cases on E/App with more suited solutions.
Let's investigate how we can achieve E/App needs without this prop and create a proposal/plan to remove it.
URL:#26772 Issues addressed: None (performance optimization) Comments: None specific to allowStaleData What was added:report and policies in ReportScreen withOnyx configuration Test cases: None documented
URL:#37596 Issue:#35906 Issues addressed: Fix blank screen when opening chat Comments: None specific to allowStaleData What was added:reportOnyx in ReportScreen when migrating to useOnyx hook Test cases: Not documented in PR
URL:#40661 Issues addressed: None (adding ReportNameValuePairs key) Comments: None specific to allowStaleData What was added:reportNameValuePairsOnyx in ReportScreen Test cases: No specific test cases documented
URL:#52805 Issues addressed: Don't use report for isArchived check Comments: None specific to allowStaleData What was added: Related to reportNameValuePairsOnyx in ReportScreen Test cases:
Create a workspace
Delete the workspace
Ensure the workspace chat is moved to the bottom of the LHN
Ensure workspace chat has "(archived)" appended to the report title
Ensure workspace chat has an archived banner instead of the composer
URL:#57607 Issues addressed: None (new feature scaffolding) Comments: None specific to allowStaleData What was added: Created SearchMoneyRequestReportPage with report and policies having allowStaleData: true from the start
Test cases:
Navigate to /search
Navigate to /search/filters
Manually navigate to /search/report/<valid_report_id>
URL:#63555 Issue:#63545 Issues addressed: Stop showing skeletons on comments section of newly created report Comment:#63555 (comment) > "why do you think it is safe to add allowStaleData is true?" What was added:reportMetadata in both ReportScreen AND SearchMoneyRequestReportPage Test cases:
Test going into report after relogging and clearing onyx data (should show loading state)
Test going into report for the second time (shouldn't show reportActions loading state)
Test creating report and going into it (shouldn't show reportActions loading state)
Test if empty state doesn't blink in all above cases
Repeat all above scenarios in report entered from Reports > Expense Reports
URL:#65625 Issue:#65528 Issues addressed: Fix empty report state showing when transactions haven't been loaded yet Comments: None specific to allowStaleData What was added:chatReportMetadata in MoneyRequestReportPreviewContent Test cases:
Clear cache and restart
Enter a chat that has expenses
Make sure that on report previews that have transactions the empty state isn't blinking
changed the title [-][Due for payment 2026-03-13] [Onyx Audit] Remove allowStaleData from useOnyx[/-][+][Due for payment 2026-03-19] [Due for payment 2026-03-13] [Onyx Audit] Remove allowStaleData from useOnyx[/+]on Mar 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.36-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
changed the title [-][Due for payment 2026-03-19] [Due for payment 2026-03-13] [Onyx Audit] Remove allowStaleData from useOnyx[/-][+][Due for payment 2026-03-19] [Onyx Audit] Remove allowStaleData from useOnyx[/+]on Mar 16, 2026
Issue is ready for payment but no BZ is assigned. @mallenexpensify you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!
Activity
pasyukevich commentedon Jan 27, 2026
I would like to work on it
pasyukevich commentedon Jan 28, 2026
Update:
ReportScreenallowStaleDataflags from this screenpasyukevich commentedon Feb 4, 2026
Updates:
ReportScreenNew related pr -
Use initialValue in withOnyx and other optimizations for ReportScreen #26772
After removing all
allowStaleDataflags from theReportScreendo not see any issuesNext places to check -
MoneyRequestReportPreviewContent,SearchMoneyRequestReportPagepasyukevich commentedon Feb 5, 2026
Updates:
allowStaleDataflags:Next steps - validate on mobile platforms
pasyukevich commentedon Feb 9, 2026
Updates:
Validating on mobile - was not able to catch any issues today
Next steps
allowStaleDataremovalpasyukevich commentedon Feb 12, 2026
Updates:
Coming back to this issue
Preparing the test steps from PRs
pasyukevich commentedon Feb 17, 2026
Attaching test cases with relation to PRs-
PR #26772 (Sep 2023)
URL: #26772
Issues addressed: None (performance optimization)
Comments: None specific to allowStaleData
What was added:
reportandpoliciesin ReportScreen withOnyx configurationTest cases: None documented
PR #37596 (May 2024)
URL: #37596
Issue: #35906
Issues addressed: Fix blank screen when opening chat
Comments: None specific to allowStaleData
What was added:
reportOnyxin ReportScreen when migrating to useOnyx hookTest cases: Not documented in PR
PR #40661 (May 2024)
URL: #40661
Issues addressed: None (adding ReportNameValuePairs key)
Comments: None specific to allowStaleData
What was added:
reportNameValuePairsOnyxin ReportScreenTest cases: No specific test cases documented
PR #52805 (Dec 2024)
URL: #52805
Issues addressed: Don't use report for isArchived check
Comments: None specific to allowStaleData
What was added: Related to
reportNameValuePairsOnyxin ReportScreenTest cases:
PR #57607 (Feb 2025)
URL: #57607
Issues addressed: None (new feature scaffolding)
Comments: None specific to allowStaleData
What was added: Created SearchMoneyRequestReportPage with
reportandpolicieshavingallowStaleData: truefrom the startTest cases:
/search/search/filters/search/report/<valid_report_id>/searchPR #63555 (May 2025)
URL: #63555
Issue: #63545
Issues addressed: Stop showing skeletons on comments section of newly created report
Comment: #63555 (comment) > "why do you think it is safe to add allowStaleData is true?"
What was added:
reportMetadatain both ReportScreen AND SearchMoneyRequestReportPageTest cases:
PR #65625 (Jul 2025)
URL: #65625
Issue: #65528
Issues addressed: Fix empty report state showing when transactions haven't been loaded yet
Comments: None specific to allowStaleData
What was added:
chatReportMetadatain MoneyRequestReportPreviewContentTest cases:
37 remaining items
[-][Due for payment 2026-03-13] [Onyx Audit] Remove allowStaleData from useOnyx[/-][+][Due for payment 2026-03-19] [Due for payment 2026-03-13] [Onyx Audit] Remove allowStaleData from useOnyx[/+]melvin-bot commentedon Mar 12, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.36-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-03-19. 🎊
For reference, here are some details about the assignees on this issue:
[-][Due for payment 2026-03-19] [Due for payment 2026-03-13] [Onyx Audit] Remove allowStaleData from useOnyx[/-][+][Due for payment 2026-03-19] [Onyx Audit] Remove allowStaleData from useOnyx[/+]huult commentedon Mar 18, 2026
#82657 (comment) I’ve reviewed this PR. Please count me in the payment summary, thanks.
melvin-bot commentedon Mar 19, 2026
Issue is ready for payment but no BZ is assigned. @mallenexpensify you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!
melvin-bot commentedon Mar 19, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Mar 20, 2026
Payment Summary
Contributor+: @huult due $250 via NewDot
Contributor+: @mkhutornyi due $250 via NewDot
If there are more I'm missing, comment/reopen. Thx.
garrettmknight commentedon Mar 25, 2026
$250 approved for @huult
quinthar commentedon Mar 28, 2026
Approved $250 to @mkhutornyi