Skip to content

[Due for payment 2026-06-23] [Due for payment 2026-06-22] Not here page opens when card admin invites user to workspace when issuing card #93508

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

Action Performed:

Precondition:

  • User A invites User B to workspace as card admin.
  • Workspace has business bank account and set up with Expensify Card.
  • Perform steps below as card admin (User B).
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Expensify Card.
  3. Click Issue card.
  4. Enter email of non-member.
  5. Select the user.

Expected Result:

Card admin should be shown a better message that they cannot invite member to the workspace when issuing card.

Actual Result:

Not here page opens when card admin invites user to workspace when issuing card.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7179426_1781304098373.18.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7179426

Issue OwnerCurrent Issue Owner: @ShridharGoel

Activity

  1. applause-bot commented on Jun 13, 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/80e594dc277e6ea9748b8a0836dab17bdf5e3cf28fb9582ea43509b5caeb0096

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

    @melvin-bot

    @flodnv recently merged #92740, but they are OOO right now, so I'll auto-assign someone else.

  4. melvin-bot commented on Jun 13, 2026

    @melvin-bot

    Triggered auto assignment to @yuwenmemon (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  5. melvin-bot commented on Jun 13, 2026

    @melvin-bot

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

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

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    A Card Admin (scoped role added in #92740) has write access to the Expensify Card feature, so they can open the Issue Card flow. But they are not a full workspace admin, and inviting a non-member to the workspace is admin-only.

    When the Card Admin selects a non-member in the assignee step, the flow routes to the INVITE_NEW_MEMBER step, which renders WorkspaceInviteMessageComponent. That component is gated behind an admin-only access wrapper, so a Card Admin fails the check and is shown the "Not here" (NotFoundPage) instead of a useful message.

    Evidence
    1. Selecting a non-member routes to the invite step — AssigneeStep.tsx:92-104. The assignee list is built with includeUserToInvite: true (line 69-76), so non-members are offered as selectable invitees regardless of role.
    2. The INVITE_NEW_MEMBER step renders WorkspaceInviteMessageComponent — InviteNewMemberStep.tsx:85-95.
    3. That component wraps itself in AccessOrNotFoundWrapper with accessVariants={[ADMIN]} — WorkspaceInviteMessageComponent.tsx:216-220.
    4. The ADMIN variant resolves to canEditWorkspaceSettings → isPolicyAdmin — AccessOrNotFoundWrapper.tsx:46 and PolicyUtils.ts:1143-1145. A CARD_ADMIN role is not ADMIN, so the check fails and the not-found page renders.

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

    A Card Admin can only issue cards to existing workspace members — they cannot invite new ones. So we should stop offering the "invite a new member" option to non-admins in the assignee step.

    In AssigneeStep.tsx, gate the invite option on whether the current user can invite members (i.e. isPolicyAdmin(policy)):

    • Pass includeUserToInvite: isPolicyAdmin(policy) to usePersonalDetailSearchSelector (line 69-76).

    For a Card Admin, a searched non-member then simply yields no selectable row and the standard "no results" header message shows, instead of routing into the admin-only invite step. To match the issue's "better message" expectation, we can additionally show a tailored header message (e.g. a localized "Only existing members can be assigned a card" string) when the search has no member match and the current user isn't an admin.

    What alternative solutions did you explore? (Optional)

    • Keep the invite option visible but, on selecting a non-member, show an inline error/message instead of routing to INVITE_NEW_MEMBER when the user isn't an admin. This preserves discoverability but is more code than simply not offering the option.
    • Relax the WorkspaceInviteMessageComponent access wrapper to allow Card Admins — rejected, since Card Admins genuinely should not be able to invite members to the workspace.

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

  8. melvin-bot commented on Jun 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  9. melvin-bot commented on Jun 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  10. ShridharGoel commented on Jun 13, 2026

    @ShridharGoel
    Contributor

    Handled in #93478

  11. 21 remaining items

  12. melvin-bot commented on Jun 15, 2026

    @melvin-bot

    @flodnv @ShridharGoel 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]

  13. JmillsExpensify commented on Jun 16, 2026

    @JmillsExpensify
    Contributor

    I think perhaps that's fine... though maybe we want to update the message in a followup? What do you think @JmillsExpensify ?

    Coming back to this, if we are only going to show the list of existing members, I don't think we need to update the message. Let me know if I'm missing something though.

  14. Pujan92 commented on Jun 16, 2026

    @Pujan92
    Contributor

    Yes, we reverted the message update changes.

  15. JmillsExpensify commented on Jun 16, 2026

    @JmillsExpensify
    Contributor

    Cool, sounds good

  16. changed the title [-][Due for payment 2026-06-22] Not here page opens when card admin invites user to workspace when issuing card[/-] [+][Due for payment 2026-06-23] [Due for payment 2026-06-22] Not here page opens when card admin invites user to workspace when issuing card[/+] on Jun 16, 2026
  17. melvin-bot commented on Jun 16, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.8-3 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-23. 🎊

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

  18. melvin-bot commented on Jun 16, 2026

    @melvin-bot

    @flodnv @ShridharGoel 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]

  19. melvin-bot commented on Jun 18, 2026

    @melvin-bot

    @ShridharGoel Whoops! This issue is 2 days overdue. Let's get this updated quick!

  20. melvin-bot commented on Jun 22, 2026

    @melvin-bot

    @ShridharGoel 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  21. ShridharGoel commented on Jun 23, 2026

    @ShridharGoel
    Contributor

    Not overdue, can we close this?

  22. yuwenmemon commented on Jun 24, 2026

    @yuwenmemon
    Contributor

    Yep, I believe this is all set.

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