Skip to content

[Payment due asap] [$250] Not here page when selecting waypoints second time onwards via Add expense CTA flow #75479

Closed

Description

@nlemma

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: v9.2.60-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: Exploratory
Email or phone of affected tester (no customers): kiatest.80+ck111425@gmail.com
Issue reported by: Applause Internal Team
Device used: Windows 11/Chrome, iPhone 16/iOS 18.3.1, Pixel 8a/Android 16
App Component: Money Requests

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Go to workspace chat
  3. Create 2 manual track expenses
  4. Go to report details page
  5. Click Add expense button present below the expenses
  6. Select Track distance >> Switch to Map tab >> Select start waypoint
  7. Tap back button to go back to report details page
  8. Again tap Add expense button >> Track distance >> select start waypoint

Expected Result:

User able to select start waypoint to create distance expense via Add expense button in report details page. Hmm.not here page should not be displayed when selecting waypoints from second time onwards via Add expense button

Actual Result:

If the report contains manual track expenses, user cannot select waypoints to create distance expense via Add expense button present within the report details page. Hmm..not here page opens from second time onwards whenever user try to select start or stop waypoints

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug7007505_1763482115370.18.11.2025_11.06.36_REC25.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021990955474131343129
  • Upwork Job ID: 1990955474131343129
  • Last Price Increase: 2025-11-19
Issue OwnerCurrent Issue Owner: @brianlee-expensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 18, 2025
  2. melvin-bot commented on Nov 18, 2025

    @melvin-bot

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

  3. daledah commented on Nov 18, 2025

    @daledah
    Contributor

    Proposal

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

    If the report contains manual track expenses, user cannot select waypoints to create distance expense via Add expense button present within the report details page. Hmm..not here page opens from second time onwards whenever user try to select start or stop waypoints

    What is the root cause of that problem?

    When creating a new expense (isEditing = false), the useShowNotFoundPageInIOUStep hook still tried to fetch a reportAction using report?.parentReportActionID || reportActionID, which could contain stale values from previous transactions.

    const reportActionsReportID = useMemo(() => {
    let actionsReportID;
    if (isEditing) {
    actionsReportID = iouType === CONST.IOU.TYPE.SPLIT ? report?.reportID : report?.parentReportID;
    }
    return actionsReportID;
    }, [isEditing, iouType, report?.reportID, report?.parentReportID]);

    const [reportAction] = useOnyx(
    `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportActionsReportID}`,
    {
    canEvict: false,
    selector: getReportActionSelector,
    canBeMissing: true,
    },
    [getReportActionSelector],
    );

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

    Updated getReportActionSelector to return undefined immediately when reportActionsReportID is falsy to ensures the "not found" page only shows when appropriate and doesn't appear when creating new distance expenses from the report details page.

        const getReportActionSelector = useCallback(
            (reportActions: OnyxEntry<ReportActions>): OnyxEntry<ReportAction> => {
                if (!reportActionsReportID) {
                    return undefined;
                }
                // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
                return reportActions?.[`${report?.parentReportActionID || reportActionID}`];
            },
            [report?.parentReportActionID, reportActionID, reportActionsReportID],
        );
    

    What alternative solutions did you explore? (Optional)

    NA

    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.

  4. changed the title [-]Not here page when selecting waypoints second time onwards via Add expense CTA flow[/-] [+][$250] Not here page when selecting waypoints second time onwards via Add expense CTA flow[/+] on Nov 19, 2025
  5. melvin-bot commented on Nov 19, 2025

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 19, 2025
  7. melvin-bot commented on Nov 19, 2025

    @melvin-bot

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

  8. paulnjs commented on Nov 20, 2025

    @paulnjs
    Contributor

    Proposal

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

    If the report contains manual track expenses, user cannot select waypoints to create distance expense via Add expense button present within the report details page. Hmm..not here page opens from second time onwards whenever user try to select start or stop waypoints

    What is the root cause of that problem?

    When get the dropdown options, we triggers getAddExpenseDropdownOptions but didn’t pass lastDistanceExpenseType like what we did in other places like AttachmentPickerWithMenuItems

    const addExpenseDropdownOptions = useMemo(() => getAddExpenseDropdownOptions(report?.reportID, policy), [report?.reportID, policy]);

    So we didn’t init the waypoints

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

    Update this line:

    const addExpenseDropdownOptions = useMemo(() => getAddExpenseDropdownOptions(report?.reportID, policy), [report?.reportID, policy]);

    To

    const [lastDistanceExpenseType] = useOnyx(ONYXKEYS.NVP_LAST_DISTANCE_EXPENSE_TYPE, {canBeMissing: true});
        const addExpenseDropdownOptions = useMemo(() => getAddExpenseDropdownOptions(report?.reportID, policy, undefined, undefined, lastDistanceExpenseType), [report?.reportID, policy, lastDistanceExpenseType]);
    

    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.

  9. dukenv0307 commented on Nov 20, 2025

    @dukenv0307
    Contributor

    Thanks for your proposals. @paulnjs, your RCA is correct, and the solution works well.

    Link to selected proposal

    🎀👀🎀 C+ reviewed

  10. 8 remaining items

  11. JS00001 commented on Dec 9, 2025

    @JS00001
    Contributor

    Hmm yeah thats strange. @dukenv0307 Could you please fill this out?

  12. changed the title [-][$250] Not here page when selecting waypoints second time onwards via Add expense CTA flow[/-] [+][Payment due asap] [$250] Not here page when selecting waypoints second time onwards via Add expense CTA flow[/+] on Dec 11, 2025
  13. dukenv0307 commented on Dec 11, 2025

    @dukenv0307
    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
    • 2b. Reported on staging (deploy blocker)
    • 2c. 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: https://github.com/Expensify/App/pull/71267/files#r2609072011

    • [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: N/A

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

    Regression Test Proposal Template

    Regression Test Proposal

    Test:

    1. Open the app
    2. Go to workspace chat
    3. Create 2 manual track expenses
    4. Go to report details page
    5. Click Add expense button present below the expenses
    6. Select Track distance >> Switch to Map tab >> Select start waypoint
    7. Tap back button to go back to report details page
    8. Again tap Add expense button >> Track distance >> select start waypoint
    9. Verify user able to select start waypoint to create distance expense

    Do we agree 👍 or 👎

  14. dukenv0307 commented on Dec 11, 2025

    @dukenv0307
    Contributor

    @brianlee-expensify I completed the checklist. Thanks

  15. brianlee-expensify commented on Dec 11, 2025

    @brianlee-expensify
    Contributor

    also wondering why this GH didn't auto-update with MelvinBot's payment summary

    @JS00001 @dukenv0307 is it because @paulnjs did not accept the Upwork job?

    i'd usually see the "End contract" button to pay out the Contributor, but Paul hasn't been assigned the contract.

  16. JS00001 commented on Dec 11, 2025

    @JS00001
    Contributor

    Hmm, I'm not sure, would you be able to ask in bugzero? I've not seen this issue before

  17. brianlee-expensify commented on Dec 16, 2025

    @brianlee-expensify
    Contributor

    asking in bugzero on slack

  18. brianlee-expensify commented on Dec 16, 2025

    @brianlee-expensify
    Contributor

    @paulnjs can you accept this Upwork job so that i can send over payment accordingly?

  19. paulnjs commented on Dec 17, 2025

    @paulnjs
    Contributor

    @brianlee-expensify I accepted. Thank you!

  20. brianlee-expensify commented on Dec 17, 2025

    @brianlee-expensify
    Contributor

    Payment Summary

    Contributor: @paulnjs paid $250 via Upwork
    Contributor+: @dukenv0307 due $250 via NewDot

  21. quinthar commented on Dec 19, 2025

    @quinthar
    Contributor

    Approved $250 to @dukenv0307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions