Skip to content

[Due for payment 2026-06-17] [Due for payment 2026-06-16] Auditor can click Learn more on Get the Expensify Card banner which enables Expensify Card #92827

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.0-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: #92270
Email or phone of affected tester (no customers): onsjdoijsoijdiosdjo@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • User A invites User B to workspace as auditor.
  • Perform steps below as auditor (User B).
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Company cards.
  3. Click Learn more on Get the Expensify Card banner.
  4. Switch to Workflows.

Expected Result:

Auditor should not be allowed to click Learn more on Get the Expensify Card banner because it will enable Expensify Card.

Actual Result:

Auditor can click Learn more on Get the Expensify Card banner. Expensify Card tab appears and disappears after navigating away.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7172912_1780685268423.17.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Nathan Lemma
Bug ID: 7172912

Activity

  1. applause-bot commented on Jun 5, 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/1b140be9f88f0897a90093d086f659b2e74ce719a5702858806ef38d1875c623

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

    @melvin-bot

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

  4. melvin-bot commented on Jun 5, 2026

    @melvin-bot

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

  5. github-actions commented on Jun 5, 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 Jun 5, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    PR #92270 added read-only (Auditor) guards across workspace pages, but missed the "Get the Expensify Card" promotion banner on the Company Cards page.

    The banner's "Learn more" button calls enableExpensifyCard() directly with no write-access check:

    Code references (bd8cedf)

    By contrast, the sibling CTAs on these pages were guarded — e.g. the Company Cards "Add cards" CTA uses withReadOnlyFallback (WorkspaceCompanyCardPageEmptyState.tsx:122) and the Expensify Card empty-state CTA checks canWriteExpensifyCard before acting (WorkspaceExpensifyCardPageEmptyState.tsx:135-139). The promotion banner was simply overlooked.

    This explains the "tab appears and disappears" symptom: clicking the button fires the optimistic enable of the Expensify Card feature (so the Expensify Card tab pops in), but the backend rejects it for the read-only Auditor, so it reverts on the next data sync.

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

    Guard the banner's "Learn more" action behind the Expensify Card feature write-access check, mirroring the pattern PR #92270 already established elsewhere:

    1. In WorkspaceCompanyCardExpensifyCardPromotionBanner.tsx, call usePolicyFeatureWriteAccess(policy, CONST.POLICY.POLICY_FEATURE.EXPENSIFY_CARD) to get canWrite / showReadOnlyModal / withReadOnlyFallback.
    2. Wrap the button's onPress with withReadOnlyFallback(handleLearnMore) so read-only users get the existing "Not so fast" read-only modal instead of triggering enableExpensifyCard.
    3. Apply the disabled visual styling (styles.buttonOpacityDisabled on innerStyles/hoverStyles) when !canWrite, consistent with the other guarded CTAs.

    This keeps the banner visible (read access is fine) but blocks the write action for Auditors.

    What alternative solutions did you explore? (Optional)

    Hide the banner entirely for read-only roles. Rejected because the established pattern in PR #92270 keeps content visible and only locks the write action, and hiding it would be inconsistent with the rest of the read-only experience.


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

  7. godzillaxbox19982014-lgtm commented on Jun 6, 2026

    @godzillaxbox19982014-lgtm

    Proposal

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

    Auditor can click Learn more on Get the Expensify Card banner which enables Expensify Card

    What is the root cause of that problem?

    I traced this to the path that handles workspace name:

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

    • Update src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx:237 to derive workspace name from the card/accounting data source that owns this flow before the value is consumed.
    • Carry the same normalized value through src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx:144; that follows the safer family move to identify the shared source of truth before changing UI-only state, so the write/optimistic/read paths agree instead of only changing the visible component.
    • Keep the change inside the Payments, Wallet, Bank, Billing, Cards surface and avoid changing money movement, bank/card/account settings.

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    1. Add or update a regression in tests/unit/Payment*.ts for the exact issue flow: Auditor can click Learn more on Get the Expensify Card banner which enables Expensify Card.
    2. Cover the counter-case near src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx:237 so valid existing workspace name behavior still works.
    3. Manually repeat the issue steps after the patch and confirm the visible state/action is no longer stale.

    What alternative solutions did you explore? (Optional)

    • I would not add a broad new condition outside these referenced paths; the safer fix is to keep workspace name consistent at the first read/write boundary shown above.
  8. Julesssss commented on Jun 8, 2026

    @Julesssss
    Contributor

    @flodnv I have handled

  9. m-natarajan commented on Jun 8, 2026

    @m-natarajan

    Passed, Chrome / v9.4.0-4, Xiaomi Redmi Note 10 / Android 12 (Waiting for iOS validation)

    REC-20260608225846.mp4
    Screenrecorder-2026-06-08-23-01-45-960.mp4
  10. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jun 8, 2026
  11. changed the title [-]Auditor can click Learn more on Get the Expensify Card banner which enables Expensify Card[/-] [+][Due for payment 2026-06-16] Auditor can click Learn more on Get the Expensify Card banner which enables Expensify Card[/+] on Jun 9, 2026
  12. melvin-bot commented on Jun 9, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.0-7 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-06-16. 🎊

  13. melvin-bot commented on Jun 9, 2026

    @melvin-bot

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

  14. changed the title [-][Due for payment 2026-06-16] Auditor can click Learn more on Get the Expensify Card banner which enables Expensify Card[/-] [+][Due for payment 2026-06-17] [Due for payment 2026-06-16] Auditor can click Learn more on Get the Expensify Card banner which enables Expensify Card[/+] on Jun 10, 2026
  15. melvin-bot commented on Jun 10, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.1-6 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-06-17. 🎊

  16. melvin-bot commented on Jun 10, 2026

    @melvin-bot

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

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

Metadata

Metadata

Assignees

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