Skip to content

[Due for payment 2026-05-07] Spend rules - Edit spend rules is not responsive when accessed from Inbox #88648

Closed

Description

@mitarachim

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.3.62-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: #87682
Email or phone of affected tester (no customers): sdsodijnosdjoij@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  • Workspace is set up with Expensify Card feature.
  • Assign a virtual card to yourself.
  • Enable Rules in workspace settings.

1.Go to staging.new.expensify.com
2. Go to workspace chat.
3. Click card link in the system message.
4. Click Edit spend rules.

Expected Result:

Edit rule RHP will open.

Actual Result:

Spend rules menu item/Edit spend rules is not responsive when accessed from Inbox.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7136949_1776976455896.10.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Apr 23, 2026
  2. melvin-bot commented on Apr 23, 2026

    @melvin-bot

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

  3. melvin-bot commented on Apr 23, 2026

    @melvin-bot

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

  4. github-actions commented on Apr 23, 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.
  5. OSBotify commented on Apr 23, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #87682 - "Show rules in RHP" by @luacmartins (High confidence)
    Related Issues: N/A

    Recommendation: REVERT

    PR #87682 introduced the "Edit spend rules" menu item in WorkspaceExpensifyCardDetailsPage, but the navigation call it uses is incompatible with the navigator context that loads the card page from Inbox/workspace chat.

    Assigned: @luacmartins (PR author), @suneox (approving reviewer), @JS00001 (approving reviewer)
    Labels: DeployBlockerCash kept (frontend bug in App repo). DeployBlocker removed (no backend fix needed).

    Detailed Analysis

    Evidence

    • The issue is reproducible only in staging (new feature, not in production), which aligns with PR Show rules in RHP #87682 being a recently merged staging-only change.
    • The melvin-bot automatically assigned this issue to the author of PR Show rules in RHP #87682, confirming the automated link.
    • PR Show rules in RHP #87682 adds "Edit spend rules" and "Spend rules summary" menu items to WorkspaceExpensifyCardDetailsPage, which is the exact page reached by: workspace chat > card system message link > Edit spend rules.
    • The bug is that the "Edit spend rules" press has no effect (non-responsive).

    Verification

    • Affected file: src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx
    • PR Show rules in RHP #87682 modifies this exact file (confirmed via gh pr view 87682 --json files).
    • The navigateToSpendRules function added in that PR calls:
      navigation.navigate(SCREENS.WORKSPACE.RULES_SPEND_NEW, {policyID})
      // or
      navigation.navigate(SCREENS.WORKSPACE.RULES_SPEND_EDIT, {policyID, ruleID})
      
      where navigation is typed as NavigationProp<SettingsNavigatorParamList> via useNavigation().

    Root Cause

    When the card details page is opened from Inbox/workspace chat via a card system message link, it is rendered inside the ExpensifyCardModalStackNavigator (line 340-345 of ModalStackNavigators/index.tsx). This navigator only registers four screens:

    • SCREENS.EXPENSIFY_CARD.EXPENSIFY_CARD_DETAILS
    • SCREENS.EXPENSIFY_CARD.EXPENSIFY_CARD_NAME
    • SCREENS.EXPENSIFY_CARD.EXPENSIFY_CARD_LIMIT
    • SCREENS.EXPENSIFY_CARD.EXPENSIFY_CARD_LIMIT_TYPE

    The SCREENS.WORKSPACE.RULES_SPEND_NEW and SCREENS.WORKSPACE.RULES_SPEND_EDIT screens are registered only in the larger SettingsModalStackNavigator (lines 921-922). When navigation.navigate(SCREENS.WORKSPACE.RULES_SPEND_NEW, ...) is called from within ExpensifyCardModalStackNavigator, React Navigation cannot find the target screen in the current navigator tree, so the navigation silently fails and the button appears unresponsive.

    The PR also added ROUTES.SETTINGS_WALLET_EXPENSIFY_CARD_SPEND_RULES and WalletExpensifyCardSpendRulesPage (registered in SettingsModalStackNavigator), which is the correct route for navigating from the Wallet card page context. The WorkspaceExpensifyCardDetailsPage should either use Navigation.navigate(ROUTES.SETTINGS_WALLET_EXPENSIFY_CARD_SPEND_RULES.getRoute(...)) (for cross-navigator navigation) or the Expensify Card navigator needs the spend rules screens registered in it too. Since the fix is non-trivial, reverting and re-landing with the correct navigation is the safest path.

  6. 7 remaining items

  7. changed the title [-]Spend rules - Edit spend rules is not responsive when accessed from Inbox[/-] [+][Due for payment 2026-05-07] Spend rules - Edit spend rules is not responsive when accessed from Inbox[/+] on Apr 30, 2026
  8. melvin-bot commented on Apr 30, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  9. melvin-bot commented on Apr 30, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.64-31 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-05-07. 🎊

    For reference, here are some details about the assignees on this issue:

    • @suneox requires payment through NewDot Manual Requests
  10. melvin-bot commented on Apr 30, 2026

    @melvin-bot

    @suneox 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]

  11. melvin-bot commented on May 1, 2026

    @melvin-bot

    @suneox Still overdue 6 days?! Let's take care of this!

  12. luacmartins commented on May 5, 2026

    @luacmartins
    Contributor

    PR merged, waiting on paymnet

  13. melvin-bot commented on May 5, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  14. mallenexpensify commented on May 7, 2026

    @mallenexpensify
    Contributor

    Looks like a regression and no payment due (no review from @suneox on the PR either), so closing.
    checking on the parent issue for what payment should be there

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions