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] Optimize ManualOpenCreateExpense with policy selector and reduced subscriptions #84789
The Create Expense flow (ManualOpenCreateExpense span) has unnecessary Onyx re-renders from heavy subscriptions. The full policy collection, unneeded NVP fields, and redundant state syncing cause extra render cycles on mount and tab switches, adding ~20ms of overhead.
Solution
Reduce re-renders by trimming subscriptions, implemented in #84286:
Add a policy collection selector (iouRequestPolicyCollectionSelector) that filters to only the ~15 fields needed by IOURequestStartPage consumers
Derive selectedTab directly instead of using useState + syncing useEffect
Add an NVP selector for SCAN_TEST_TOOLTIP instead of subscribing to the full NVP_DISMISSED_PRODUCT_TRAINING
Remove duplicate Tab.setSelectedTab call (already handled by OnyxTabNavigator)
Note: The PR also removed the reportDrafts collection subscription from IOURequestStepConfirmation, relying on the module-level allReportsDraft variable instead. This needs to be reverted since it relies on an impure function pattern we're actively removing.
changed the title [-]Optimize ManualOpenCreateExpense with policy selector and reduced subscriptions[/-][+][Due for payment 2026-03-19] Optimize ManualOpenCreateExpense with policy selector and reduced subscriptions[/+]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:
Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.
Activity
marcaaron commentedon Mar 10, 2026
@BartekObudzinski Can you please address @mountiny's comment here? Thanks!!
melvin-bot commentedon Mar 11, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
[-]Optimize ManualOpenCreateExpense with policy selector and reduced subscriptions[/-][+][Due for payment 2026-03-19] Optimize ManualOpenCreateExpense with policy selector and reduced subscriptions[/+]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:
melvin-bot commentedon Mar 12, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Mar 19, 2026
Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.
melvin-bot commentedon Mar 24, 2026
@BartekObudzinski Eep! 4 days overdue now. Issues have feelings too...
marcaaron commentedon Mar 25, 2026
Not sure anything needs to be done here going to close.