Skip to content

Expensify Card - Limit type still shows validity when Set expiry date is disabled #82458

Closed

Description

@nlemma

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.19-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: #81832
Email or phone of affected tester (no customers): applausetester+khcategory20@applause.expensifail.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.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Expensify Card.
  3. Click Issue card.
  4. Issue a virtual card with any limit type with expiry date.
  5. Click on the assigned card.
  6. Click Limit type.
  7. Disable Set expiry date.
  8. Click Save.
  9. Go to Account > Wallet.
  10. Click on the assigned card.

Expected Result:

Limit type will not show validity because Set expiry date is disabled.

Actual Result:

Limit type still shows validity when Set expiry date is disabled.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7077227_1771010125251.4.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 Feb 13, 2026
  2. melvin-bot commented on Feb 13, 2026

    @melvin-bot

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

  3. melvin-bot commented on Feb 13, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 13, 2026

    @melvin-bot

    Triggered auto assignment to @CortneyOfstad (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.

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

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #81832 - "[Single-use and Expire-by virtual cards]: update card to display for employee" by @nkdengineer (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #81832 should be reverted. It introduced the display of card validity dates without properly handling the case where expiry dates are disabled after being previously set.

    Labels: No label changes made (keeping DeployBlockerCash as this is a frontend App issue that blocks the App deploy)

    📋 Detailed Analysis

    Evidence

    PR #81832 was merged on 2026-02-13 and added the display of limit type and validity date information on the card details page. The issue was reported immediately after this PR was included in the staging deploy (version 9.3.19-0).

    The bug is reproducible in staging but not in production because this is a new feature that does not exist in production yet, confirming the cause is a recent staging-only change.

    Verification

    The PR modified these files:

    • src/pages/settings/Wallet/ExpensifyCardPage/index.tsx - Added getCardHintText function and display of limit type with validity dates
    • src/pages/settings/Wallet/WalletPage/CardDetails.tsx - Added display of limit type with validity dates

    The issue reproduction steps directly match the changes made in this PR:

    1. Card is issued with expiry dates → validFrom and validThru are populated
    2. User edits card and disables "Set expiry date" → backend clears these fields via clearValidityDates parameter
    3. Card details page still shows validity dates → This is where the bug manifests

    Root Cause

    The getCardHintText function added in PR #81832 (line 85 of ExpensifyCardPage/index.tsx) checks if validFrom and validThru exist before displaying the date range:

    const getCardHintText = (validFrom: string | undefined, validThru: string | undefined, ...) => {
        if (!validFrom || !validThru) {
            return;  // Should not display if dates are missing
        }
        // ... format and return date range
    };

    However, there appears to be a race condition or caching issue where:

    1. The fields are not immediately cleared to null/undefined when the user disables expiry dates
    2. The old values persist in the display
    3. The function shows the hint text based on stale data

    The proper fix would require:

    • Ensuring the optimistic update immediately clears these fields when shouldClearValidityDates is true
    • OR adding a separate flag to track whether expiry dates are enabled
    • OR improving the display logic to handle edge cases better

    Given the complexity of this new feature and the fact it blocks deployment, reverting is the safest approach.

  7. nkdengineer commented on Feb 15, 2026

    @nkdengineer
    Contributor

    @lakchote When we clear the validFrom and validThru, the backend doesn't return the update to clear the validFrom and validThru in cardList data, then we still see this in the wallet page. If we reset the cache, it will disappear. It's a backend problem.

    Screen.Recording.2026-02-15.at.23.30.21.mov
  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Feb 15, 2026
  9. mountiny commented on Feb 15, 2026

    @mountiny
    Contributor

    Demoting as this is an edge case @lakchote please handle with urgency though

  10. lakchote commented on Feb 16, 2026

    @lakchote
    Contributor

    @lakchote When we clear the validFrom and validThru, the backend doesn't return the update to clear the validFrom and validThru in cardList data, then we still see this in the wallet page. If we reset the cache, it will disappear. It's a backend problem.

    @c3024 could you please handle it?

  11. c3024 commented on Feb 16, 2026

    @c3024
    Contributor

    @nkdengineer

    We send the clearValidityDates flag from the frontend so the backend can understand that the validity dates have been cleared, due to some complexity in handling empty values on the backend. The backend includes the validity dates in the card nameValuePairs if they exist. If they do not exist, they are not sent. Backend does not send the flag back.

    The UpdateExpensifyCardLimitType response in your screen recording shows that the card NVPs no longer contain validity dates. The frontend should treat this as the card not having validity dates set and update the relevant components accordingly.

  12. nkdengineer commented on Feb 16, 2026

    @nkdengineer
    Contributor

    @c3024 but it's merge operator which can't clear the the validFrom and validThru in cardList daât in onyx

  13. c3024 commented on Feb 16, 2026

    @c3024
    Contributor

    Thanks for the clarification. Auth PR with fix opened for review.

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