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

Company cards - App back button loops between card page and card selection page #57272

Closed
6 of 8 tasks
IuliiaHerets opened this issue Feb 22, 2025 · 6 comments · Fixed by #57320
Closed
6 of 8 tasks

Company cards - App back button loops between card page and card selection page #57272

IuliiaHerets opened this issue Feb 22, 2025 · 6 comments · Fixed by #57320
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

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.4-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: iPhone 15 Pro Max / iOS 18.3
App Component: Workspace Settings

Action Performed:

  1. Launch ND or hybrid app.
  2. Create a new workspace.
  3. Go to workspace settings > More features.
  4. Enable Company card.
  5. Go to workspace settings > Company card.
  6. Tap Add cards.
  7. Select American Express > Corporate Cards > Complete the rest of the flow.
  8. Tap Card feed dropdown.
  9. Tap app back button.
  10. Tap app back button again.
  11. Tap app back button.

Expected Result:

In Step 10, app back button on card feed will return to workspace settings.

Actual Result:

In Step 10, app back button on card feed returns to card selection page.
In Step 11, app back button on card selection page returns to card feed.

App back button loops between card page and card selection page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6750496_1740186261371.ScreenRecording_02-22-2025_09-03-21_1.mp4

View all open jobs on GitHub

@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment labels Feb 22, 2025
Copy link

melvin-bot bot commented Feb 22, 2025

Triggered auto assignment to @laurenreidexpensify (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 Feb 22, 2025

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Feb 22, 2025
Copy link

melvin-bot bot commented Feb 22, 2025

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 22, 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.

@huult
Copy link
Contributor

huult commented Feb 22, 2025

Proposal

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

App back button loops between card page and card selection page

What is the root cause of that problem?

When we go back from WorkspaceCompanyCardFeedSelectorPage, it still exists in the navigation stack. When navigating back to WorkspacePageWithSections, using Navigation.goBack with an undefined parameter redirects to the previous page, which is WorkspaceCompanyCardFeedSelectorPage

onBackButtonPress={() => (onBackButtonPress ? onBackButtonPress() : Navigation.goBack(backButtonRoute))}

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

To resolve this issue, we simply clean WorkspaceCompanyCardFeedSelectorPage by using Navigation.goBack();

const goBack = () => Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS.getRoute(policyID));

update to:

    const goBack = () => {
        Navigation.goBack();
        Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS.getRoute(policyID));
    };

or

    const goBack = () => {
        Navigation.goBack(ROUTES.WORKSPACE_COMPANY_CARDS.getRoute(policyID));
    };
Screen.Recording.2025-02-23.at.00.39.39.mp4

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@ZhenjaHorbach
Copy link
Contributor

Looks like an issue came from this PR

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
6 participants