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 2025-07-10] [$250] MED Refactor ShowContextMenuContext to pass isReportArchived instead of rNVPs #64933
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
ShowContextMenuContext includes reportNameValuePairs for the purpose of some components detecting if a report is archived or not. We have been refactoring code to reduce the rNVPs from being passed around in so many different contexts. It is hard to keep track of.
Solution
Refactor ShowContextMenuContext so that instead of passing reportNameValuePairs, pass a boolean for isReportArchived instead.
Please be sure to update all places the context is used, as well as writing unit tests to ensure the context is including the isReportArchived boolean properly.
@DylanDylann If you comment on this, I'll assign it to you so you can be the C+ on this one since you and I have been working with these and have the most context.
We should update all places that are using ShowContextMenuContext to pass the isReportArchived to the context value instead of reportNameValuePairs. We can get isReportArchived with useReportIsArchived hook
For each place that's using ShowContextMenuContext.Consumer check the use of reportNameValuePairs and replace this with isReportArchived.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please be sure to update all places the context is used, as well as writing unit tests to ensure the context is including the isReportArchived boolean properly.
@tgolen what is the test we need here? After we update ShowContextMenuContext type that will ensure that the context value will include isReportArchived boolean.
changed the title [-]Refactor `ShowContextMenuContext` to pass `isReportArchived` instead of rNVPs[/-][+]MED Refactor `ShowContextMenuContext` to pass `isReportArchived` instead of rNVPs[/+]on Jun 25, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.74-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@DylanDylann@sakluger The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Jun 25, 2025
Triggered auto assignment to @sakluger (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.tgolen commentedon Jun 25, 2025
@DylanDylann If you comment on this, I'll assign it to you so you can be the C+ on this one since you and I have been working with these and have the most context.
thelullabyy commentedon Jun 25, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Refactor ShowContextMenuContext to pass isReportArchived instead of rNVPs
What is the root cause of that problem?
Improvement
What changes do you think we should make in order to solve the problem?
Update the
ShowContextMenuContexttype to replacereportNameValuePairswithisReportArchivedboolean.App/src/components/ShowContextMenuContext.ts
Line 15 in 7ca08dc
We should update all places that are using
ShowContextMenuContextto pass theisReportArchivedto the context value instead ofreportNameValuePairs. We can getisReportArchivedwithuseReportIsArchivedhookFor each place that's using
ShowContextMenuContext.Consumercheck the use ofreportNameValuePairsand replace this withisReportArchived.App/src/components/AnchorForAttachmentsOnly/BaseAnchorForAttachmentsOnly.tsx
Line 54 in 7ca08dc
Most of these places are passing
reportNameValuePairstoisArchivedNonExpenseReport, we can refactor this function withisReportArchivedparamApp/src/libs/ReportUtils.ts
Lines 2050 to 2052 in 7ca08dc
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
DylanDylann commentedon Jun 25, 2025
@tgolen I would love to take over this issue as C+
thelullabyy commentedon Jun 25, 2025
@tgolen what is the test we need here? After we update
ShowContextMenuContexttype that will ensure that the context value will includeisReportArchivedboolean.[-]Refactor `ShowContextMenuContext` to pass `isReportArchived` instead of rNVPs[/-][+]MED Refactor `ShowContextMenuContext` to pass `isReportArchived` instead of rNVPs[/+]DylanDylann commentedon Jun 25, 2025
@tgolen Should we externalize this issue to the contributor?
tgolen commentedon Jun 25, 2025
Yeah, but that's what @sakluger will do as the BZ person I believe.
22 remaining items
melvin-bot commentedon Jul 3, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.74-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 2025-07-10. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 3, 2025
@DylanDylann @sakluger The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
sakluger commentedon Jul 10, 2025
Hey @DylanDylann, could you please complete the BZ checklist here?
sakluger commentedon Jul 10, 2025
Summarizing payment on this issue:
Contributor: @thelullabyy $250, paid via Upwork
Contributor+: @DylanDylann $250, please request on Newdot
DylanDylann commentedon Jul 13, 2025
This is a refactor, I think we don't need to checklist here
melvin-bot commentedon Jul 14, 2025
@sakluger Whoops! This issue is 2 days overdue. Let's get this updated quick!
sakluger commentedon Jul 15, 2025
Got it, thanks! I removed the hold, please feel free to request payment.
JmillsExpensify commentedon Oct 14, 2025
$250 approved for @DylanDylann
quinthar commentedon Oct 16, 2025
Approved $250 to @DylanDylann