Skip to content

Debug - RHP back button navigates to the previous tab instead of returning to the previous RHP #66119

Closed

Description

@jponikarchuk

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.1.81-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail: #66022
Email or phone of affected tester (no customers): jjsdionjsodi@gmail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Other

Action Performed:

  1. Go to staging.expensify.com
  2. Open testing tool via CMD+D.
  3. Enable Debug mode.
  4. Close the menu.
  5. Go to workspace chat.
  6. Click on the report header.
  7. Click Debug.
  8. Switch betwen JSON, Details and Actions tab.
  9. Click RHP back button.

Expected Result:

RHP back button will close.

Actual Result:

RHP back button navigates to the previous tab instead of returning to the previous RHP.

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

1.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 15, 2025
  2. github-actions commented on Jul 15, 2025

    @github-actions
    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.
  3. melvin-bot commented on Jul 15, 2025

    @melvin-bot

    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.

  4. melvin-bot commented on Jul 15, 2025

    @melvin-bot

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

  5. melvin-bot commented on Jul 15, 2025

    @melvin-bot

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

  6. twilight2294 commented on Jul 15, 2025

    @twilight2294
    Contributor

    Proposal

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

    RHP back button navigates to the previous tab instead of returning to the previous RHP

    What is the root cause of that problem?

    This is not a deploy blocker, this problem was hidden for sometime since the switch functionality was broken. we do not pass backTo param to navigation.goBack in the back button, this leads to the previous tab being shown since that is in the stack:

    <HeaderWithBackButton
    title={`${translate('debug.debug')} - ${translate('debug.report')}`}
    onBackButtonPress={Navigation.goBack}
    />

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

    We need to pass backTo prop to the function and also pass it while navigating to the debug page:

    if (report?.reportID && isDebugModeEnabled) {
    items.push({
    key: CONST.REPORT_DETAILS_MENU_ITEM.DEBUG,
    translationKey: 'debug.debug',
    icon: Expensicons.Bug,
    action: () => Navigation.navigate(ROUTES.DEBUG_REPORT.getRoute(report.reportID)),
    isAnonymousAction: true,

    if (report?.reportID && isDebugModeEnabled) {
                items.push({
                    key: CONST.REPORT_DETAILS_MENU_ITEM.DEBUG,
                    translationKey: 'debug.debug',
                    icon: Expensicons.Bug,
                    action: () => Navigation.navigate(ROUTES.DEBUG_REPORT.getRoute(report.reportID, Navigation.getActiveRoute())),

    Then in DebugReportPage:

                        <HeaderWithBackButton
                            title={`${translate('debug.debug')} - ${translate('debug.report')}`}
                            onBackButtonPress={() => {
                                Navigation.goBack(backTo);
                            }}
                        />  

    We also need to update routes and also fix this for other pages as well in the debug section if problem exits there too

    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

  7. mountiny commented on Jul 15, 2025

    @mountiny
    Contributor

    I think we can demote this one as its minor and in debug tool that is used in staging mainly

    Related to #66022 @thelullabyy @hungvu193 can you take a look please

  8. hungvu193 commented on Jul 15, 2025

    @hungvu193
    Contributor

    I noticed this during testing. When I checked the onBackPress function it's Navigation.goBack and I thought it was expected 

  9. mountiny commented on Jul 15, 2025

    @mountiny
    Contributor

    Oh you are right I have double checked how the create expense flow works with the tabs and this is the samae behaviour so now we just matched that. I think that is expected then!

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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions