Skip to content

Expensify card - Card's name, 4 digits and Add details button do not appear in workspace chat #101455

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.81-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #100945
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: MacBook Air 26.6.2 Chrome, iPhone 15 iOS 26.6.1
App Component: Other

Action Performed:

  1. As admin, issue a virtual card to member B.
  2. As member B, open the workspace chat
  3. Observe the "issued you a virtual Expensify Card" message

Expected Result:

The "issued you a virtual Expensify Card" system message renders with the correct card name/last four digits
If the card needs shipping details or activation, confirm the Add shipping details / Activate card button appears under the message

Actual Result:

The "issued you a virtual Expensify Card" system message does not include card name/last four digits. The card needs to add details, but the button is not displayed in the workspace chat under the issuing message.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7262588_1789662555478.E_card_issuing.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7262588

Issue OwnerCurrent Issue Owner: @abzokhattab

Activity

  1. applause-bot commented on Sep 17, 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/e72ed05e902381bf3ecffe99098c4a0113e9a774a92e51665436738e8083b8bc

  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 17, 2026
  3. changed the title [-]Expensify card-Card's name, 4 digits and Add details button do not appear in workspace chat[/-] [+]Expensify card - Card's name, 4 digits and Add details button do not appear in workspace chat[/+] on Sep 17, 2026
  4. MelvinBot commented on Sep 17, 2026

    @MelvinBot
    Contributor

    Proposal

    TL;DR: Neither half of the Expected Result has ever been implemented. This is not a regression — it's a missing feature plus an incorrect QA expectation.

    What is the root cause of that problem?

    1. The virtual-card message never contained a card name or last four digits.

    The link text is the hard-coded word card, interpolated into the copy string:

    The Card object is used only to decide whether that word becomes a hyperlink — its cardName/lastFourPAN are never read. Two unit tests pin the exact string, including the no-card case: tests/unit/ReportActionsUtilsTest.ts:2416. No sibling card action (CARD_ISSUED, CARD_MISSING_ADDRESS, CARD_REPLACED, CARD_ASSIGNED) renders a name either.

    2. No button can ever render under a CARD_ISSUED_VIRTUAL action.

    Both gates hard-exclude that action name — src/libs/ReportActionsUtils.ts:4790-4798:

    • shouldShowAddMissingDetails → CARD_MISSING_ADDRESS only
    • shouldShowActivateCard → CARD_ISSUED / CARD_REPLACED only

    The virtual-card "Add personal details" prompt does exist — on Wallet, the Home time-sensitive section (useTimeSensitiveCards.ts:64-70), the Settings brick road, and the card-details Reveal button. It was never wired into the workspace chat. The comment at CardUtils.ts:1786-1789 enumerates the surfaces kept in sync; the report action isn't one. Also note "Add shipping details" would be the wrong label — virtual cards need details to reveal, not to ship.

    Where the expectation came from: the QA steps on Extract Expensify card lookup into pure function ask the tester to "confirm the card name/details still render correctly", written by an author who noted they couldn't test the feature. That PR is a behaviour-preserving refactor — the lookup body moved verbatim into getExpensifyCardFromReportAction. It did not cause this.

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

    This needs a product call first, because both halves are new behaviour, not fixes.

    For the missing button (the more defensible half): add a third gate in ReportActionsUtils for CARD_ISSUED_VIRTUAL that reuses the existing virtual-card predicates so the chat stays in sync with the other four surfaces — isActionableVirtualExpensifyCard plus areAddressAndPersonalDetailsMissing plus the isActingAsDelegate guard. Render it in IssueCardMessage.tsx with the existing workspace.expensifyCard.addPersonalDetails copy (en.ts:6456), routing to DYNAMIC_ROUTES.MISSING_PERSONAL_DETAILS.

    For the card name / last four: this is a copy change across all locale files, and it likely needs a backend change too — the action's originalMessage carries only assigneeAccountID, cardID and hadMissingAddress, and a non-admin member resolves the card solely from their own cardList. I'd suggest not doing this unless Design asks for it.

    What alternative solutions did you explore?

    Hypotheses considered and ruled out
    • Regression from PR Extract Expensify card lookup into pure function #100945 — ruled out. Pure refactor: same admin/non-admin branch, same two Onyx keys, same fallback order, only parameter renames.
    • Number-vs-string key mismatch in cardList?.[cardID] (ReportAlternateTextUtils.ts:1639-1642) — ruled out. JS coerces a numeric index to its string form, and CardList keys are stringified cardIDs.
    • filterOutPersonalCards dropping the card — ruled out. It drops only cards with no fundID, fundID === '0', or bank === CSV; Expensify Cards carry a real fundID. Also, that list only feeds the unused companyCard variable on this path.
    • Backend sent the wrong action type — unlikely. "issued you a virtual Expensify Card" is copy unique to CARD_ISSUED_VIRTUAL, so the action type matches what was done.
    Two adjacent findings worth separate issues

    a) The card hyperlink can silently degrade to plain text for the assignee. expensifyCardLink only wraps the word in an <a> when isCardActive(expensifyCard) is true, and isCardActive(undefined) is false. For a non-admin the card is resolved only from cardList, which no code on the report screen ever fetches — IssueCardMessage has no equivalent of the card-details page's fetch-on-mount. If cardList is stale, the message renders unlinked and the member's link target (settings/card/<cardID>) would 404 as well. Unverified — confirming it needs the OpenApp payload for the assignee, which is backend-side.

    b) PRIVATE_PERSONAL_DETAILS is read without its loading status at IssueCardMessage.tsx:50. While undefined, arePersonalDetailsMissing returns true, which suppresses the Activate card button on genuine CARD_ISSUED / CARD_REPLACED actions until the key hydrates. This is a real latent defect, unrelated to this report.

    Possibly related: [Due for payment 2026-09-15] [$250] [Exploratory] E-card - Clicking replacement card hyperlink leads to Not Here page — same card-link-resolution area, different action type.

    I did not run a live test: reproducing this requires a workspace with Expensify Cards enabled and a verified settlement account, which the test account can't reach. The conclusion above is statically determined by the copy string and the two gate predicates, both pinned by unit tests.


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


    view run

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 17, 2026
  6. melvin-bot commented on Sep 17, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @abzokhattab (External)

  7. melvin-bot commented on Sep 17, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  8. mountiny commented on Sep 17, 2026

    @mountiny
    Contributor

    @joekaufmanexpensify What is the expected behaviour here?

  9. joekaufmanexpensify commented on Sep 18, 2026

    @joekaufmanexpensify
    Contributor

    Yeah, I feel like it's fine to do nothing for now. How this message works is how it was originally intended. The action has since evolved because we do collect personal details before you can access the virtual card for the first time (if they're not already on file).

    However, there's no time-sensitive nature of putting those on file in the same way there is with ordering a physical card, because it's several days after you ordered the physical card before you actually get it. Whereas with the virtual card the personal details take about 30 seconds to add immediately before you begin using the card.

    Therefore, the different treatment of using the green action button for ordering a physical card versus just hyperlinking to the virtual card here doesn't feel inconsistent to me. Because one is a time-sensitive action and the other is not.

  10. melvin-bot commented on Sep 22, 2026

    @melvin-bot

    @abzokhattab Eep! 4 days overdue now. Issues have feelings too...

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions