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
[$250] [Due for payment 2026-02-26] Remove Onyx.connect() for the key: ONYXKEYS.COLLECTION.POLICY_TAGS in src/libs/TransactionUtils/index.ts #72719
changed the title [-]Remove Onyx.connect() for the key: ONYXKEYS.COLLECTION.POLICY_TAGS in src/libs/TransactionUtils/index.ts[/-][+]Remove Onyx.connect() for the key: `ONYXKEYS.COLLECTION.POLICY_TAGS` in src/libs/TransactionUtils/index.ts[/+]on Oct 15, 2025
OK, @JmillsExpensify will help with payment on this one. @dukenv0307 Can you please gather a list of the PRs that were involved with this issue, or was it just the one #81931 ?
Summary: PR #81931 successfully removed the Onyx.connect() subscription for ONYXKEYS.COLLECTION.POLICY_TAGS from src/libs/TransactionUtils/index.ts and replaced it with parameter injection via useOnyx at the component level. The PR was merged and deployed to production (v9.3.22-4). However, one issue requirement was not completed: the ESLint max-warnings count in package.json was not decreased.
Current State: The core refactoring is complete. Zero Onyx.connect references remain in TransactionUtils/index.ts. The only remaining Onyx.* references (lines 2365 and 2371) are Onyx.METHOD.SET constants used in optimistic/failure OnyxData — these are expected and correct.
Outstanding Gap: The ESLint max-warnings count in package.json remains at 383 and was not decreased as required by step 5 of the issue.
tests/unit/TransactionUtilsTest.ts (+257, -29 lines): 8 new test cases covering single-level tags, multi-level tags, disabled tags, empty tags, and edge cases. All 22 existing compareDuplicateTransactionFields tests updated for the new function signature.
tests/unit/TransactionPreviewUtils.test.ts (+108 lines): 4 new test cases for getReviewNavigationRoute() covering tag review navigation with various policyTags scenarios.
Issue Requirement Compliance
Requirement
Status
1. Create unit tests before refactoring
✅ Tests added
2. Refactor the methods
✅ Onyx.connect removed, parameter injection used
3. Ensure unit tests pass after refactoring
✅ Tests pass
4. Reinforce with functional/QA test
✅ PR was QA tested
5. Decrease ESLint max-warnings count
❌ Not done (still at 383)
Potential Concern
A review comment on the PR flagged a potential race condition: since callers pass policyTags ?? {}, if the useOnyx subscription hasn't resolved yet when the user interacts, compareDuplicateTransactionFields could run with empty tags, potentially skipping the tag review step for duplicates that differ by tag. This was categorized as P2.
Next Steps for Contributor+ team: The ESLint max-warnings count in package.json was not decreased per step 5 of the issue requirements. This should be verified and addressed before closing. Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.
changed the title [-][Due for payment 2026-02-26] Remove Onyx.connect() for the key: `ONYXKEYS.COLLECTION.POLICY_TAGS` in src/libs/TransactionUtils/index.ts[/-][+][$250] [Due for payment 2026-02-26] Remove Onyx.connect() for the key: `ONYXKEYS.COLLECTION.POLICY_TAGS` in src/libs/TransactionUtils/index.ts[/+]on Feb 27, 2026
Activity
src/libs/TransactionUtils/index.tsto removeOnyx.connect()references #66462[-]Remove Onyx.connect() for the key: ONYXKEYS.COLLECTION.POLICY_TAGS in src/libs/TransactionUtils/index.ts[/-][+]Remove Onyx.connect() for the key: `ONYXKEYS.COLLECTION.POLICY_TAGS` in src/libs/TransactionUtils/index.ts[/+]tgolen commentedon Oct 24, 2025
This will be worked on eventually
tgolen commentedon Nov 3, 2025
This will be worked on eventually
tgolen commentedon Nov 13, 2025
This will be worked on eventually
35 remaining items
melvin-bot commentedon Feb 27, 2026
Triggered auto assignment to @JmillsExpensify (
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 Feb 27, 2026
OK, @JmillsExpensify will help with payment on this one. @dukenv0307 Can you please gather a list of the PRs that were involved with this issue, or was it just the one #81931 ?
MelvinBot commentedon Feb 27, 2026
🔍 Issue Analysis
Summary: PR #81931 successfully removed the
Onyx.connect()subscription forONYXKEYS.COLLECTION.POLICY_TAGSfromsrc/libs/TransactionUtils/index.tsand replaced it with parameter injection viauseOnyxat the component level. The PR was merged and deployed to production (v9.3.22-4). However, one issue requirement was not completed: the ESLintmax-warningscount inpackage.jsonwas not decreased.Current State: The core refactoring is complete. Zero
Onyx.connectreferences remain inTransactionUtils/index.ts. The only remainingOnyx.*references (lines 2365 and 2371) areOnyx.METHOD.SETconstants used in optimistic/failure OnyxData — these are expected and correct.Outstanding Gap: The ESLint
max-warningscount inpackage.jsonremains at383and was not decreased as required by step 5 of the issue.Detailed Investigation
What Changed (PR #81931)
Removed from
TransactionUtils/index.ts:let allPolicyTags: OnyxCollection<PolicyTagLists> = {}variableOnyx.connect({ key: ONYXKEYS.COLLECTION.POLICY_TAGS, waitForCollectionCallback: true, ... })subscriptiongetPolicyTagsData(policyID)helper function (which was already marked@deprecated)eslint-disable-next-line @typescript-eslint/no-deprecatedsuppression comment in the tag comparison branchAdded/Modified:
compareDuplicateTransactionFields()gained a new first parameterpolicyTags: PolicyTagLists(line 2400)policyTagsviauseOnyx()scoped to the specific policyID and pass it as the first argumentgetReviewNavigationRoute()inTransactionPreviewUtils.tsupdated to accept and forwardpolicyTagsAffected callers:
MoneyRequestHeader.tsxTransactionPreview/index.tsxConfirmation.tsxReviewBillable.tsx,ReviewCategory.tsx,ReviewDescription.tsxReviewMerchant.tsx,ReviewReimbursable.tsx,ReviewTag.tsx,ReviewTaxCode.tsxTests Added
tests/unit/TransactionUtilsTest.ts(+257, -29 lines): 8 new test cases covering single-level tags, multi-level tags, disabled tags, empty tags, and edge cases. All 22 existingcompareDuplicateTransactionFieldstests updated for the new function signature.tests/unit/TransactionPreviewUtils.test.ts(+108 lines): 4 new test cases forgetReviewNavigationRoute()covering tag review navigation with various policyTags scenarios.Issue Requirement Compliance
max-warningscountPotential Concern
A review comment on the PR flagged a potential race condition: since callers pass
policyTags ?? {}, if theuseOnyxsubscription hasn't resolved yet when the user interacts,compareDuplicateTransactionFieldscould run with empty tags, potentially skipping the tag review step for duplicates that differ by tag. This was categorized as P2.Next Steps for Contributor+ team: The ESLint
max-warningscount inpackage.jsonwas not decreased per step 5 of the issue requirements. This should be verified and addressed before closing. Reply with@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.melvin-bot commentedon Feb 27, 2026
Current assignees @shubham1206agra and @dukenv0307 are eligible for the External assigner, not assigning anyone new.
[-][Due for payment 2026-02-26] Remove Onyx.connect() for the key: `ONYXKEYS.COLLECTION.POLICY_TAGS` in src/libs/TransactionUtils/index.ts[/-][+][$250] [Due for payment 2026-02-26] Remove Onyx.connect() for the key: `ONYXKEYS.COLLECTION.POLICY_TAGS` in src/libs/TransactionUtils/index.ts[/+]melvin-bot commentedon Feb 27, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022027408918706960557
dukenv0307 commentedon Feb 27, 2026
We have only 1 PR: #81931
JmillsExpensify commentedon Feb 28, 2026
Payment summary:
quinthar commentedon Mar 5, 2026
Approved $250 to @dukenv0307
garrettmknight commentedon Apr 2, 2026
$250 approved for @shubham1206agra