You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Insight-CSV download is allowed in offline mode #104797
Version Number: V9.5.16-1 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:#103457 Email or phone of affected tester (no customers):dreamnitethedragon+vegst@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Redmi note 10s android 13 App Component: User Settings
Action Performed:
Pre-condition: Insightspage beta enable
Have few expense with different categories
Launch app
Open insights
Scroll to Top category
Enable forced offline via 4 finger gesture
Tap 3 dots next to Top category - download as csv
Expected Result:
Offline modal must be shown and user must not be allowed to download in offline.
👋 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:
Identify the pull request that introduced this issue and revert it.
Recommendation: Demote and close as expected behavior. No revert needed.
The auto-flagged PR is wrong. The behavior comes from Add local CSV downloads to Insights charts, which made offline download a deliberate choice. That PR has been in production since 9.5.15-3 (2026-10-21), behind the Insights beta. This is not a staging regression.
Intentional: The author said the local approach "allows for offline export of the data that's already available" (comment). The PR's offline test steps expect cached charts to export while offline.
Right owners:luacmartins (author), plus huult and mountiny (reviewers). The auto-assigned people for the gesture PR can be unassigned.
Mechanism
Permalinks at App 14248f22d4681ece36239f8b97ed95be7edcff12:
InsightsChartWidget.tsx:96-103: downloadCSV builds the CSV from data already on the device and calls localFileDownload. It makes no network request and has no isOffline check.
resolveInsightsChartData.ts:52-53: offline charts with cached data stay READY, so download stays available. Charts with no data become OFFLINE and hide the option.
This reverses a deliberate decision, so it needs sign-off from JmillsExpensify. The fix is small. In InsightsChartWidget.tsx:96, check useNetwork().isOffline at the top of downloadCSV. If offline, show the offline modal with showDecisionModal, using the Search export pattern, and return. Then update the offline test in tests/ui/InsightsChartWidgetTest.tsx.
Activity
applause-bot commentedon Oct 22, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/762531dab772fc648fb0cdee54c12e83c0f91d49c1f42db204526fdace2339a8
melvin-bot commentedon Oct 22, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #103457
melvin-bot commentedon Oct 22, 2026
@mountiny @QichenZhu @war-in you have been assigned to this deploy blocker because you reviewed the offending PR: #103457
melvin-bot commentedon Oct 22, 2026
@collectioneur you have been assigned to this deploy blocker because you authored the offending PR: #103457
melvin-bot commentedon Oct 22, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Oct 22, 2026
👋 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:
MelvinBot commentedon Oct 22, 2026
Deploy Blocker Investigation
Recommendation: Demote and close as expected behavior. No revert needed.
The auto-flagged PR is wrong. The behavior comes from Add local CSV downloads to Insights charts, which made offline download a deliberate choice. That PR has been in production since
9.5.15-3(2026-10-21), behind the Insights beta. This is not a staging regression.luacmartins(author), plushuultandmountiny(reviewers). The auto-assigned people for the gesture PR can be unassigned.Mechanism
Permalinks at App
14248f22d4681ece36239f8b97ed95be7edcff12:InsightsChartWidget.tsx:96-103:downloadCSVbuilds the CSV from data already on the device and callslocalFileDownload. It makes no network request and has noisOfflinecheck.InsightsChartWidget.tsx:127-136: the menu item shows only when the chart state isREADY.resolveInsightsChartData.ts:52-53: offline charts with cached data stayREADY, so download stays available. Charts with no data becomeOFFLINEand hide the option.This matches other exports generated on the device, such as company cards (
WorkspaceCompanyCardsTableControls.tsx:67-103). Exports that call the server do block offline, such as Search export (useSearchBulkActions.ts:1292-1295).If product wants offline download blocked
This reverses a deliberate decision, so it needs sign-off from
JmillsExpensify. The fix is small. InInsightsChartWidget.tsx:96, checkuseNetwork().isOfflineat the top ofdownloadCSV. If offline, show the offline modal withshowDecisionModal, using the Search export pattern, and return. Then update the offline test intests/ui/InsightsChartWidgetTest.tsx.view run
QichenZhu commentedon Oct 23, 2026
@luacmartins @huult could you take a look?
huult commentedon Oct 23, 2026
https://github.com/Expensify/App/pull/104272/changes#r4318989174 This is expected behavior. We can download it while offline.