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-01-21] [$125] Refactor putOnHold to use useAncestorReportsAndReportActions hook #73566
changed the title [-]Refactor putOnHold to use useAncestorReportsAndReportActions hook[/-][+][$125] Refactor putOnHold to use useAncestorReportsAndReportActions hook[/+]on Oct 27, 2025
Just curious to know, is it important for action functions like putOnHold to be reactive?
which can lead to the UI not re-rendering when it should.
In my opinion, functions like putOnHold don't affect rendering, so it's fine to get the data from Onyx.connect (or Onyx.connectWithoutView).
I agree it's not pure though, but passing the data from useOnyx hook means the component that uses putOnHold will unnecessarily re-render when the useAncestorReportsAndReportActions hook data changes
@bernhardoj you are right and I agree that it technically meets the bar for using connectWithoutView here, but I think from a bigger picture, we really want to promote the code using the best patterns.
I think connectWithoutView is best used in src/lib files, and the src/action files should try to stick to pure functions as much as possible. This way, people don't see the Onyx.connect pattern in the action files and aren't as tempted to copy it to some other spot, or begin referencing the impure function without realizing it.
I think connectWithoutView is best used in src/lib files, and the src/action files should try to stick to pure functions as much as possible.
Oh, interesting. I actually think it's fine to use connectWithoutView in src/actions because most of the functions don't care about reactivity and only care about the latest Onyx value (putOnHold, addComment, requestMoney, etc.). src/libs on the other hand, contains a lot of util functions that affect view rendering.
aren't as tempted to copy it to some other spot, or begin referencing the impure function without realizing it.
Maybe we can have a lint to only allow connectWithoutView usage under src/actions folders?
I think we should stick to the original philosophy in the docs and only allow connectWithoutView in certain /libs functions. This will set the right pure function pattern we want to start following.
changed the title [-][$125] Refactor putOnHold to use useAncestorReportsAndReportActions hook[/-][+][Due for payment 2026-01-21] [$125] Refactor putOnHold to use useAncestorReportsAndReportActions hook[/+]on Jan 14, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.1-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: This is migration so there's no offending PR
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
[-]Refactor putOnHold to use useAncestorReportsAndReportActions hook[/-][+][$125] Refactor putOnHold to use useAncestorReportsAndReportActions hook[/+]melvin-bot commentedon Oct 27, 2025
FitseTLT commentedon Oct 27, 2025
I can help as C+ based on the comment here
bernhardoj commentedon Oct 28, 2025
Just curious to know, is it important for action functions like
putOnHoldto be reactive?In my opinion, functions like
putOnHolddon't affect rendering, so it's fine to get the data fromOnyx.connect(orOnyx.connectWithoutView).I agree it's not pure though, but passing the data from
useOnyxhook means the component that usesputOnHoldwill unnecessarily re-render when theuseAncestorReportsAndReportActionshook data changesluacmartins commentedon Oct 28, 2025
@bernhardoj you are right and I agree that it technically meets the bar for using connectWithoutView here, but I think from a bigger picture, we really want to promote the code using the best patterns.
I think
connectWithoutViewis best used in src/lib files, and the src/action files should try to stick to pure functions as much as possible. This way, people don't see theOnyx.connectpattern in the action files and aren't as tempted to copy it to some other spot, or begin referencing the impure function without realizing it.bernhardoj commentedon Oct 29, 2025
Oh, interesting. I actually think it's fine to use
connectWithoutViewinsrc/actionsbecause most of the functions don't care about reactivity and only care about the latest Onyx value (putOnHold, addComment, requestMoney, etc.).src/libson the other hand, contains a lot of util functions that affect view rendering.Maybe we can have a lint to only allow
connectWithoutViewusage undersrc/actionsfolders?luacmartins commentedon Oct 29, 2025
I think we should stick to the original philosophy in the docs and only allow
connectWithoutViewin certain/libsfunctions. This will set the right pure function pattern we want to start following.luacmartins commentedon Oct 30, 2025
@Tony-MK can you comment on this issue so I can assign it to you please?
Tony-MK commentedon Oct 30, 2025
@luacmartins, you can assign me.
melvin-bot commentedon Oct 30, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021983946450022250071
45 remaining items
[-][$125] Refactor putOnHold to use useAncestorReportsAndReportActions hook[/-][+][Due for payment 2026-01-21] [$125] Refactor putOnHold to use useAncestorReportsAndReportActions hook[/+]melvin-bot commentedon Jan 14, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 14, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.1-1 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-01-21. 🎊
For reference, here are some details about the assignees on this issue:
kadiealexander commentedon Jan 21, 2026
Payment Summary
@situchan please complete the checklist!
situchan commentedon Jan 21, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: This is migration so there's no offending PR
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/591257
Regression Test Proposal
Test:
10 Verify that the expense was held.
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-822a-a156-62b0-deba73abef74kadiealexander commentedon Jan 21, 2026
@samarroy84 bump on applying via upwork here please!
kadiealexander commentedon Jan 26, 2026
@samarroy84 please let me know here when you've accepted the offer I sent across.