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

[$250][Back] Company cards - Tapping device back button/app's back button from concierge shows inconsistent behavior #57037

Open
3 of 8 tasks
vincdargento opened this issue Feb 18, 2025 · 22 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@vincdargento
Copy link

vincdargento commented Feb 18, 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: V9.0.99-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
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: N/A
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Redmi note 10s android 13
App Component: Other

Action Performed:

  1. Launch app on both mWeb and Android
  2. Go to Workspace Settings - More features - Enable Company cards
  3. Issue a card using any option
  4. In Company card page, tap Concierge link
  5. In Concierge page, tap device back button and app's back button and note the behavior

Expected Result:

In mWeb and Android, tapping device back button/app's back button from Concierge page must show consistent behavior.

Actual Result:

In mWeb tapping device back button , user navigated to Company cards page and tapping app's back button user navigated to LHN. But in Android, tapping both device back button/app's back button, user navigated to LHN.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

bug.mp4
bug2.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021894128437545356360
  • Upwork Job ID: 1894128437545356360
  • Last Price Increase: 2025-03-10
Issue OwnerCurrent Issue Owner: @shubham1206agra
@vincdargento vincdargento added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Feb 18, 2025
Copy link

melvin-bot bot commented Feb 18, 2025

Triggered auto assignment to @slafortune (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 24, 2025

@slafortune Huh... This is 4 days overdue. Who can take care of this?

@slafortune slafortune added the External Added to denote the issue can be worked on by a contributor label Feb 24, 2025
@melvin-bot melvin-bot bot changed the title Company cards - Tapping device back button/app's back button from concierge shows inconsistent behavior [$250] Company cards - Tapping device back button/app's back button from concierge shows inconsistent behavior Feb 24, 2025
Copy link

melvin-bot bot commented Feb 24, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 24, 2025
Copy link

melvin-bot bot commented Feb 24, 2025

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

@gurus00
Copy link

gurus00 commented Feb 24, 2025

Proposal

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

Company cards - Tapping device back button/app's back button from concierge shows inconsistent behavior

What is the root cause of that problem?

This is the navigation error.
When visit the CompanyCard page then move the other pages moving navigation is wrong

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

Fix navigation from CompanyCard page to other pages

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)

@shubham1206agra
Copy link
Contributor

@adamgrzybowski Can you pick this up?

@mallenexpensify mallenexpensify changed the title [$250] Company cards - Tapping device back button/app's back button from concierge shows inconsistent behavior [$250][Back] Company cards - Tapping device back button/app's back button from concierge shows inconsistent behavior Feb 26, 2025
@mallenexpensify
Copy link
Contributor

@shubham1206agra what's reason for asking if @adamgrzybowski can pick this up? We added Help Wanted and have a proposal to review.

I added [Back] to the title cuz I feel like we've had so many similar issues as this, would love to get this fixed more holistically or... to possibly bucket a bunch of these then create a single issue/job to fix multiple at once (since they're not the highest value not terribly time sensitive)

@shubham1206agra
Copy link
Contributor

shubham1206agra commented Feb 26, 2025

@mallenexpensify Since this bug probably came from major refactor we have performed recently. Plus, there are no good proposals that I can approve yet.

@thelullabyy
Copy link
Contributor

thelullabyy commented Feb 27, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-02-27 11:09:34 UTC.

Proposal

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

Company cards - Tapping device back button/app's back button from concierge shows inconsistent behavior

What is the root cause of that problem?

We don't add function to handle back button for physical device. With Android Chrome, pressing the back button will take us back to the previous URL (the Company Card page), which is exactly as expected.

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

We can add a backTo param to the route when open the Concierge Report page:

App/src/ROUTES.ts

Lines 310 to 311 in 7d0bcb4

getRoute: (reportID: string | undefined, reportActionID?: string, referrer?: string) => {
if (!reportID) {

   getRoute: (reportID: string | undefined, reportActionID?: string, referrer?: string, backTo?: string) => {
            if (!reportID) {
                Log.warn('Invalid reportID is used to build the REPORT_WITH_ID route');
            }
            const baseRoute = reportActionID ? (`r/${reportID}/${reportActionID}` as const) : (`r/${reportID}` as const);
            const referrerParam = referrer ? `?referrer=${encodeURIComponent(referrer)}` : '';
            return getUrlWithBackToParam(`${baseRoute}${referrerParam}` as const, backTo);
        },

Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeChatReportID), linkToOptions);

Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeChatReportID, undefined, undefined, Navigation.getActiveRoute()), linkToOptions);

Then use handleBackButtonPress to handle in ReportScreen to handle back button event in android device. Pass backToParam to Navigation.goBack

const handleBackButtonPress = useCallback(() => {
        if (isInNarrowPaneModal) {
            Navigation.dismissModal();
            return true;
        }
        const backToParam = route?.params?.backTo;
        Navigation.goBack(backToParam, {shouldPopToTop: true});
        return true;
    }, [isInNarrowPaneModal]);

Do the same with onBackButtonPress function to make sure app back button has the same behavior

const onBackButtonPress = useCallback(() => {

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)

Copy link
Contributor

⚠️ @thelullabyy 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).

@mallenexpensify
Copy link
Contributor

@shubham1206agra , please review @thelullabyy 's proposal, if you don't accept it, I can post in the #expert-contributors room and tag Adam there. Thx

@melvin-bot melvin-bot bot added the Overdue label Feb 28, 2025
Copy link

melvin-bot bot commented Mar 3, 2025

📣 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 Mar 4, 2025

@slafortune @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!

@shubham1206agra
Copy link
Contributor

I don't think it's a good idea to add backTo to report route.

@melvin-bot melvin-bot bot removed the Overdue label Mar 4, 2025
@slafortune
Copy link
Contributor

@shubham1206agra once you post in #expert-contributors room can you link that here?

@shubham1206agra
Copy link
Contributor

@slafortune Can you please invite me to the room first?

@slafortune
Copy link
Contributor

slafortune commented Mar 4, 2025

Ah! Sorry about the @shubham1206agra an invite should be coming in the very near future!!

@mallenexpensify
Copy link
Contributor

@shubham1206agra hoping to have you in the #expert-contributors room soon 🤞

Copy link

melvin-bot bot commented Mar 10, 2025

@shubham1206agra Huh... This is 4 days overdue. Who can take care of this?

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

melvin-bot bot commented Mar 10, 2025

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

@Christinadobrzyn
Copy link
Contributor

@shubham1206agra would you be able to check this GH to see if the root of the issue might be the same as this one? I wonder if they will be resolved together. TY!

@shubham1206agra
Copy link
Contributor

@Christinadobrzyn Nope they are different issue.

@melvin-bot melvin-bot bot removed the Overdue label Mar 10, 2025
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. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
Status: LOW
Development

No branches or pull requests

7 participants