[PR #7316] [CLOSED] fix(calendar): wrap desktop TransactionList in DisplayPayeeProvider #41511

Closed
opened 2026-04-23 14:18:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7316
Author: @Muhammad-Nur-Alamsyah-Anwar
Created: 3/29/2026
Status: Closed

Base: masterHead: fix/calendar-displaypayee-missing


📝 Commits (2)

  • d64bd6c fix(calendar): wrap desktop transaction list in DisplayPayeeProvider
  • 686e717 chore: add release note for #7316

📊 Changes

2 files changed (+59 additions, -51 deletions)

View changed files

📝 packages/desktop-client/src/components/reports/reports/Calendar.tsx (+53 -51)
upcoming-release-notes/7316.md (+6 -0)

📄 Description

Description

The Calendar report crashes with the following error when viewed on mobile (reproduced on Brave for Android):

Error: useDisplayPayee must be used within a DisplayPayeeContextProvider.
  at useDisplayPayee (useDisplayPayee.tsx)
  at TransactionList (TransactionList.BZNGq6qU.chunk.js)

Looking at Calendar.tsx, the mobile path already wraps TransactionListMobile in DisplayPayeeProvider using transactions={allTransactions}, but the desktop path renders TransactionList without any provider — even though TransactionList internally calls useDisplayPayee, which throws when the context is absent.

On some mobile browsers (e.g. Brave for Android), isNarrowWidth evaluates to false, so the desktop code path is taken and the crash happens.

The fix just mirrors what the mobile branch already does: wrap the desktop TransactionList in <DisplayPayeeProvider transactions={allTransactions}>.

Fixes #7108

Testing

Traced the component tree to confirm useDisplayPayee is called inside TransactionList, and that DisplayPayeeProvider was missing from the !isNarrowWidth branch. No dedicated test added — the bug is a missing provider wrap, which is not straightforward to unit-test without a full render environment; the existing E2E suite covers the Calendar report render path.

Checklist

  • Release notes added
  • No obvious regressions in affected areas
  • Self-review has been performed - I understand what each change in the code does and why it is needed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/7316 **Author:** [@Muhammad-Nur-Alamsyah-Anwar](https://github.com/Muhammad-Nur-Alamsyah-Anwar) **Created:** 3/29/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix/calendar-displaypayee-missing` --- ### 📝 Commits (2) - [`d64bd6c`](https://github.com/actualbudget/actual/commit/d64bd6c920bd7b4915fd5254f4f4c0baec1830b6) fix(calendar): wrap desktop transaction list in DisplayPayeeProvider - [`686e717`](https://github.com/actualbudget/actual/commit/686e7170abe4afcd3b9d19a10a0667e61faab4b6) chore: add release note for #7316 ### 📊 Changes **2 files changed** (+59 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/reports/reports/Calendar.tsx` (+53 -51) ➕ `upcoming-release-notes/7316.md` (+6 -0) </details> ### 📄 Description ## Description The Calendar report crashes with the following error when viewed on mobile (reproduced on Brave for Android): ``` Error: useDisplayPayee must be used within a DisplayPayeeContextProvider. at useDisplayPayee (useDisplayPayee.tsx) at TransactionList (TransactionList.BZNGq6qU.chunk.js) ``` Looking at `Calendar.tsx`, the mobile path already wraps `TransactionListMobile` in `DisplayPayeeProvider` using `transactions={allTransactions}`, but the desktop path renders `TransactionList` without any provider — even though `TransactionList` internally calls `useDisplayPayee`, which throws when the context is absent. On some mobile browsers (e.g. Brave for Android), `isNarrowWidth` evaluates to false, so the desktop code path is taken and the crash happens. The fix just mirrors what the mobile branch already does: wrap the desktop `TransactionList` in `<DisplayPayeeProvider transactions={allTransactions}>`. ## Related issue(s) Fixes #7108 ## Testing Traced the component tree to confirm `useDisplayPayee` is called inside `TransactionList`, and that `DisplayPayeeProvider` was missing from the `!isNarrowWidth` branch. No dedicated test added — the bug is a missing provider wrap, which is not straightforward to unit-test without a full render environment; the existing E2E suite covers the Calendar report render path. ## Checklist - [x] Release notes added - [x] No obvious regressions in affected areas - [x] Self-review has been performed - I understand what each change in the code does and why it is needed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 14:18:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#41511