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

[Due for payment 2025-02-18] Android & iOS - Book travel - Book travel button only works when tapping for the second time #55829

Closed
4 of 8 tasks
mitarachim opened this issue Jan 28, 2025 · 28 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

@mitarachim
Copy link

mitarachim commented Jan 28, 2025

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.90-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): applausetester+100106kh@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: iPhone 15 Pro Max / iOS 18.2
App Component: Other

Action Performed:

  1. Launch hybrid or ND app.
  2. Open FAB.
  3. Tap Book Travel.
  4. Tap Book travel one time.
  5. Tap Book travel again.

Expected Result:

Tapping Book travel one time will open the address page.

Actual Result:

Tapping Book travel one time does nothing.

It only opens the address page after tapping Book travel for the second time.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6725773_1738039887315.ScreenRecording_01-28-2025_12-48-10_1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @trjExpensify
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlockerCash This issue or pull request should block deployment labels Jan 28, 2025
Copy link

melvin-bot bot commented Jan 28, 2025

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.

Copy link

melvin-bot bot commented Jan 28, 2025

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

Copy link

melvin-bot bot commented Jan 28, 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 Jan 28, 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.

@techievivek
Copy link
Contributor

I think we can can remove the blocker label since the feature is behind beta?

@techievivek
Copy link
Contributor

Seems to be coming from here #55300, cc @cristipaval

@techievivek
Copy link
Contributor

Also, we have no plans of reverting that PR and the feature is still behind beta with users mainly on oldDot. https://expensify.slack.com/archives/C05S5EV2JTX/p1738013139945179?thread_ts=1737494593.720669&cid=C05S5EV2JTX

@techievivek
Copy link
Contributor

Assigned it to you since you will be looking into the improvements/cleanups.

@layacat
Copy link
Contributor

layacat commented Jan 28, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-01-28 10:32:27 UTC.

Proposal

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

Book travel button only works when tapping for the second time

What is the root cause of that problem?

Unlike web, the first time we clicked the button the below subscription was started running:

let activePolicyID: OnyxEntry<string>;
Onyx.connect({
key: ONYXKEYS.NVP_ACTIVE_POLICY_ID,
callback: (val) => {
activePolicyID = val;
},
});

activePolicyID will be undefined at the time we click the Book travel button and because we early returned if activePolicyID is undefined. Which caused the issue.

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

Let's use the activePolicyID directly from here:

const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID);

and pass it as a param to bookATrip function.
We can also add a loading state to BookTravel button while activePolicyID is loading by using useOnyx

const [activePolicyID, activePolicyIDResult] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID); 

While activePolicyIDResult.status is loading, we should show a loading indicator on BookTravel button.

We should also do the same approach for primaryLogin and isSingleNewDotEntry, we should pass it as a param and get their values from useOnyx instead.

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

N/A

What alternative solutions did you explore? (Optional)

N/A

Copy link
Contributor

⚠️ @layacat Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

@layacat
Copy link
Contributor

layacat commented Jan 28, 2025

Updated proposal to correct the format

@cristipaval
Copy link
Contributor

I'll open a fix PR

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

Demoting, not to block the deployment with this, since it is for Travel which is behind a beta.

Working on a fix, which seems to have significant changes. I'll fix this as part of this refactoring issue. ETA: the PR should be ready at the end of today.

@cristipaval cristipaval removed the Reviewing Has a PR in review label Jan 28, 2025
@cristipaval
Copy link
Contributor

cristipaval commented Jan 28, 2025

Update: The work on the PR that fixes this issue is done, but I asked for an early review from @tgolen. If I get his approval on the refactoring approach, then I will spend time on testing and recordings.

@cristipaval cristipaval added the Reviewing Has a PR in review label Jan 29, 2025
@cristipaval
Copy link
Contributor

Update: The PR is approved, and the C+ is testing on all platforms so we hope it gets merged soon 🤞

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Feb 11, 2025
@melvin-bot melvin-bot bot changed the title Android & iOS - Book travel - Book travel button only works when tapping for the second time [Due for payment 2025-02-18] Android & iOS - Book travel - Book travel button only works when tapping for the second time Feb 11, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 11, 2025
Copy link

melvin-bot bot commented Feb 11, 2025

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

Copy link

melvin-bot bot commented Feb 11, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.95-6 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 2025-02-18. 🎊

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

Copy link

melvin-bot bot commented Feb 11, 2025

@ZhenjaHorbach @trjExpensify @ZhenjaHorbach 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]

Copy link

melvin-bot bot commented Feb 11, 2025

@tgolen @trjExpensify @cristipaval @ZhenjaHorbach this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@trjExpensify
Copy link
Contributor

This has been deployed Melv, we're waiting out the regression period. Chill man. 😅

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 17, 2025
Copy link

melvin-bot bot commented Feb 18, 2025

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

@trjExpensify
Copy link
Contributor

👋 @ZhenjaHorbach checklist time, please!

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Feb 18, 2025

Working on a fix, which seems to have significant changes. I'll fix this as part of this refactoring issue. ETA: the PR should be ready at the end of today.

Actually I'm not sure a checklist is needed here
Since it was part of the refactoring of the new functionality

@trjExpensify
Copy link
Contributor

We should still fill out the checklist and state it as a bug with the initial implementation.

@ZhenjaHorbach
Copy link
Contributor

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:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 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.

    This issue was handled as a part of new feature

  • [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: NA

  • [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.

Test:

  1. Launch hybrid or ND app
  2. Open FAB
  3. Tap Book Travel
  4. Verify that tapping Book travel one time will open a next screen

Do we agree 👍 or 👎

@trjExpensify
Copy link
Contributor

Thanks! Payment summary as follows:

Offer sent!

@ZhenjaHorbach
Copy link
Contributor

Thanks! Payment summary as follows:

Offer sent!

Done
Thanks !

@trjExpensify
Copy link
Contributor

Paid, closing!

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

7 participants