Skip to content
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

[HOLD for payment 2024-10-14] [HOLD for payment 2024-10-11] Categories - Settings RHP shows spinner briefly when it is opened #50212

Closed
2 of 6 tasks
IuliiaHerets opened this issue Oct 4, 2024 · 24 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 4, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.44-3
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: applausetester+pso@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Categories.
  3. Click Settings.

Expected Result:

Settings RHP will open smoothly without loading (production behavior).

Actual Result:

Settings RHP shows spinner briefly when it is opened.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6623627_1727985127710.20241004_035010.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @trjExpensify
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

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

Copy link

melvin-bot bot commented Oct 4, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Oct 4, 2024
@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-control

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Oct 4, 2024
Copy link
Contributor

github-actions bot commented Oct 4, 2024

👋 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.

@bernhardoj
Copy link
Contributor

bernhardoj commented Oct 4, 2024

Edited by proposal-police: This proposal was edited at 2024-10-04 09:05:04 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

The categories settings always shows loading indicator when opening it.

What is the root cause of that problem?

The page is wrapped with a withPolicyConnections HOC. The loading will show if the data needs to be fetched.

const isConnectionDataFetchNeeded =
!isOffline && !!props.policy && (!!props.policy.areConnectionsEnabled || !isEmptyObject(props.policy.connections)) && !hasConnectionsDataBeenFetched;

In our case, hasConnectionsDataBeenFetched is always undefined initially. That's because we set the initWithStoredValues as false here.

const [hasConnectionsDataBeenFetched] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_HAS_CONNECTIONS_DATA_BEEN_FETCHED}${props.policy?.id ?? '-1'}`, {
initWithStoredValues: false,
});

This happens after we fix a useOnyx issue where initWithStoredValues doesn't work as intended here. Even though this happens after the Onyx update, the root cause of the issue already exists before.

What changes do you think we should make in order to solve the problem?

Remove the initWithStoredValues setting so we get the saved value.

Also, prevent the fetching if the onyx data is still loading.

const [hasConnectionsDataBeenFetched, hasConnectionsDataBeenFetchedResult] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_HAS_CONNECTIONS_DATA_BEEN_FETCHED}${props.policy?.id ?? '-1'}`);
const isOnyxDataLoading = isLoadingOnyxValue(hasConnectionsDataBeenFetchedResult);
const isConnectionDataFetchNeeded =
    !isOnyxDataLoading && !isOffline && !!props.policy && (!!props.policy.areConnectionsEnabled || !isEmptyObject(props.policy.connections)) && !hasConnectionsDataBeenFetched;

or we can just show the loading if the onyx data is still loading.

@iwiznia
Copy link
Contributor

iwiznia commented Oct 4, 2024

Proposal looks good.

@bernhardoj
Copy link
Contributor

PR is ready

@isagoico
Copy link

isagoico commented Oct 4, 2024

Unable to reproduce on latest build v9.0.44-10. RHP opens and displays content right away 🎉

@trjExpensify
Copy link
Contributor

Great! Adding @fedirjh for the review.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 4, 2024
@melvin-bot melvin-bot bot changed the title Categories - Settings RHP shows spinner briefly when it is opened [HOLD for payment 2024-10-11] Categories - Settings RHP shows spinner briefly when it is opened Oct 4, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Oct 4, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.44-12 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 2024-10-11. 🎊

For reference, here are some details about the assignees on this issue:

  • @fedirjh requires payment through NewDot Manual Requests
  • @bernhardoj requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Oct 4, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
  • [@fedirjh] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@fedirjh] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@fedirjh] Determine if we should create a regression test for this bug.
  • [@fedirjh] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@thienlnam thienlnam removed the DeployBlockerCash This issue or pull request should block deployment label Oct 7, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 7, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-10-11] Categories - Settings RHP shows spinner briefly when it is opened [HOLD for payment 2024-10-14] [HOLD for payment 2024-10-11] Categories - Settings RHP shows spinner briefly when it is opened Oct 7, 2024
Copy link

melvin-bot bot commented Oct 7, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.45-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 2024-10-14. 🎊

For reference, here are some details about the assignees on this issue:

  • @fedirjh requires payment through NewDot Manual Requests
  • @bernhardoj requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Oct 7, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
  • [@fedirjh] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@fedirjh] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@fedirjh] Determine if we should create a regression test for this bug.
  • [@fedirjh] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Oct 11, 2024
Copy link

melvin-bot bot commented Oct 14, 2024

Payment Summary

Upwork Job

BugZero Checklist (@trjExpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

Copy link

melvin-bot bot commented Oct 14, 2024

@iwiznia, @trjExpensify, @fedirjh, @bernhardoj Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@bernhardoj
Copy link
Contributor

Requested in ND.

@fedirjh
Copy link
Contributor

fedirjh commented Oct 15, 2024

BugZero Checklist:

  • Link to the PR: Bump Onyx to v2.0.71 #49857
  • Link to discussion: N/A Nothing to add to checklist
  • Determine if we should create a regression test for this bug:

Regression Test Proposal

1. Open App 
2. Go to workspace settings -> Categories
3. Click Settings
4. Verify Settings RHP will open smoothly without loading indicator
  • Do we agree 👍 or 👎

@trjExpensify
Copy link
Contributor

Confirming payment summary as follows:

Both to be paid via ND!

@melvin-bot melvin-bot bot removed the Overdue label Oct 15, 2024
@bernhardoj
Copy link
Contributor

Requested in ND.

@trjExpensify
Copy link
Contributor

As for the regression test, we have this one in TestRail. Instead of a brand new test, I think we can just add the 4th point from above to that test.

@trjExpensify
Copy link
Contributor

^^ created an issue for that, closing!

@JmillsExpensify
Copy link

$250 approved for @bernhardoj

@garrettmknight
Copy link
Contributor

$250 approved for @fedirjh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests

9 participants