Skip to content

Fix - Workspace chat - Export to NetSuite button still shows while an export is in progress - #100206

Open
FitseTLT wants to merge 16 commits into
Expensify:mainfrom
FitseTLT:fix-export-button-appearing-while-exporting
Open

FitseTLT wants to merge 16 commits into
Expensify:mainfrom
FitseTLT:fix-export-button-appearing-while-exporting

Conversation

@FitseTLT

@FitseTLT FitseTLT commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

The export button stayed visible during an export because nothing in Onyx recorded that an export was running. The optimistic isExportedToIntegration: true hid the button, but it also made the report look already exported, and the button could stay hidden once the real result came back.

This removes that optimistic write. A new isExportInProgress works out the running state from the report actions: it looks for a pending "started exporting" action with no errors, stamped with server time, and checks that no result came after it. A failure message, a finished export or an approval reset all count as a result. The header, the report preview and More → Export now hide the export while one is running, and it comes back as soon as the result arrives or the request fails.

Fixed Issues

$ #98025
PROPOSAL: #98025 (comment)

Tests

  1. Open a workspace with a NetSuite connection set up and auto-sync disabled.
  2. Open a workspace chat containing an expense report that is ready to export.
  3. Verify the green Export to NetSuite button is shown on the report preview.
  4. Click the button and confirm the export.
  5. Verify the button disappears immediately.
  6. Refresh the page while the export is still running.
  7. Verify the button is still hidden after the refresh, so it cannot be pressed a second time.
  8. Wait for the export to finish and verify the report shows as exported, with only one export action recorded.
  9. Repeat steps 2 to 5 against a connection that will fail, for example one with invalid currencies like ETB.
  10. Verify that once the failure is recorded the button comes back, and that re-exporting from it works.
  11. Take a report that has already failed to export before, press Export on it, and verify the button hides rather than staying pressable.
  12. Verify the button behaves identically when opened from the report header instead of the preview.
  • Verify that no errors appear in the JS console

Offline tests

Same as tests

QA Steps

Same as tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
2026-09-03.15-46-36.mp4
Android: mWeb Chrome
2026-09-03.16-12-26.mp4
iOS: Native
iOS: mWeb Safari
2026-09-03.16-14-24.mp4
MacOS: Chrome / Safari
2026-09-03.16-14-59.mp4

@FitseTLT
FitseTLT requested review from a team as code owners September 2, 2026 17:26
@melvin-bot
melvin-bot Bot requested review from joekaufmanexpensify and suneox and removed request for a team and joekaufmanexpensify September 2, 2026 17:26
@melvin-bot

melvin-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

@suneox Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot removed the request for review from a team September 2, 2026 17:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d06d5e51a

ℹ️ 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".

Comment thread src/libs/ReportUtils.ts Outdated
Comment thread src/libs/actions/Report/index.ts Outdated
@MelvinBot MelvinBot mentioned this pull request Sep 2, 2026
38 of 40 tasks
@codecov

codecov Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
...estReportPreview/useReportPreviewActionDecision.ts 100.00% <100.00%> (ø)
src/hooks/useExportActions.ts 73.68% <100.00%> (ø)
src/libs/ReportPreviewActionUtils.ts 92.56% <100.00%> (+0.12%) ⬆️
src/libs/ReportPrimaryActionUtils.ts 95.06% <100.00%> (+0.04%) ⬆️
src/libs/ReportSecondaryActionUtils.ts 96.38% <100.00%> (ø)
src/libs/actions/Report/index.ts 75.70% <100.00%> (+1.22%) ⬆️
src/libs/ReportUtils.ts 90.12% <58.33%> (+0.13%) ⬆️
... and 146 files with indirect coverage changes

@suneox

suneox commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
CleanShot.2026-09-09.at.11.38.15.1.mp4
Android: mWeb Chrome
CleanShot.2026-09-09.at.11.50.15.3.mp4
iOS: HybridApp
CleanShot.2026-09-09.at.11.58.50.5.mp4
iOS: mWeb Safari
CleanShot.2026-09-09.at.11.53.55.4.mp4
MacOS: Chrome / Safari
CleanShot.2026-09-09.at.11.26.27.1.mp4

Updated 2026-10-23 with latest main

Admin

CleanShot.2026-10-23.at.09.36.42.1.mp4

Member

CleanShot.2026-10-23.at.09.42.22.1.mp4
Automation Test case-01-1-before-repro-state-export-visible Test case-01-2-action-button-hidden-no-pay Test case-02-1-before-bank-netsuite-approved-export Test case-02-2-action-button-hidden-no-pay Test case-02-3-result-export-back-after-fail Test case-03-2-action-hidden-right-after-refresh Test case-03-3-result-export-back-after-fail Test case-04-1-before-submitted-report-approve-visible Test case-04-2-action-auto-export-window-t+2s Test case-04-3-result-export-shown-after-auto-fail

@suneox

suneox commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

An issue where the primary action doesn't match the preview is also happening on the latest staging (v9.4.74-0) and is unrelated to this PR. I'll investigate and raise a separate bug report for it.

CleanShot.2026-09-09.at.12.03.11.1.mp4

@suneox

suneox commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

@FitseTLT We have a bug with invited members assigned the workspace admin role: the Export button only shows up the first time they log in/clean cache

CleanShot.2026-09-09.at.12.40.06.1.mp4

@suneox

suneox commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@FitseTLT How about your troubleshooting for this issue?

@FitseTLT

Copy link
Copy Markdown
Contributor Author

Yeah reproduced will check thx

@FitseTLT

Copy link
Copy Markdown
Contributor Author

@suneox Yeah you found a gap on our implementation. As I have mentioned in my proposal this is a workaround solution and in the case of admin(which is neither owner nor preffered exporter) the BE doesn't update the errorFields of the report when it fails so the export will disappear with our current implementation. Two options we have

  1. Workaround: to depend on report actions to determine it (downside would be when they are not available)
  2. BE solution: the perfect solution would be the BE setting or giving us a pending field while it is exporting.

@FitseTLT

Copy link
Copy Markdown
Contributor Author

waiting on the above @suneox

@suneox

suneox commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Workaround: to depend on report actions to determine it (downside would be when they are not available)
BE solution: the perfect solution would be the BE setting or giving us a pending field while it is exporting.

I'll take another look tomorrow

@suneox

suneox commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

I lost track of this one on my K2, and I'll try to troubleshoot it tomorrow

@suneox

suneox commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

We have a bug with invited members assigned the workspace admin role:

@FitseTLT I just double check at 0:50 -> 1:04 the export action is still on the client side, and this only happens with invited members. We still receive the 'started export' and 'failed export' messages and then the export button doesn't reappear after receiving the failure message

@FitseTLT

FitseTLT commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

We have a bug with invited members assigned the workspace admin role:

@FitseTLT I just double check at 0:50 -> 1:04 the export action is still on the client side, and this only happens with invited members. We still receive the 'started export' and 'failed export' messages and then the export button doesn't reappear after receiving the failure message

Yeah @suneox as you know the solution we are implementing here uses the erroFields of the report but the BE sends differently when the user is owner/prefered exporter(in accounting setting I have check this BTW) and when the user is just an admin that's the root cause.

@suneox

suneox commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

the BE sends differently when the user is owner/prefered exporter(in accounting setting I have check this BTW) and when the user is just an admin that's the root cause.

@MelvinBot analyze this explanation and propose a solution.

@MelvinBot

Copy link
Copy Markdown
Contributor

Analysis

Root cause: FitseTLT's explanation matches the client code. For a workspace admin who isn't the preferred exporter, a failed export arrives only as the "failed to export" report action (INTEGRATIONS_MESSAGE). errorFields.export never changes for them. isExportInProgress ends the in-flight state only when that error count changes. So it stays true forever, and the snapshot lives in REPORT_METADATA, so it survives refreshes. That's why clearing the cache is the only thing that brings the button back. I couldn't confirm the backend side from the App repo, but the client code explains everything you saw.

Proposed fix: Also treat the export as finished when a new export-outcome report action shows up.

  1. In exportToIntegration, save the request time next to the count. For example, use {exportErrorCountAtRequest, exportRequestedAt: getServerAnchoredDBTime()}.
  2. Give isExportInProgress(report, reportMetadata, reportActions?) the report actions. Return false when either of these is true:
    • The error count changed (the current check).
    • reportActions contains a non-pending INTEGRATIONS_MESSAGE with created >= exportRequestedAt.
  3. In isExportAction, pass the reportActions it already receives.
  4. Optional: add a timeout as a safety net, so a lost Pusher event can't hide the button for good.

This keeps option 1 without its downside. A plain admin can only see Export in the header, and the header already has the report actions. The preview stays on the error-count check, which works there.

A backend "export pending" field (option 2) would still be cleaner long term. Raise that internally.

Why the preview isn't affected
  • canExport requires isPreferredExporter, so a plain admin never gets the preview Export button. Preferred exporters do get errorFields.export, so the count check already works for them.
  • isExportAction also lets admins through, so the bug only shows in the header. useReportPrimaryAction already gives it the expense report's actions, and they update live when the failure action arrives over Pusher.
  • Once the in-flight state ends, hasExportError already falls back to INTEGRATIONS_MESSAGE actions. So with auto-sync on, the button comes back without further changes.
  • Don't use EXPORTED_TO_INTEGRATION as the signal. The optimistic "started" action has that type and stays pending after a failure. Don't use report.lastVisibleActionCreated either: any comment changes it, which would bring the button back too early.
  • Related gap, not in this PR's scope: the Search EXPORT_TO_ACCOUNTING action doesn't check isExportInProgress.

Next steps: Reply with @MelvinBot <your feedback> to refine this.

@suneox

suneox commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

@FitseTLT Could you double-check and try to verify this approach?

@FitseTLT

Copy link
Copy Markdown
Contributor Author

@suneox Updated to the report actions approach and we don't need the count approach anymore. NOw it works from both sides.

@suneox

suneox commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

@suneox Updated to the report actions approach and we don't need the count approach anymore. NOw it works from both sides.

Thanks @FitseTLT the report actions approach is a real improvement, I can confirm this issue has been fixed

CleanShot.2026-10-23.at.09.42.22.1.mp4

@MelvinBot @codex review PR with the updated approach

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-23T03:52:00.997729Z
We couldn’t complete this review. Comment @codex review to try again.
e1777fd Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@MelvinBot

Copy link
Copy Markdown
Contributor

Review of the report-actions approach

The approach works and is simpler than the count snapshot. I'd fix one regression before merge. Three other items are worth a look.

1. The More menu can now fire a duplicate export, with no confirmation (fix before merge).
isExportInProgress gates the header primary action, the preview button, and Search. It does not gate the More → Export → "Export to NetSuite" option (ReportSecondaryActionUtils.ts:1229). On main, the optimistic isExportedToIntegration: true sent that click to the "export again" confirmation. This PR removes that write. If the server's isExportedToIntegration is false, isExported returns false. The click then goes straight to exportToIntegration (useExportActions.ts:220-224) and queues a second export while the first is still running.
Fix: Hide EXPORT_TO_INTEGRATION in the secondary menu while isExportInProgress(reportActions) is true. The surrounding function already has reportActions.

2. A request-level failure keeps the button hidden until the user dismisses the error.
failureData adds errors to the optimistic action, but pendingAction stays ADD (Report/index.ts:6769-6779). isExportInProgress still counts that action as a running export (ReportUtils.ts:14202).
Fix: Skip pending actions that have errors (isEmptyObject(action.errors)).

3. Client clock skew could strand the button (please verify).
The start time comes from the device clock (DateUtils.getDBTime()). The outcome time comes from the server. Suppose the device clock runs ahead of the server by more than the export takes. Then the failure message sorts before the start (ReportUtils.ts:14217), and the button never returns. The server may overwrite created on the optimistic action, which would avoid this. I couldn't confirm that from App code. To test, set the device clock about 2 minutes fast and run a failing export.

4. Every preview now subscribes to the full report-actions collection.
useReportPreviewActionDecision.ts:50 re-renders each preview on any action change, and Object.values builds a new array on every render.
Fix: Use useOnyx(key, {selector: isExportInProgress}) and pass a boolean into getReportPreviewAction.

Test nits

  • Two tests still set errorFields.export (ReportPreviewActionUtilsTest.ts:1467). That's left over from the count approach and no longer affects the result.
  • No test covers a reset action (for example, UNAPPROVED) resolving the attempt, a pending outcome being ignored, or the primary-action path (isExportAction).
  • The PR description still describes exportErrorCountAtRequest. Please update it.

view run

Comment thread src/libs/ReportUtils.ts Outdated
@suneox

suneox commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

@FitseTLT Almost done issue 1 also can be reproduce

CleanShot.2026-10-23.at.10.18.26.1.mp4

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Failed to set up container
ℹ️ 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".

@FitseTLT

Copy link
Copy Markdown
Contributor Author

@MelvinBot review

@MelvinBot

Copy link
Copy Markdown
Contributor

Re-review after "address comments"

Nearly ready. Items 1, 2, and 4 from my last review are fixed, and the new tests cover them. I'd still close item 3 before merge. All checks pass except Check independent approval.

Fixed

1. Clock skew can still hide the button for good (fix before merge).
The "started" action takes its created from the device clock (ReportUtils.ts:10391). The failure message takes the server's time. Suppose the device runs ahead of the server by more than the export takes. The failure then sorts before the start, and the button never returns. The pending action is saved in Onyx, so a refresh doesn't help.
Fix: In exportToIntegration, override action.created with getServerAnchoredDBTime() (NetworkState.ts:274). It already exists for this kind of comparison.

2. A successful export ends the attempt only if the server clears pendingAction (please verify).
isExportInProgress skips every non-pending EXPORTED_TO_INTEGRATION action (ReportUtils.ts:14407-14413). Success sends no INTEGRATIONS_MESSAGE. So the attempt ends only if the server rewrites the optimistic action and clears pendingAction. If it doesn't, More → Export stays hidden after a successful export, and you can't export again. To check, export successfully, then open More → Export.
Hardening: Count a non-pending EXPORTED_TO_INTEGRATION as an outcome (update lastExportResolvedCreated). That makes the result independent of how the server finalizes the action.

Nit

  • The PR description still describes exportErrorCountAtRequest and the error-count approach. Please update it to describe the report-actions approach.

@FitseTLT

Copy link
Copy Markdown
Contributor Author

@MelvinBot review

@MelvinBot

Copy link
Copy Markdown
Contributor

Re-review after the second "address comments"

Looks good to me. The latest commit fixes the open items from my previous review, and I found nothing new that blocks merge.

  • Clock skew: The "started" action now uses getServerAnchoredDBTime(), so it sorts against the server-stamped outcome correctly (Report/index.ts:7045).
  • Successful export: A non-pending EXPORTED_TO_INTEGRATION now ends the attempt. The result no longer depends on how the server finalizes the optimistic action (ReportUtils.ts:14418). Tests cover both the "later success resolves" and "earlier success doesn't resolve" cases.
  • PR description: It now describes the report-actions approach.

I also checked that "Mark as exported" still behaves correctly with the new outcome rule. Its pending action briefly counts as a running export. Then successData clears pendingAction, so it counts as an outcome. If the request fails, the action gets errors, so it's ignored.

Every check passes except Check independent approval. The perf tests are still running.

@FitseTLT
FitseTLT requested a review from suneox October 29, 2026 21:07

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants