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-08-29] Perf: select only the target admin policy ID in ProductMarketingWindowManager #99064
ProductMarketingWindowManager subscribed to the whole policy_ collection with a selector returning Policy[] — every active admin policy — so useOnyx deep-compared all of those policy objects on every policy-collection update, measured at 37ms per compare on a large account. The component never used the array as an array: it only ever reduced it to a single target policy via find(id === activePolicyID) ?? at(0). On an account with roughly 5k policies this cost about 90ms on Web when opening reports from Search.
Solution
Narrow the collection selector to return just the target policy's ID, and get the policy object itself from a separate single-member useOnyx subscription with no selector, so that one compares by reference instead of deep-comparing. variant and shouldPrefetchTargetPolicyConnections now branch on targetAdminPolicyID rather than the policy object, which as a side benefit closes a one-render window where the object could lag the ID and briefly flip the admin variant to the member variant. Target-policy selection logic is unchanged, as is everything handed to usePolicyConnectionsPrefetch and getCtaRoute; the loading gate swaps activeAdminPoliciesMetadata for targetAdminPolicyIDMetadata.
Notes
This PR is currently a draft. The change is small and contained — +13/−7 in the single file src/components/ProductMarketingWindow/ProductMarketingWindowManager.tsx.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.58-4 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-08-29. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]
changed the title [-]Perf: select only the target admin policy ID in ProductMarketingWindowManager[/-][+][Due for payment 2026-08-29] Perf: select only the target admin policy ID in ProductMarketingWindowManager[/+]on Aug 22, 2026
Activity
melvin-bot commentedon Aug 22, 2026
@mountiny @TMisiukiewicz
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.58-4 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-08-29. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]
[-]Perf: select only the target admin policy ID in ProductMarketingWindowManager[/-][+][Due for payment 2026-08-29] Perf: select only the target admin policy ID in ProductMarketingWindowManager[/+]melvin-bot commentedon Aug 25, 2026
@TMisiukiewicz Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Aug 27, 2026
@TMisiukiewicz Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Aug 30, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Aug 30, 2026
Payment Summary
Resolving PRs:
Perf: select only the target admin policy ID in ProductMarketingWindowManager #99063
Contributor: @TMisiukiewicz does not require payment (Contractor)
Reviewer: @abzokhattab owed $250 via NewDot
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Sep 1, 2026
Payment Summary
Contributor+: @abzokhattab due $250 via NewDot
quinthar commentedon Sep 25, 2026
Approved $250 to @abzokhattab