You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-07-13] Company card - Clicking on add card in card selector page leads to Not Here page #95359
👋 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:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #94280 - "migrate workspace company cards" by @huult (High confidence) Related Issues: N/A
Recommendation: REVERT
The greedy getMatchingNewRoute redirect rule added by this PR rewrites the "Add Card" dynamic-route path into an invalid company-card-details/... path, which fails entryScreens validation and lands on the Not Found page. A revert cleanly removes the offending rule; if a revert is disruptive, a targeted forward fix is also viable (see Root Cause).
Assigned: @huult (PR author), @mjasikowski and @suneox (approving reviewers) from highest-confidence causing PR only Labels: No changes. Kept DeployBlockerCash — this is a frontend regression from an App PR that blocks the App deploy.
📋 Detailed Analysis
Evidence
The bug flow is: Company card settings → card selector (feed selector page) → Add Card. On the feed selector page, onAddCardsPress navigates via createDynamicRoute(DYNAMIC_ROUTES.WORKSPACE_COMPANY_CARDS_ADD_NEW.path) (add-card-feed), which appends the suffix to the current active route, producing /workspaces/{policyID}/company-cards/select-feed/add-card-feed.
PR migrate workspace company cards #94280 migrated the previously static company-card details route (WORKSPACE_COMPANY_CARD_DETAILS, screen Workspace_CompanyCard_Details, page WorkspaceCompanyCardDetailsPage.tsx) into a dynamic route (DYNAMIC_COMPANY_CARD_DETAILS, path company-card-details/:feed/:cardID). To preserve old deep links, it added greedy backward-compat redirect rules in OldRoutes.ts, including:
Reproduces on staging (contains migrate workspace company cards #94280), not production (does not yet contain it) — consistent with the PR being the cause.
src/libs/Navigation/linkingConfig/OldRoutes.ts:82 — the greedy redirect rule.
src/ROUTES.ts:683-691 — WORKSPACE_COMPANY_CARDS_ADD_NEW (add-card-feed, entryScreens [COMPANY_CARDS, COMPANY_CARDS_SELECT_FEED]) and the new dynamic WORKSPACE_COMPANY_CARD_DETAILS (company-card-details/:feed/:cardID).
src/SCREENS.ts:701 — new DYNAMIC_COMPANY_CARD_DETAILS screen.
Confirmed the "Add Card" navigation path is built in src/pages/workspace/companyCards/WorkspaceCompanyCardFeedSelectorPage.tsx:134.
Confirmed the wildcard semantics in src/libs/Navigation/helpers/getMatchingNewRoute.ts:15-30: a non-trailing * matches exactly one segment ([^/]+); the trailing * matches the rest. getMatchingNewRoute also selects the longest matching pattern.
Confirmed the entryScreens gate in src/libs/Navigation/helpers/getStateFromPath.ts:25,45-48 runs getMatchingNewRoute on the incoming path before dynamic-suffix resolution, then validates the stripped base path's focused route against entryScreens, falling through to SCREENS.NOT_FOUND otherwise.
Root Cause
For the Add Card path /workspaces/{policyID}/company-cards/select-feed/add-card-feed:
getStateFromPath first applies getMatchingNewRoute. The greedy rule '/workspaces/*/company-cards/*/*' matches it ($1=policyID, $2=select-feed, $3=add-card-feed) — no more-specific pattern matches — and rewrites it to /workspaces/{policyID}/company-cards/company-card-details/select-feed/add-card-feed.
The dynamic-suffix resolver strips add-card-feed, leaving base path /workspaces/{policyID}/company-cards/company-card-details/select-feed.
That base path now resolves to the new dynamic DYNAMIC_COMPANY_CARD_DETAILS screen (via company-card-details/:feed/:cardID), so the focused route name is Dynamic_Workspace_CompanyCard_Details.
The add-card-feed route's entryScreens are [COMPANY_CARDS, COMPANY_CARDS_SELECT_FEED], which do not include DYNAMIC_COMPANY_CARD_DETAILS. Validation fails, control falls through, and the state resolves to SCREENS.NOT_FOUND — the "Not Here" page.
The rule is simply too broad: /workspaces/*/company-cards/*/* was intended to redirect legacy 2-segment feed/cardID details links, but it also swallows the legitimate select-feed/add-card-feed dynamic-route navigation (and would collide with any other 2-segment company-cards path). Preferred forward fix: make the redirect target only genuine legacy details links (e.g. constrain the fallback so it does not match known route segments like select-feed/add-card-feed, or drop this catch-all and rely on the more specific company-card-details/*/* rules already present at OldRoutes.ts:68-72).
changed the title [-]Company card - Clicking on add card in card selector page leads to Not Here page[/-][+][Due for payment 2026-07-13] Company card - Clicking on add card in card selector page leads to Not Here page[/+]on Jul 6, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.27-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@suneox / @huult 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]. If no checklist is needed for this issue, you can click: [no checklist button]
@suneox / @huult 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]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
applause-bot commentedon Jul 6, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/099c55e34818f5e148c712e726e5b2aa56070bbaadb09f5b95502f574a7a169e
melvin-bot commentedon Jul 6, 2026
Triggered auto assignment to @cristipaval (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Jul 6, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jul 6, 2026
👋 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:
MelvinBot commentedon Jul 6, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #94280 - "migrate workspace company cards" by @huult (High confidence)
Related Issues: N/A
Recommendation: REVERT
The greedy
getMatchingNewRouteredirect rule added by this PR rewrites the "Add Card" dynamic-route path into an invalidcompany-card-details/...path, which failsentryScreensvalidation and lands on the Not Found page. A revert cleanly removes the offending rule; if a revert is disruptive, a targeted forward fix is also viable (see Root Cause).Assigned: @huult (PR author), @mjasikowski and @suneox (approving reviewers) from highest-confidence causing PR only
Labels: No changes. Kept
DeployBlockerCash— this is a frontend regression from an App PR that blocks the App deploy.📋 Detailed Analysis
Evidence
onAddCardsPressnavigates viacreateDynamicRoute(DYNAMIC_ROUTES.WORKSPACE_COMPANY_CARDS_ADD_NEW.path)(add-card-feed), which appends the suffix to the current active route, producing/workspaces/{policyID}/company-cards/select-feed/add-card-feed.WORKSPACE_COMPANY_CARD_DETAILS, screenWorkspace_CompanyCard_Details, pageWorkspaceCompanyCardDetailsPage.tsx) into a dynamic route (DYNAMIC_COMPANY_CARD_DETAILS, pathcompany-card-details/:feed/:cardID). To preserve old deep links, it added greedy backward-compat redirect rules inOldRoutes.ts, including:'/workspaces/*/company-cards/*/*': '/workspaces/$1/company-cards/company-card-details/$2/$3'Verification
src/libs/Navigation/linkingConfig/OldRoutes.ts:82— the greedy redirect rule.src/ROUTES.ts:683-691—WORKSPACE_COMPANY_CARDS_ADD_NEW(add-card-feed, entryScreens[COMPANY_CARDS, COMPANY_CARDS_SELECT_FEED]) and the new dynamicWORKSPACE_COMPANY_CARD_DETAILS(company-card-details/:feed/:cardID).src/SCREENS.ts:701— newDYNAMIC_COMPANY_CARD_DETAILSscreen.src/pages/workspace/companyCards/WorkspaceCompanyCardFeedSelectorPage.tsx:134.src/libs/Navigation/helpers/getMatchingNewRoute.ts:15-30: a non-trailing*matches exactly one segment ([^/]+); the trailing*matches the rest.getMatchingNewRoutealso selects the longest matching pattern.entryScreensgate insrc/libs/Navigation/helpers/getStateFromPath.ts:25,45-48runsgetMatchingNewRouteon the incoming path before dynamic-suffix resolution, then validates the stripped base path's focused route againstentryScreens, falling through toSCREENS.NOT_FOUNDotherwise.Root Cause
For the Add Card path
/workspaces/{policyID}/company-cards/select-feed/add-card-feed:getStateFromPathfirst appliesgetMatchingNewRoute. The greedy rule'/workspaces/*/company-cards/*/*'matches it ($1=policyID,$2=select-feed,$3=add-card-feed) — no more-specific pattern matches — and rewrites it to/workspaces/{policyID}/company-cards/company-card-details/select-feed/add-card-feed.add-card-feed, leaving base path/workspaces/{policyID}/company-cards/company-card-details/select-feed.DYNAMIC_COMPANY_CARD_DETAILSscreen (viacompany-card-details/:feed/:cardID), so the focused route name isDynamic_Workspace_CompanyCard_Details.add-card-feedroute'sentryScreensare[COMPANY_CARDS, COMPANY_CARDS_SELECT_FEED], which do not includeDYNAMIC_COMPANY_CARD_DETAILS. Validation fails, control falls through, and the state resolves toSCREENS.NOT_FOUND— the "Not Here" page.The rule is simply too broad:
/workspaces/*/company-cards/*/*was intended to redirect legacy 2-segmentfeed/cardIDdetails links, but it also swallows the legitimateselect-feed/add-card-feeddynamic-route navigation (and would collide with any other 2-segment company-cards path). Preferred forward fix: make the redirect target only genuine legacy details links (e.g. constrain the fallback so it does not match known route segments likeselect-feed/add-card-feed, or drop this catch-all and rely on the more specificcompany-card-details/*/*rules already present atOldRoutes.ts:68-72).melvin-bot commentedon Jul 6, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
grgia commentedon Jul 6, 2026
Requested QA retest: https://expensify.slack.com/archives/C09V78U42D8/p1783344834045729
m-natarajan commentedon Jul 6, 2026
Passed, Chrome and Samsung Galaxy A34/ 16 / v9.4.27-2
Recording.1029.mp4
bandicam.2026-07-06.16-48-55-597.1.mp4
[-]Company card - Clicking on add card in card selector page leads to Not Here page[/-][+][Due for payment 2026-07-13] Company card - Clicking on add card in card selector page leads to Not Here page[/+]melvin-bot commentedon Jul 6, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.27-2 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 2026-07-13. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 6, 2026
@suneox / @huult 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]. If no checklist is needed for this issue, you can click: [no checklist button]
melvin-bot commentedon Jul 7, 2026
@suneox / @huult 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]. If no checklist is needed for this issue, you can click: [no checklist button]