Skip to content

[Due for payment 2026-08-21] Spend - Canadian multiple tax export is not hidden immediately after unreporting expense #98543

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.53-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #98305
Email or phone of affected tester (no customers): sdsiodjnosdjiodsj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a CAD workspace.
  3. Create an expense in workspace chat.
  4. Go to Spend > Expenses.
  5. Select the expense via checkbox.
  6. Click More > Move to report > Remove from report.
  7. Select the expense via checkbox.
  8. Click More > Export.
    → Canadian multiple tax export is shown.
  9. Go to another tab, then go back to Spend > Expenses.
  10. Repeat Step 7 and 8.
    → Canadian multiple tax export is not shown.

Expected Result:

In Step 8, after removing expense from report, Canadian multiple tax export should be hidden.

Actual Result:

In Step 8, after removing expense from report, Canadian multiple tax export is shown.
In Step 10, after reopening Spend, Canadian multiple tax export is hidden.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7232365_1786601960729.11.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7232365

Issue OwnerCurrent Issue Owner: @QichenZhu

Activity

  1. applause-bot commented on Aug 13, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/373048b6d52859fbc964d40619f4c1e4f17d023d0a063e8c6f571730357df889

  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 13, 2026
  3. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #98305

  4. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    @mountiny @QichenZhu you have been assigned to this deploy blocker because you reviewed the offending PR: #98305

  5. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    @BartekObudzinski you have been assigned to this deploy blocker because you authored the offending PR: #98305

  6. github-actions commented on Aug 13, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  7. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  8. MelvinBot commented on Aug 13, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #98305 - "fix: stop Search re-firing an identical query on unrelated Onyx updates" by @BartekObudzinski (High confidence)
    Related Issues: #98048 (the performance issue PR #98305 was fixing)

    Recommendation: ROLL FORWARD

    Reverting #98305 would reintroduce a real cost/perf regression (it eliminated ~26% of redundant Search calls). The regression here is narrow (a stale bulk-action export menu that self-corrects on navigation) and the fix is small and localized: the removeFromReport flow (and its sibling report-change flows) in Search must explicitly refresh the search snapshot after the action, exactly as other flows already do.

    Assigned: @BartekObudzinski (PR author), @mountiny and @QichenZhu (approving reviewers) — already auto-assigned to this issue.
    Labels: No changes. This is a Frontend bug, so DeployBlockerCash stays. There is no DeployBlocker label present, and nothing to remove.

    📋 Detailed Analysis

    Evidence

    Verification

    Root Cause

    "Remove from report" changes each transaction's reportID/report membership but does not add or delete a transaction, so the Onyx transaction-ID set is unchanged. It produces report actions.

    Before #98305, useSearchHighlightAndScroll.ts triggered a refetch on (!isChat && hasTransactionsIDsChange) || hasReportActionsIDsChange, so the report actions from unreporting would re-fire the expense search and refresh the snapshot in place. After #98305, the condition is (isChat ? hasReportActionsIDsChange : hasTransactionsIDsChange) (L105) — a non-chat expense search now ignores report-action changes entirely. Because the transaction-ID set didn't change either, nothing triggers a refetch.

    So after unreporting, the bulk-action menu keeps computing from the stale snapshot (transactions still appear to belong to the CAD workspace policy → doAllSelectedItemsBelongToCADPolicies stays true → "Canadian Multiple Tax Export" still shown). Navigating away and back runs a fresh search whose snapshot has the transactions unreported (policy cleared), so the option is correctly hidden — exactly the reported behavior.

    Suggested fix

    Add an explicit refreshSearchAfterReportAction call in SearchTransactionsChangeReport.tsx after changeTransactionsReport in removeFromReport (and, for consistency, in selectReport/createReport), mirroring the already-existing usages in useLifecycleActions.tsx and useSelectionModePayment.ts. This restores the in-place refresh for report-membership changes without reviving the redundant Search traffic #98305 removed.

  9. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  10. BartekObudzinski commented on Aug 13, 2026

    @BartekObudzinski
    Contributor

    PR #98305 was reverted in #98548, so this should no longer reproduce on staging.

  11. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  12. melvin-bot commented on Aug 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  13. IuliiaHerets commented on Aug 13, 2026

    @IuliiaHerets

    Not repro on Windows 10/Chrome/Build v9.4.53-3

    945cc116a25130c38551ea1787215ab4.mp4
  14. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Aug 13, 2026
  15. changed the title [-]Spend - Canadian multiple tax export is not hidden immediately after unreporting expense[/-] [+][Due for payment 2026-08-21] Spend - Canadian multiple tax export is not hidden immediately after unreporting expense[/+] on Aug 14, 2026
  16. melvin-bot commented on Aug 14, 2026

    @melvin-bot

    @QichenZhu

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.53-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 2026-08-21. 🎊

    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]. If no checklist is needed for this issue, you can click: [no checklist button]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions