Skip to content

Reports - Held expense only shows up as a separate report after a browser refresh #62042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
5 of 8 tasks
nlemma opened this issue May 14, 2025 · 15 comments
Closed
5 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@nlemma
Copy link

nlemma commented May 14, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.1.45-17
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail: #57887
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Windows 10 / Chrome, macOS Sequoia 15.3, Apple iPhone 12 Pro / Safari
App Component: Money Requests

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Log in with a new Gmail account
  3. Create a workspace
  4. Create two manual expenses with any amount, merchant and category in the workspace chat
  5. Click on the "Submit" button
  6. Click on the expense preview
  7. Hold one of the expenses
  8. Navigate to Reports - Expense Reports
  9. Click on the report
  10. Click on the "Approve" button
  11. Approve the pending amount (light green button)
  12. Dismiss the RHP by clicking away

Expected Result:

Held expense should appear as a separate report after approving the pending amount.

Actual Result:

Held expense only shows up as a separate report after a browser refresh. On native apps, you need to navigate away, and to the Expense Reports again.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6831312_1747245700219.bandicam_2025-05-14_19-50-48-199.mp4

View all open jobs on GitHub

@nlemma nlemma added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 14, 2025
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels May 14, 2025
Copy link
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.

Copy link

melvin-bot bot commented May 14, 2025

Triggered auto assignment to @lschurr (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.

Copy link

melvin-bot bot commented May 14, 2025

Triggered auto assignment to @chiragsalian (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@melvin-bot melvin-bot bot added the Daily KSv2 label May 14, 2025
Copy link

melvin-bot bot commented May 14, 2025

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

@nlemma
Copy link
Author

nlemma commented May 14, 2025

@lschurr FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@parasharrajat
Copy link
Member

This should not be a deploy blocker. We didn't make any changes in #57887. That PR was created a way back and behaviour might have changed thus there might be another root cause behind it. If needed we can try to fix this behaviour as part of original issue #57605.

@chiragsalian
Copy link
Contributor

I agree this issue wasn't caused by #57887.
I'm unsure why you said its not a blocker when according to the report its occurred on staging but not on production.
But then i see #57605 which looks like a dupe of this and it says the issue does occur on production. So yeah i think this issue should be tackled as part of #57605.
To me its also not blocker worthy since its occuring on production.

@francoisl francoisl removed the DeployBlockerCash This issue or pull request should block deployment label May 14, 2025
@LorenzoBloedow
Copy link
Contributor

LorenzoBloedow commented May 15, 2025

This seems to have been caused by #61499. So I think it should be a blocker.

More specifically, the isNavigating logic:

const isNavigating = !navigation.isFocused();
const previousTransactionsIDs = Object.keys(previousTransactions ?? {});
const transactionsIDs = Object.keys(transactions ?? {});
const reportActionsIDs = Object.values(reportActions ?? {})
.map((actions) => Object.keys(actions ?? {}))
.flat();
const previousReportActionsIDs = Object.values(previousReportActions ?? {})
.map((actions) => Object.keys(actions ?? {}))
.flat();
if (searchTriggeredRef.current || isNavigating) {
return;
}

It seems it wasn't caught because the same PR removed/modified the test I created to catch this sort of bug.

@chiragsalian Please let me know if I should open a PR to remove just that new logic and introduce the test again or if the PR will just be reverted.

Somewhat off-topic idea I had (should I raise this in Slack?):
I think we'd benefit from creating a sort of warning in CI where we have to double check when a PR modifies/removes code from a test file.

While it wouldn't fully solve the problem because sometimes tests do have to adapt, it would at least add an additional layer of protection against this sort of issue happening again.

@chiragsalian
Copy link
Contributor

So I think it should be a blocker.

I'm fine with readding the label but i need a good reason to add it. Just cause a PR thats on staging caused the bug is not a reason to add a blocker. A good reason would be the issue occurs only on staging but not on production and its of a reasonable severity for the user. But as we see from this issue, the problem exists on both staging and production, so its not really blocker worthy if the issue occurs on production.

But with that said, maybe this issue does occur only production. Let's see. Discussing on slack for speediness.

@LorenzoBloedow
Copy link
Contributor

the problem exists on both staging and production

@chiragsalian I don't think it's still present in production

Screen.Recording.2025-05-15.at.2.01.28.PM.mov

During that PR, the issue got fixed and merged into prod, then, after some time, it got reintroduced by the PR that is currently on staging. So (currently) no issue on prod, but it's still happening on staging.

I might be missing something, since I'm still learning about deploy blockers, so I apologize in advance.

@chiragsalian
Copy link
Contributor

Ah thanks for that. I thought your PR was just on staging and hence this issue wasn't resolved on production.

Cool, i agree this is a blocker, reopening. Can you prepare a revert for #61499.

since I'm still learning about deploy blockers, so I apologize in advance.

All cool, let me know if you have any questions 🙂 thank you for your help so far.

@chiragsalian chiragsalian reopened this May 15, 2025
@chiragsalian chiragsalian added the DeployBlockerCash This issue or pull request should block deployment label May 15, 2025
Copy link

melvin-bot bot commented May 15, 2025

Triggered auto assignment to @AndrewGable (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented May 15, 2025

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

@github-actions github-actions bot added Hourly KSv2 and removed Daily KSv2 labels May 15, 2025
Copy link
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.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels May 15, 2025
@francoisl francoisl removed the DeployBlockerCash This issue or pull request should block deployment label May 15, 2025
@chiragsalian
Copy link
Contributor

Closing this out since there is nothing actionable here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants