Skip to content

Invoice - "Hidden" is selected on recipient list instead of invoice chat #82459

Closed

Description

@lanitochka17

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?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #78354
Email or phone of affected tester (no customers): oisdjoisjdiojisojsd@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Invoice is enabled.
  • User has sent an invoice.
  1. Go to staging.new.expensify.com
  2. Open FAB > Send invoice.
  3. Enter amount > Next.
  4. Select invoice chat.
  5. On confirm page, click To field.
  6. Click RHP back button until you reach amount input page.
  7. Click Next.
  8. On confirm page, click To field.

Expected Result:

Invoice chat will be selected.

Actual Result:

"Hidden" is selected instead of invoice chat.
If user clicks on the "Hidden" chat, To field changes to Unavailable workspace.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7077213_1771009538538.2.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @eh2077

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 13, 2026
  2. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 13, 2026
  3. melvin-bot commented on Feb 13, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 13, 2026

    @melvin-bot

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

  5. melvin-bot commented on Feb 13, 2026

    @melvin-bot

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

  6. melvin-bot commented on Feb 13, 2026

    @melvin-bot

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

  7. melvin-bot commented on Feb 13, 2026

    @melvin-bot

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

  8. 5 remaining items

  9. marufsharifi commented on Feb 15, 2026

    @marufsharifi
    Contributor

    Proposal

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

    Invoice - "Hidden" is selected on recipient list instead of invoice chat

    What is the root cause of that problem?

    There is a data-shape mismatch for invoice participants after back navigation.

    getMoneyRequestParticipantsFromReport() stores invoice participant as reportID-only:

    App/src/libs/actions/IOU/index.ts

    Lines 12302 to 12311 in a93a316

    } else if (isInvoiceRoom(chatReport)) {
    participants = [
    {reportID: chatReport?.reportID, selected: true},
    {
    policyID: chatReport?.policyID,
    isSender: true,
    selected: false,
    },
    ];
    } else {

    But in formatSectionsFromSearchTerm(), invoice detection was too strict and expected accountID === 0 plus iouType === 'invoice':

    const selectedOptionsMapper = (participant: Participant) => {
    const isReportPolicyExpenseChat = participant.isPolicyExpenseChat ?? false;
    const isIOUInvoiceRoom = participant.accountID === CONST.DEFAULT_NUMBER_ID && !!participant.reportID && 'iouType' in participant && participant.iouType === 'invoice';
    if (participant.isSelfDM || isIOUInvoiceRoom) {
    const privateIsArchived = allReportNameValuePairsOnyxConnect?.[`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${participant.reportID}`]?.private_isArchived;
    return getReportOption(participant, privateIsArchived, undefined, currentUserAccountID, personalDetails, reportAttributesDerived);
    }
    return isReportPolicyExpenseChat
    ? getPolicyExpenseReportOption(participant, currentUserAccountID, personalDetails, reportAttributesDerived)
    : getParticipantsOption(participant, personalDetails);
    };

    So reportID-only invoice participants were not treated as report options and fell through to getParticipantsOption(), which has no login/accountID here and renders as Hidden.

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

    Use robust invoice detection in selected-option mapping by checking the actual report type from reportID (while keeping existing checks), so reportID-only participants are still handled as invoice rooms.
    Update this :

    const isIOUInvoiceRoom = participant.accountID === CONST.DEFAULT_NUMBER_ID && !!participant.reportID && 'iouType' in participant && participant.iouType === 'invoice';

    To This :

    const isIOUInvoiceRoom =!!participant.reportID &&((participant.isInvoiceRoom ?? false) ||(participant.accountID === CONST.DEFAULT_NUMBER_ID && 'iouType' in participant && participant.iouType === CONST.IOU.TYPE.INVOICE) ||isInvoiceRoom(getReportOrDraftReport(participant.reportID)));
    • Keep existing behavior for self-DM and invoice participants with full shape.
    • Add fallback: if participant has reportID and getReportOrDraftReport(reportID) is an invoice room, map with getReportOption().
    • This is targeted and low-risk because it only changes selected-row mapping logic.

    What alternative solutions did you explore? (Optional)

    Demo

    82459.mp4
  10. mountiny commented on Feb 15, 2026

    @mountiny
    Contributor

    Testing a revert here #82524

  11. melvin-bot commented on Feb 15, 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.

  12. m-natarajan commented on Feb 16, 2026

    @m-natarajan

    Issue not reproduce using v9.3.19-1 PR:82524

    Screen.Recording.2026-02-16.at.7.31.13.AM.mov
  13. melvin-bot commented on Feb 16, 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.

  14. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 16, 2026
  15. IuliiaHerets commented on Feb 16, 2026

    @IuliiaHerets

    @mountiny Chrome / v9.3.19-4
    Not repro

    Screen.Recording.2026-02-16.at.13.22.01.mp4
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.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions