Skip to content

[Due for payment 2026-10-02] Invoice opened from Spend renders in narrow RHP instead of wide RHP #102008

Closed

Description

@MelvinBot

Action Performed:

  1. Go to Spend and filter to type:invoice.
  2. Click an invoice row.
  3. Observe the invoice view.
  4. Open the parent invoice chat and click the invoice report preview.
  5. Observe the invoice view again.

Expected Result: The invoice renders the same way regardless of where it's opened from.

Actual Result: Opened from Spend, the invoice renders in a narrow RHP and looks partially loaded. Opened from the invoice chat, it renders correctly as a wide RHP.

Root cause: Clicking a Spend row opens the Search report RHP at search/view/<reportID>. In src/pages/inbox/WideRHPReceiptPanel.tsx:69-75, shouldShowWideRHP only matches report?.type === CONST.REPORT.TYPE.EXPENSE or IOU, so an invoice report falls through and rhpWidth stays narrow.

Going via the invoice chat opens e/<reportID>?backTo=..., which renders through src/pages/inbox/ReportScreen.tsx:150 as an expense report route, which is why that path gets the wide layout.

Proposed fix: Include invoice reports in shouldShowWideRHP — for example add report?.type === CONST.REPORT.TYPE.INVOICE. Note isInvoiceReport is already imported and used at line 65 for isMoneyRequestOrInvoiceReport, so the multi-transaction super-wide branch already handles invoices; only the single-transaction wide branch misses them.

Platforms: Web (wide RHP is desktop-only).

Screenshots of the partially loaded vs. correctly loaded invoice are in the Slack thread and should be added as a comment here.

Reported in Slack.

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 23, 2026
  2. nkdengineer commented on Sep 23, 2026

    @nkdengineer
    Contributor

    Proposed fix: Include invoice reports in shouldShowWideRHP — for example add report?.type === CONST.REPORT.TYPE.INVOICE. Note isInvoiceReport is already imported and used at line 65 for isMoneyRequestOrInvoiceReport, so the multi-transaction super-wide branch already handles invoices; only the single-transaction wide branch misses them.

    @MelvinBot Implement the quoted solution.

  3. MelvinBot commented on Sep 23, 2026

    @MelvinBot
    ContributorAuthor

    🤖 Draft PR created: Render invoice reports in wide RHP when opened from Search

    Please mark it as "Ready for review" when it is ready for review.

    What changed: one line in src/pages/inbox/WideRHPReceiptPanel.tsx:75 — shouldShowWideRHP now also matches report?.type === CONST.REPORT.TYPE.INVOICE, so a single-transaction invoice opened from Search gets rhpWidth = 'wide' instead of falling through to narrow. The multi-transaction super-wide branch was already correct via isMoneyRequestOrInvoiceReport, so it is untouched.

                 report?.type === CONST.REPORT.TYPE.EXPENSE ||
    -            report?.type === CONST.REPORT.TYPE.IOU);
    +            report?.type === CONST.REPORT.TYPE.IOU ||
    +            report?.type === CONST.REPORT.TYPE.INVOICE);

    ⚠️ Not verified in a browser. Browser control was unavailable in this run, so the layout change is confirmed only by static analysis and local checks. The PR body has suggested test steps — please run them before marking it ready.

    Local checks run on the branch
    Check Result
    npx eslint src/pages/inbox/WideRHPReceiptPanel.tsx ✅ Pass
    npm run typecheck ✅ Pass (all projects)
    npm run react-compiler-compliance-check check src/pages/inbox/WideRHPReceiptPanel.tsx ✅ Pass
    npm test -- tests/unit/calculateSuperWideRHPWidthTest.ts ✅ Pass (4/4)
    npm run prettier ⚠️ Not run — the repo has no prettier config or prettier script; ESLint covers formatting and passed

    No test file references WideRHPReceiptPanel, so there was no existing unit test to extend.

    Because nkdengineer doesn't have push access to Expensify/App and I can't push to your fork, the branch lives on upstream. Instructions for moving it to your fork are in a comment on the PR.

  4. melvin-bot commented on Sep 23, 2026

    @melvin-bot

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

  5. changed the title [-]Invoice opened from Spend renders in narrow RHP instead of wide RHP[/-] [+][Due for payment 2026-10-02] Invoice opened from Spend renders in narrow RHP instead of wide RHP[/+] on Sep 25, 2026
  6. melvin-bot commented on Sep 25, 2026

    @melvin-bot

    @nkdengineer

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.93-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-10-02. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]

  7. 4 remaining items

  8. melvin-bot commented on Sep 30, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  9. melvin-bot commented on Oct 1, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  10. mallenexpensify commented on Oct 3, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @nkdengineer due $175 via NewDot

    @nkdengineer plz complete the Contributor+ checklist and tag me in a post once you have. Thx

  11. nkdengineer commented on Oct 7, 2026

    @nkdengineer
    Contributor

    Contributor+ Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: https://github.com/Expensify/App/pull/69875/changes#r4204449169

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template. Needed for all bugs AND new features

    Regression Test Proposal

    Precondition:

    Test:

    1. On a wide screen (web), go to Spend and filter to type:invoice.
    2. Click an invoice row.
    3. Verify the invoice opens in a wide RHP and renders fully.
    4. Open the parent invoice chat and click the invoice report preview.
    5. Verify the invoice renders the same way as in step 3.

    Do we agree 👍 or 👎

  12. nkdengineer commented on Oct 7, 2026

    @nkdengineer
    Contributor

    @mallenexpensify I completed the BZ checklist.

  13. twisterdotcom commented on Oct 30, 2026

    @twisterdotcom
    Contributor

    $175 approved for @nkdengineer in Report ID: R00AEZwhfU8x.

    Zapier Logs Run ID: 00040eee-af2c-aa27-9eac-0adc874577f4

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions