Skip to content

[Due for payment 2026-08-10] [$250] Rillet per-card account export opens not here page after changing card name and account export #96415

Closed

Description

@applause-bot

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.4.36-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #95562
Email or phone of affected tester (no customers): applausetester+sdodjsoddddds@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  • Log in with Expensifail account.
  • Workspace is connected to Rillet.
  • Workspace has Wells Fargo direct feed.
  • Assign company card to any workspace member.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Members.
  3. Click on the user with company card.
  4. Click on the company card.
  5. Click Card name > Save.
  6. Click Rillet per-card account export.
  7. Select the other option.
  8. Click Rillet per-card account export.

Expected Result:

Rillet per-card account export page will open.

Actual Result:

Not here page opens.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7210803_1784305633927.6.1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7210803

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 17, 2026
  2. melvin-bot commented on Jul 17, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #95562

  3. melvin-bot commented on Jul 17, 2026

    @melvin-bot

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

  4. applause-bot commented on Jul 17, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/911df3dc10e8873c4c23643f145f3745db6a50ada5e8e0fbce0ff417cbb4c970

  5. github-actions commented on Jul 17, 2026

    @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.
  6. MelvinBot commented on Jul 17, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    Root Cause: The "Rillet per-card account export" menu item builds its destination URL from whatever the live active route happens to be, not from a deterministic base path. The onPress is Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.WORKSPACE_COMPANY_CARD_EXPORT.path)). With no basePath argument, createDynamicRoute falls back to Navigation.getActiveRoute() and appends /edit/export. After you edit the card name (goes back with a re-seeded route) and pick an account (which pops back via goBack(useDynamicBackPath(...))), the active route left in the stack no longer resolves to a clean company-card-details path. On the second open, the resulting .../edit/export URL fails entryScreens validation in getStateFromPath and falls through to the NOT_FOUND screen — the "Not here" page.

    This is a regression from PR #95562, which made edit/export a shared dynamic suffix by adding a second entry screen (RILLET_CARD_ACCOUNT_CARD_LIST) at ROUTES.ts:806-809. The route is now reachable from two base screens with different URL shapes, which exposes the pre-existing fragility of deriving the export URL from getActiveRoute() across an edit → select → reopen sequence.

    Recommended Fix: Pass an explicit, deterministic basePath to createDynamicRoute instead of relying on the live active route — mirroring what the card-name edit page already does at WorkspaceCompanyCardEditCardNamePage.tsx:53. In the details page onPress, build the base from the known feed/cardID:

    onPress={() => Navigation.navigate(createDynamicRoute(
        DYNAMIC_ROUTES.WORKSPACE_COMPANY_CARD_EXPORT.path,
        createDynamicRoute(
            DYNAMIC_ROUTES.WORKSPACE_COMPANY_CARD_DETAILS.getRoute(feedName, cardID),
            ROUTES.WORKSPACE_COMPANY_CARDS.getRoute(policyID),
        ),
    ))}

    This removes the dependency on whatever getActiveRoute() returns after the select → goBack, so the export route always resolves to a valid entry screen.

    Investigation details, evidence & confidence

    Trace (why open #2 fails but open #1 works):

    1. Edit card name → Save: WorkspaceCompanyCardEditCardNamePage.tsx:53-54 does goBack(createDynamicRoute(...details...), {compareParams: false}), re-seeding the details route.
    2. First export open: getActiveRoute() + /edit/export; the short-form correction in OldRoutes.ts still maps it to DYNAMIC_COMPANY_CARD_DETAILS → passes entryScreens → selector renders.
    3. Select account: DynamicWorkspaceCompanyCardAccountSelectCardPage.tsx:91 does goBack(useDynamicBackPath('edit/export')); the details route left in state is derived from the selector's path.
    4. Second export open: getActiveRoute() now yields a base path that (after +/edit/export and attempted correction) matches no entryScreens screen → getStateFromPath logs "None of the N dynamic suffix candidate(s) passed entryScreens validation" and falls through to NOT_FOUND.

    Alternatives considered / ruled out:

    • Card becomes undefined after rename — unlikely; the "Not here" comes from route resolution (NOT_FOUND screen), not the details page's if (!card) return <NotFoundPage/>, and renaming doesn't drop the card from useCardsList.
    • New Rillet linking patterns colliding — the new patterns live under /accounting/rillet/, so they don't win the longest-match against the company-cards path.

    Confidence: Medium. The routing mechanism, the NOT_FOUND source, and the exact PR change are confirmed with file:line. The precise malformed URL string produced on the second open was not confirmed with a live run (Jest was gated in this environment). To pin it down / confirm before merging a fix, search client logs for the string [getStateFromPath.ts][DynamicRoute] None of the from the staging web repro — it logs the exact failing path: and the tried patterns.

    Alternative fix (lower-risk stopgap): once the log reveals the exact malformed path, add a correction rule in OldRoutes.ts (mirroring the existing line 82 rule) that normalizes it back to .../company-card-details/:feed/:cardID/edit/export. The explicit-basePath fix above is the more robust root-cause change.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/96415) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. truph01 commented on Jul 17, 2026

    @truph01
    Contributor

    Please assign me

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jul 17, 2026
  9. 77 remaining items

  10. melvin-bot commented on Aug 9, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  11. melvin-bot commented on Aug 9, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    Upwork Job

    • ROLE: @samranahm paid $(AMOUNT) via Upwork (LINK)
    • Reviewer: @truph01 owed $250 via NewDot

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
  12. mallenexpensify commented on Aug 12, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @samranahm paid $250 via Upwork
    Contributor+: @truph01 due $250 via NewDot

    @truph01 plz complete the BZ checklist and tag me in a post once you have. Thx

  13. truph01 commented on Aug 12, 2026

    @truph01
    Contributor

    Contributor+ Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR:
      Link to the comment on the Issue:

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

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

    Regression Test Proposal

    Precondition:

    Test:

    1. Open Workspaces tab and choose a workspace
    2. Open Members page and click on the member with company card.
    3. Click on the company card.
    4. Click Card name > Save.
    5. Click "Rillet per-card account export".
    6. Select another option from selection list.
    7. Click Rillet per-card account export" again.
    8. Verify selection list opens again instead of Not found page.
    9. Go back and press Card name again
    10. Reload the App while Card name RHP open and verify RHP did not close
    11. Go back and verify "Card details" page open
      Do we agree 👍 or 👎
  14. melvin-bot commented on Aug 17, 2026

    @melvin-bot

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

  15. garrettmknight commented on Sep 7, 2026

    @garrettmknight
    Contributor

    $250 approved for @truph01

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions