Skip to content

Wallet - Assigned cards section is shown when there is no card #81586

Closed

Description

@jponikarchuk

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.11-53
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #79562
Email or phone of affected tester (no customers): ffjfujggngngjghjg@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: iPhone 15 Pro Max / iOS 26.2
App Component: User Settings

Action Performed:

Precondition:

  • Account does not have any card.
  1. Launch Expensify app.
  2. Go to Account > Wallet.

Expected Result:

Assigned cards section will not show up if there is no card.

Actual Result:

Assigned cards section is shown when there is no card.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCash
    Bug
    on Feb 5, 2026
  2. melvin-bot commented on Feb 5, 2026

    @melvin-bot

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

  3. melvin-bot commented on Feb 5, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 5, 2026

    @melvin-bot

    Triggered auto assignment to @heyjennahay (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 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. OSBotify commented on Feb 5, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #79562 - "Feat: existing personal cards" by @waterim (High confidence)
    Related Issues: None

    Recommendation: REVERT

    The PR should be reverted because it introduces a visible UI bug where the "Assigned cards" section header and description are shown even when there are no cards to display.

    Labels: No label changes needed - this is correctly labeled as DeployBlockerCash since it is a frontend bug that requires an App PR fix.

    Detailed Analysis

    Evidence

    The issue reports that the "Assigned cards" section is shown in the Wallet page even when there are no cards. This is reproducible on staging but not in production, and PR #79562 was merged on 2026-01-30 and is included in the current staging deploy.

    PR #79562 introduced personal cards to the Wallet page and made changes to:

    1. The isPersonalCard() function logic (inverted the logic to correctly identify personal cards)
    2. Added the hasDisplayableAssignedCards() function to check if cards should be displayed
    3. Modified the WalletPage to show personal cards in the assigned cards section

    Verification

    The bug is in /home/runner/work/App/App/src/pages/settings/Wallet/WalletPage/index.tsx:

    Lines 547-575 show the issue:

    <Section
        subtitle={translate('walletPage.assignedCardsDescription')}
        title={translate('walletPage.assignedCards')}
        isCentralPane
        subtitleMuted
        titleStyles={styles.accountSettingsSectionTitle}
    >
        {hasAssignedCard && (
            <PaymentMethodList
                shouldShowAddBankAccount={false}
                shouldShowAssignedCards
                onPress={assignedCardPressed}
                ...
            />
        )}
        {isBetaEnabled(CONST.BETAS.PERSONAL_CARD_IMPORT) && (
            <View>
                <MenuItem ... />
            </View>
        )}
    </Section>

    The Section header and subtitle are always rendered, but the PaymentMethodList inside is only shown when hasAssignedCard is true. This means when hasAssignedCard is false, users see the section header/description with no content underneath.

    Root Cause

    The PR correctly modified the logic but failed to wrap the entire Section component with a conditional check. The Section should only be displayed when either:

    1. hasAssignedCard is true, OR
    2. The personal card import beta is enabled

    The fix would be to wrap the entire Section with a conditional like:

    {(hasAssignedCard || isBetaEnabled(CONST.BETAS.PERSONAL_CARD_IMPORT)) && (
        <Section ...>
            ...
        </Section>
    )}

    However, since this is a deploy blocker, the safest approach is to revert the PR and re-implement with proper testing.

  7. Eskalifer1 commented on Feb 5, 2026

    @Eskalifer1
    Contributor

    Proposal

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

    Wallet - Assigned cards section is shown when there is no card

    What is the root cause of that problem?

    We always display section here:

    <Section
    subtitle={translate('walletPage.assignedCardsDescription')}
    title={translate('walletPage.assignedCards')}
    isCentralPane
    subtitleMuted
    titleStyles={styles.accountSettingsSectionTitle}
    >
    {hasAssignedCard && (
    <PaymentMethodList
    shouldShowAddBankAccount={false}
    shouldShowAssignedCards
    onPress={assignedCardPressed}
    threeDotsMenuItems={cardThreeDotsMenuItems}
    style={[styles.mt5, [shouldUseNarrowLayout ? styles.mhn5 : styles.mhn8]]}
    listItemStyle={shouldUseNarrowLayout ? styles.ph5 : styles.ph8}
    />
    )}
    {isBetaEnabled(CONST.BETAS.PERSONAL_CARD_IMPORT) && (
    <View style={[hasAssignedCard ? styles.mt3 : styles.mt5, shouldUseNarrowLayout ? styles.mhn5 : styles.mhn8]}>
    <MenuItem
    title={translate('workspace.companyCards.importTransactions.importButton')}
    icon={icons.Table}
    shouldShowRightIcon
    onPress={() => Navigation.navigate(ROUTES.SETTINGS_WALLET_IMPORT_TRANSACTIONS)}
    wrapperStyle={[styles.paymentMethod, shouldUseNarrowLayout ? styles.ph5 : styles.ph8]}
    />
    </View>
    )}
    </Section>

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

    We should do it based on this condition:
    isBetaEnabled(CONST.BETAS.PERSONAL_CARD_IMPORT) || hasAssignedCard;

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  8. Julesssss commented on Feb 5, 2026

    @Julesssss
    Contributor

    @amyevans @tgolen I see this is likely coming from #79562 which is a hefty PR.

    This seems an okay regression to me, as we are a week without deploy I am removing the label. But could you please resolve this as a follow yo. Thank you

  9. added
    Daily
    and removed
    DeployBlockerCash
    Hourly
    on Feb 5, 2026
  10. tgolen commented on Feb 5, 2026

    @tgolen
    Contributor

    I agree it's not a blocker. I wasn't involved much with the original PR, so I'll let @amyevans dig into it further.

  11. Eskalifer1 commented on Feb 5, 2026

    @Eskalifer1
    Contributor

    Actually guys it's coming from this PR: #80648

    cc: @Julesssss @tgolen

  12. amyevans commented on Feb 5, 2026

    @amyevans
    Contributor

    Yeah it doesn't need to block deploy, thanks @Julesssss!

    It's also a simple fix so I can take care of it, but a quick question for you first @Gonals as the condition was modified in #80648: Should the Import Transactions button be behind the PERSONAL_CARD_IMPORT beta, or does the CSV project have its own beta?

  13. Julesssss commented on Feb 5, 2026

    @Julesssss
    Contributor

    Thanks all

  14. added
    Reviewing
    Weekly
    and removed
    Daily
    on Feb 5, 2026
  15. amyevans commented on Feb 5, 2026

    @amyevans
    Contributor

    PR is here: #81600. I don't think we need to block it on the answer to the question here: #81586 (comment)

  16. amyevans commented on Feb 11, 2026

    @amyevans
    Contributor

    On prod

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

Metadata

Metadata

Labels

BugEngineeringReviewingWeekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions