[CP Stg] Fix Export to QuickBooks Online showing only after reopening report#91233
Conversation
MarkExportFailed updates errorFields.export in real time but not hasExportError. Treat active export errorFields as a failure signal so the Export to QuickBooks Online action appears without reopening. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@roryabraham is this PR ready for review? I can review it since I was the C+ on the offending PR. |
|
@roryabraham please fix the failing TS. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMonosnap.screencast.2026-05-21.03-44-25.mp4 |
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Use as unknown as Report for fixtures with errorFields to avoid TS2352 overlap errors. Co-authored-by: Cursor <cursoragent@cursor.com>
|
🚧 @roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
applause confirmed this fixes the issue: #91153 (comment) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b03a443cb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (report?.hasExportError) { | ||
| return true; | ||
| } |
There was a problem hiding this comment.
Honor explicit false export-error state
The new truthy check (if (report?.hasExportError)) no longer treats hasExportError: false as authoritative, so execution falls through to the report-action fallback and marks the report as errored whenever any historical INTEGRATIONS_MESSAGE exists. Because report actions are historical/append-only while isExported() is reset by later submit/reopen actions, this can incorrectly produce !isExported && hasExportError after a reopen cycle and block normal pay/export action selection for reports that no longer have an active export error.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
hasExportError: false wouldn't fall through to the next block.
|
not sure why claude review is failing, but it's not related. Merging |
|
@roryabraham looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
Fix Export to QuickBooks Online showing only after reopening report (cherry picked from commit 3a5f14b) (cherry-picked to staging by roryabraham)
|
🚀 Cherry-picked to staging by https://github.com/roryabraham in version: 9.3.78-1 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes required. This PR is a bug fix to internal error-detection logic ( No user-facing text, UI labels, workflows, settings, or error messages were changed. The existing FAQ in |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.78-1 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/roryabraham in version: 9.3.79-1 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is a pure bug fix in internal error-detection logic ( The change doesn't alter any user-facing feature, workflow, UI label, setting, or documented behavior — it fixes the timing of when an existing button becomes visible. The existing QBO export error troubleshooting articles describe error codes and resolution steps, which remain accurate and unaffected. |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.79-4 🚀
|
Explanation of Change
When QBO auto-export fails,
MarkExportFailedmergeserrorFields.exportonto the report in real time but does not updatehasExportError. After #90154,hasExportError()trusted a stalehasExportError: falsefrom the initial OpenApp payload and hid the Export primary action until the report was reopened.This change treats active
errorFields.export(and existing integration-message fallbacks) as export failures, so Export to QuickBooks Online appears immediately after auto-export fails.Fixed Issues
$ #91153
Tests
Offline tests
N/A — export failure state is delivered via Onyx updates when online.
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari
Made with Cursor