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-12-25] [$250] iOS/Android WS features -Feature is not enabled after enabling it and upgrading workspace to Control #53360

Closed
4 of 8 tasks
IuliiaHerets opened this issue Dec 1, 2024 · 46 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 External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Dec 1, 2024

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.0.69-1
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Launch hybrid or ND app.
  2. Create a Collect workspace.
  3. Go to More features.
  4. Enable Rules.
  5. Tap Upgrade.
  6. Tap Got it, thanks.

Expected Result:

Rules feature will be enabled after enabling it and upgrading workspace to Control plan (production behavior).

Actual Result:

Rules feature is not enabled after enabling it and upgrading workspace to Control plan. User has to enable it again.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6681091_1733044347819.ScreenRecording_12-01-2024_17-08-41_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021863284829899625527
  • Upwork Job ID: 1863284829899625527
  • Last Price Increase: 2024-12-01
  • Automatic offers:
    • CyberAndrii | Contributor | 105222820
Issue OwnerCurrent Issue Owner: @muttmuure
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Dec 1, 2024
Copy link

melvin-bot bot commented Dec 1, 2024

Triggered auto assignment to @muttmuure (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
Contributor

github-actions bot commented Dec 1, 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.

Copy link

melvin-bot bot commented Dec 1, 2024

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

@github-actions github-actions bot added the Hourly KSv2 label Dec 1, 2024
@melvin-bot melvin-bot bot added Daily KSv2 and removed Hourly KSv2 labels Dec 1, 2024
Copy link

melvin-bot bot commented Dec 1, 2024

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

@mountiny mountiny added External Added to denote the issue can be worked on by a contributor and removed DeployBlockerCash This issue or pull request should block deployment labels Dec 1, 2024
Copy link

melvin-bot bot commented Dec 1, 2024

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

@melvin-bot melvin-bot bot changed the title iOS/Android WS features -Feature is not enabled after enabling it and upgrading workspace to Control [$250] iOS/Android WS features -Feature is not enabled after enabling it and upgrading workspace to Control Dec 1, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 1, 2024
Copy link

melvin-bot bot commented Dec 1, 2024

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

@mountiny
Copy link
Contributor

mountiny commented Dec 1, 2024

Demoting as it does not block the user from moving ahead

@mountiny mountiny moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 1, 2024
@shubham1206agra
Copy link
Contributor

Proposal

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

iOS/Android WS features -Feature is not enabled after enabling it and upgrading workspace to Control.

What is the root cause of that problem?

After #49937, the navigation blur listener placed here

const unsubscribeListener = navigation.addListener('blur', () => {

Does not work. Due to this,

const confirmUpgrade = useCallback(() => {
never gets triggered, and therefore, feature does not get enabled.

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

Change

useEffect(() => {
const unsubscribeListener = navigation.addListener('blur', () => {
if (!isUpgraded || !canPerformUpgrade) {
return;
}
confirmUpgrade();
});
return unsubscribeListener;
}, [isUpgraded, canPerformUpgrade, confirmUpgrade, navigation]);

to

useEffect(() => {
    if (!isUpgraded || !canPerformUpgrade || policy?.isPendingUpgrade) {
        return;
    }
    confirmUpgrade();
}, [isUpgraded, canPerformUpgrade, confirmUpgrade, policy?.isPendingUpgrade]);

to remove reliance on navigation listener

What alternative solutions did you explore? (Optional)

@Ollyws
Copy link
Contributor

Ollyws commented Dec 2, 2024

@shubham1206agra's proposal LGTM.
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 2, 2024

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

@CyberAndrii
Copy link
Contributor

CyberAndrii commented Dec 2, 2024

Edited by proposal-police: This proposal was edited at 2024-12-02 13:03:05 UTC.

Proposal

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

iOS/Android WS features - Feature is not enabled after enabling it and upgrading workspace to Control

What is the root cause of that problem?

After PR #49937, navigator's blur events stopped working on native platforms.

useEffect(() => {
const unsubscribeListener = navigation.addListener('blur', () => {
if (!isUpgraded || !canPerformUpgrade) {
return;
}
confirmUpgrade();
});
return unsubscribeListener;
}, [isUpgraded, canPerformUpgrade, confirmUpgrade, navigation]);

The same thing happens on other pages, eg. the educational tooltip is not getting hidden

useEffect(() => {
const unsubscribe = navigation.addListener('blur', () => {
setShouldHideEducationalTooltip(true);
});
return unsubscribe;
}, [navigation]);

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

We can use useFocusEffect and put the logic from the event handler into its cleanup function

useFocusEffect(
        useCallback(() => {
            return () => {
                if (!isUpgraded || !canPerformUpgrade) {
                    return;
                }
                confirmUpgrade();
            };
        }, [isUpgraded, canPerformUpgrade, navigation])
    );

useFocusEffect will call the cleanup function either on the blur event or from its internal useEffect cleanup func (whatever will be first).

@CyberAndrii
Copy link
Contributor

useEffect(() => {
    if (!isUpgraded || !canPerformUpgrade || policy?.isPendingUpgrade) {
        return;
    }
    confirmUpgrade();
}, [isUpgraded, canPerformUpgrade, confirmUpgrade, policy?.isPendingUpgrade]);

@shubham1206agra with your solution the confirmUpgrade func

  1. will be called on component mount, and not unmount
  2. will be called on every render which will cause many requests to be sent to the BE

@shubham1206agra
Copy link
Contributor

useEffect(() => {
    if (!isUpgraded || !canPerformUpgrade || policy?.isPendingUpgrade) {
        return;
    }
    confirmUpgrade();
}, [isUpgraded, canPerformUpgrade, confirmUpgrade, policy?.isPendingUpgrade]);

@shubham1206agra with your solution the confirmUpgrade func

1. will be called on component mount, and not unmount

Not really problematic.

2. will be called on every render which will cause many requests to be sent to the BE

Nope, since these properties will not change many times

@CyberAndrii
Copy link
Contributor

Nope, since these properties will not change many times

Try running on web and watch the network tab

image

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 18, 2024
@melvin-bot melvin-bot bot changed the title [$250] iOS/Android WS features -Feature is not enabled after enabling it and upgrading workspace to Control [HOLD for payment 2024-12-25] [$250] iOS/Android WS features -Feature is not enabled after enabling it and upgrading workspace to Control Dec 18, 2024
Copy link

melvin-bot bot commented Dec 18, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 18, 2024
Copy link

melvin-bot bot commented Dec 18, 2024

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

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

Copy link

melvin-bot bot commented Dec 18, 2024

@Ollyws @muttmuure @Ollyws The PR fixing this issue has been merged! 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]

@garrettmknight garrettmknight moved this from Bugs and Follow Up Issues to Hold for Payment in [#whatsnext] #expense Dec 23, 2024
@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Dec 25, 2024
Copy link

melvin-bot bot commented Dec 30, 2024

@Ollyws, @kirillzyusko, @mountiny, @CyberAndrii, @muttmuure Eep! 4 days overdue now. Issues have feelings too...

Copy link

melvin-bot bot commented Jan 1, 2025

@Ollyws, @kirillzyusko, @mountiny, @CyberAndrii, @muttmuure Still overdue 6 days?! Let's take care of this!

Copy link

melvin-bot bot commented Jan 3, 2025

@Ollyws, @kirillzyusko, @mountiny, @CyberAndrii, @muttmuure 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

@Ollyws
Copy link
Contributor

Ollyws commented Jan 5, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other: Migration

Where bug was reported:

  • 2a. Reported on production
  • 2b. Reported on staging (deploy blocker)
  • 2c. Reported on both staging and production
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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: Migrate E/App to use PlatformStackNavigation #49937 (comment)

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal Template
  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

Test:

1. Create a Collect workspace
2. Go to More features
3. Enable Rules
4. Tap Upgrade
5. Tap Got it, thanks
6. Verify that the Rules feature is enabled

Do we agree 👍 or 👎

Copy link

melvin-bot bot commented Jan 7, 2025

@Ollyws, @kirillzyusko, @mountiny, @CyberAndrii, @muttmuure 12 days overdue. Walking. Toward. The. Light...

@mountiny
Copy link
Contributor

mountiny commented Jan 7, 2025

I am not sure if we need a specific test for this one

@muttmuure
Copy link
Contributor

@Ollyws $250 C+
@kirillzyusko does not require payment
@CyberAndrii $250 Contributor

@melvin-bot melvin-bot bot removed the Overdue label Jan 7, 2025
@muttmuure
Copy link
Contributor

Andrii is paid, waiting for Olly to submit request

@Ollyws
Copy link
Contributor

Ollyws commented Jan 7, 2025

Requested on ND.

@garrettmknight
Copy link
Contributor

$250 approved for @Ollyws

@melvin-bot melvin-bot bot added the Overdue label Jan 10, 2025
Copy link

melvin-bot bot commented Jan 13, 2025

@Ollyws, @kirillzyusko, @mountiny, @CyberAndrii, @muttmuure Huh... This is 4 days overdue. Who can take care of this?

@mountiny
Copy link
Contributor

I believe we can close now, thanks!

@github-project-automation github-project-automation bot moved this from Hold for Payment to Done in [#whatsnext] #expense Jan 13, 2025
@melvin-bot melvin-bot bot removed the Overdue label Jan 13, 2025
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 External Added to denote the issue can be worked on by a contributor
Projects
Status: Done
Development

No branches or pull requests

10 participants