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-07-21] [Refactor] Decompose IOURequestStepAmount and narrow its Onyx subscriptions #92411
IOURequestStepAmount (~586 lines) opens roughly 40 Onyx subscriptions on mount, including 6–7 full-collection subscriptions (e.g. PERSONAL_DETAILS_LIST, RECENTLY_USED_CURRENCIES, TRANSACTION_DRAFT, TRANSACTION_VIOLATIONS, BETAS). This is the first interactive screen in the manual create-expense flow, so its mount cost directly impacts the ManualOpenCreateExpense metric — which has recently regressed.
Around ~21 of those subscribed values are submit-only — they're read exclusively inside navigateToNextPage / saveAmountAndCurrency (i.e. when the user taps Next), not during render. Holding them as lifetime component subscriptions means every background mutation to those keys (across all workspaces/reports) can trigger re-renders of the amount screen while the user is just typing, even though the values aren't needed until submit.
Solution
Follow the same decomposition pattern applied to MoneyRequestConfirmationList / IOURequestStepConfirmation:
Move submit-only subscriptions out of the render path. Extract the ~21 values used only in navigateToNextPage / saveAmountAndCurrency into a dedicated submission hook (e.g. useAmountSubmission) that owns those subscriptions, so they no longer re-render the amount input on unrelated background activity.
Narrow full-collection subscriptions to per-key or selector-scoped slices where possible (e.g. TRANSACTION_VIOLATIONS, TRANSACTION_DRAFT).
Decompose the component into focused pieces (amount input view + submission logic), reducing the 586-line monolith and shrinking the mount-time subscription surface.
Goal
Reduce the mount-time subscription count and re-render frequency of IOURequestStepAmount to improve the ManualOpenCreateExpense metric and eliminate avoidable re-renders during amount entry.
changed the title [-]Decompose IOURequestStepAmount and narrow its Onyx subscriptions[/-][+][Refactor] Decompose IOURequestStepAmount and narrow its Onyx subscriptions[/+]on Jun 2, 2026
Oh thanks for suggesting this improvement and creating the issue. Last Friday I captured a video of this page due to how slow the number input is if you edit the amount immidiately after taking the scan. I would LOVE to see improvements here!
I edited out the part that showed my reciept upload, but this is the flow:
Update:
Prepared one big draft PR with all changes. I’m going to split it into smaller ones that are easier to review.
Performance measurements so far (web dev) look promising:
Duration Diff: −285.1 ms (~22%)
Commit Count Diff: −11
Just a heads up, I’ll be OOO tomorrow due to the bank holiday in Poland. I’ll continue preparing the PRs for this on Friday.
Activity
[-]Decompose IOURequestStepAmount and narrow its Onyx subscriptions[/-][+][Refactor] Decompose IOURequestStepAmount and narrow its Onyx subscriptions[/+]Julesssss commentedon Jun 2, 2026
Oh thanks for suggesting this improvement and creating the issue. Last Friday I captured a video of this page due to how slow the number input is if you edit the amount immidiately after taking the scan. I would LOVE to see improvements here!
I edited out the part that showed my reciept upload, but this is the flow:
SlowInput.mp4
OlimpiaZurek commentedon Jun 3, 2026
Update:
Prepared one big draft PR with all changes. I’m going to split it into smaller ones that are easier to review.
Performance measurements so far (web dev) look promising:
Just a heads up, I’ll be OOO tomorrow due to the bank holiday in Poland. I’ll continue preparing the PRs for this on Friday.
OlimpiaZurek commentedon Jun 5, 2026
Update:
85 remaining items
melvin-bot commentedon Jul 16, 2026
@Pujan92 Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Jul 20, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jul 20, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
Pujan92 commentedon Jul 22, 2026
@cristipaval can you plz help here with the payment amount
cristipaval commentedon Jul 23, 2026
it looks like we have 7 PRs:
So the total should be 2 * 125 + 4 * 250 = $1250
Do you agree, @Pujan92?
melvin-bot commentedon Jul 23, 2026
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
mallenexpensify commentedon Jul 23, 2026
Payment Summary
Contributor+: @Pujan92 due $1250 via NewDot
Think we're good to close, comment or reopen if you disagree.
twisterdotcom commentedon Aug 4, 2026
$1250 approved for @Pujan92 in Report ID: R00KnehTMFam.
[$1250].) I will double check this.Zapier Logs
Run ID: 00040eee-bd01-a78e-b060-720eba979e84SO: https://stackoverflowteams.com/c/expensify/questions/7582
twisterdotcom commentedon Aug 4, 2026
$1250 approved for @Pujan92 in Report ID: R00KnehTMFam.
Zapier Logs
Run ID: 00040eee-bbe3-acb8-97c3-528970c62b44SO: https://stackoverflowteams.com/c/expensify/questions/7582