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-09-12] [$250] Workspace - Workspace profile page becomes grayed out when go offline #47260

Closed
1 of 6 tasks
lanitochka17 opened this issue Aug 12, 2024 · 37 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 12, 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.19-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): gocemate+a919@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Login with gmail account
  2. Create workspace
  3. Go offline
  4. Go to workspace profile page

Expected Result:

Workspace profile page should not be grayed out since the workspace was created in online mode

Actual Result:

Workspace profile page becomes grayed out when user goes offline

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

Add any screenshot/video evidence

Bug6570133_1723480443136.Recording__3695.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0182138e49511ea4ac
  • Upwork Job ID: 1823362392640621309
  • Last Price Increase: 2024-08-27
  • Automatic offers:
    • shubham1206agra | Reviewer | 103705107
    • Krishna2323 | Contributor | 103705109
Issue OwnerCurrent Issue Owner: @shubham1206agra
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 12, 2024
Copy link

melvin-bot bot commented Aug 12, 2024

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

@lanitochka17
Copy link
Author

@puneetlath 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

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsb

@Krishna2323
Copy link
Contributor

Proposal

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

Workspace - Workspace profile page becomes grayed out when go offline

What is the root cause of that problem?

Pending fields are not cleared in success data.

pendingFields: {
autoReporting: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
approvalMode: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
reimbursementChoice: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
},

pendingFields: {
autoReporting: null,
approvalMode: null,
reimbursementChoice: null,
},

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

Clear pending fields in success data for generalSettings & description also.

What alternative solutions did you explore? (Optional)

@Nodebrute
Copy link
Contributor

Proposal

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

Workspace profile page becomes grayed out when go offline

What is the root cause of that problem?

We add these pendingFields in optimistic data

generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,

But we do not remove them in Success data
generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,

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

Actually, there's no need to include these lines because we're not waiting for a backend response for them. The backend response here doesn’t return a description or general settings, so we can safely remove these two lines.

generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,

What alternative solutions did you explore? (Optional)

@puneetlath puneetlath added the External Added to denote the issue can be worked on by a contributor label Aug 13, 2024
@melvin-bot melvin-bot bot changed the title Workspace - Workspace profile page becomes grayed out when go offline [$250] Workspace - Workspace profile page becomes grayed out when go offline Aug 13, 2024
Copy link

melvin-bot bot commented Aug 13, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0182138e49511ea4ac

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 13, 2024
Copy link

melvin-bot bot commented Aug 13, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra (External)

@dominictb
Copy link
Contributor

dominictb commented Aug 14, 2024

Edited by proposal-police: This proposal was edited at 2024-08-14 11:16:16 UTC.

Proposal

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

Workspace profile page becomes grayed out when user goes offline

What is the root cause of that problem?

In this PR, we plan to just add generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION, but description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, is also added.

And these pendingFields are not cleared in successData and failureData:

pendingFields: {
autoReporting: null,
approvalMode: null,
reimbursementChoice: null,
},
leads to the bug.

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

  • We can add:
                    generalSettings: null,
                    description: null,

in:

pendingFields: {

and

        {
            onyxMethod: Onyx.METHOD.MERGE,
            key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
            value: {
                pendingAction: null,
                pendingFields: {
                    autoReporting: null,
                    approvalMode: null,
                    reimbursementChoice: null,
                    generalSettings: null,
                    description: null,
                },
            },
        },

in:

const failureData: OnyxUpdate[] = [

address: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD

and then also clear these in successData and failureData.

What alternative solutions did you explore? (Optional)

  • We can remove all the pendingFields:
    pendingFields: {
    autoReporting: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    approvalMode: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    reimbursementChoice: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    },

then update:

<OfflineWithFeedback pendingAction={policy?.pendingFields?.generalSettings}>

                            <OfflineWithFeedback pendingAction={policy?.pendingFields?.generalSettings ?? policy?.pendingAction}>

Similar logic should applied to:

pendingAction={policy?.pendingFields?.description}

pendingAction={policy?.pendingFields?.generalSettings}

<OfflineWithFeedback pendingAction={policy?.pendingFields?.generalSettings}>

@dominictb
Copy link
Contributor

Proposal updated

@Krishna2323
Copy link
Contributor

@shubham1206agra, just to note, the changes in this PR should be handled there only, or we can hold off until that PR is merged. It has nothing to do with this issue. The general solution will be the same, to add missing pending fields. The pending fields were intentionally added in this PR, so I think we shouldn't remove them.

Copy link

melvin-bot bot commented Aug 16, 2024

@puneetlath, @shubham1206agra Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Aug 16, 2024
Copy link

melvin-bot bot commented Aug 20, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Aug 20, 2024

@puneetlath, @shubham1206agra 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@puneetlath
Copy link
Contributor

@shubham1206agra thoughts on the proposals?

Copy link

melvin-bot bot commented Aug 22, 2024

@puneetlath, @shubham1206agra Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

@shubham1206agra
Copy link
Contributor

@Krishna2323's proposal looks good.

🎀👀🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Aug 23, 2024
Copy link

melvin-bot bot commented Aug 23, 2024

Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@dominictb
Copy link
Contributor

@shubham1206agra Can you check my proposal? It will work in the latest code changes in main branch.

@shubham1206agra
Copy link
Contributor

I think @Krishna2323 proposal and #47260 (comment) is fine with me.

@dominictb
Copy link
Contributor

With the changes in the selected proposal, the policy name is not grey out when creating policy in offline. Because now, we use policy?.pendingFields?.name as the pending action for the policy name:

<OfflineWithFeedback pendingAction={policy?.pendingFields?.name}>

@dominictb
Copy link
Contributor

Btw, as mentioned in @Krishna2323 's comment:

The general solution will be the same, to add missing pending fields

So I think he can handle the details when creating PR. So that solution looks good.

Copy link

melvin-bot bot commented Aug 26, 2024

@puneetlath @shubham1206agra this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Aug 26, 2024
Copy link

melvin-bot bot commented Aug 26, 2024

@puneetlath, @shubham1206agra Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@shubham1206agra
Copy link
Contributor

Waiting on assignment from @puneetlath

Copy link

melvin-bot bot commented Aug 27, 2024

⚠️ 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.

@Nodebrute
Copy link
Contributor

Nodebrute commented Aug 27, 2024

@shubham1206agra just a quick update: we no longer use generalsettings. The only thing left in the pending fields is description. I've mentioned in my proposal that we should remove it.

description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,

In the backend response, we don’t check for description. According to the Offline_UX, we’re using the Optimistic Without Feedback Pattern, which means we shouldn’t change the UI in offline mode since we're not waiting for server confirmation.

cc:@puneetlath

@shubham1206agra
Copy link
Contributor

@Nodebrute Thank you for the input. But your reasoning is wrong. We are using pattern B here. We should keep the description greyed out while creating the workspace. So, we will proceed with @Krishna2323's proposal as usual. And I will ask the deploy blocker to be marked as closed.

@Nodebrute
Copy link
Contributor

@shubham1206agra Thanks for clearing that up 🙂

@shubham1206agra
Copy link
Contributor

@puneetlath I think you wrote in the wrong issue

Copy link

melvin-bot bot commented Aug 27, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 27, 2024
Copy link

melvin-bot bot commented Aug 27, 2024

📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Aug 27, 2024

📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@shubham1206agra
Copy link
Contributor

@trjExpensify Can you add label for payment on 12th September?

@puneetlath puneetlath changed the title [$250] Workspace - Workspace profile page becomes grayed out when go offline [HOLD for payment 2024-09-12] [$250] Workspace - Workspace profile page becomes grayed out when go offline Sep 9, 2024
@trjExpensify trjExpensify added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Sep 10, 2024
@trjExpensify
Copy link
Contributor

@puneetlath has actioned on that, I've added the Awaiting payment label as well now.

@puneetlath
Copy link
Contributor

I've paid @Krishna2323.

@shubham1206agra can you please complete the checklist?

@shubham1206agra
Copy link
Contributor

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:

@puneetlath
Copy link
Contributor

Ok great. All paid. Thanks everyone!

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests

7 participants