Skip to content

Revert "[CP Staging] Revert "Align export condition with BE check""#82861

Merged
mountiny merged 1 commit intomainfrom
revert-82844-revert-81445-export-condition-rejected-to-submitter
Feb 18, 2026
Merged

Revert "[CP Staging] Revert "Align export condition with BE check""#82861
mountiny merged 1 commit intomainfrom
revert-82844-revert-81445-export-condition-rejected-to-submitter

Conversation

@luacmartins
Copy link
Contributor

Reverts #82844

@luacmartins luacmartins marked this pull request as ready for review February 18, 2026 21:06
@luacmartins luacmartins requested review from a team as code owners February 18, 2026 21:06
@luacmartins luacmartins requested a review from mountiny February 18, 2026 21:06
@melvin-bot melvin-bot bot requested review from carlosmiceli and heyjennahay and removed request for a team February 18, 2026 21:07
@melvin-bot
Copy link

melvin-bot bot commented Feb 18, 2026

@carlosmiceli 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]

@mountiny
Copy link
Contributor

Exact copy off #81445, QA and testing was done there

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

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

Files with missing lines Coverage Δ
src/CONST/index.ts 87.39% <ø> (ø)
src/libs/ReportPrimaryActionUtils.ts 91.74% <100.00%> (ø)
src/libs/ReportSecondaryActionUtils.ts 92.39% <100.00%> (ø)
src/components/MoneyReportHeader.tsx 0.00% <0.00%> (ø)
...onents/ReportActionItem/ExportWithDropdownMenu.tsx 0.00% <0.00%> (ø)
src/libs/ReportUtils.ts 75.20% <83.33%> (+0.08%) ⬆️
... and 15 files with indirect coverage changes

@mountiny mountiny merged commit 5d14d28 into main Feb 18, 2026
33 of 35 checks passed
@mountiny mountiny deleted the revert-82844-revert-81445-export-condition-rejected-to-submitter branch February 18, 2026 21:16
@melvin-bot melvin-bot bot added the Emergency label Feb 18, 2026
@melvin-bot
Copy link

melvin-bot bot commented Feb 18, 2026

@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@mountiny
Copy link
Contributor

Not an emergency, straight revert

Copy link

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

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: e0854c9c3a

ℹ️ 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 on lines +12260 to +12261
const isValidExport = originalMessage?.markedManually || (label && validExportLabels.has(label) && originalMessage?.type !== CONST.EXPORT_TEMPLATE);
if (isValidExport && action.created > lastSuccessfulExportCreated) {

Choose a reason for hiding this comment

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

P1 Badge Exclude in-progress export actions from success detection

In the fallback path (when report.isExportedToIntegration is missing), this treats any EXPORTINTEGRATION action with a known label as a successful export, but optimistic export actions are created with inProgress: true and those same labels (buildOptimisticExportIntegrationAction). That means a failed export sequence can still set lastSuccessfulExportCreated and return true, so reports that rely on action-based detection are misclassified as exported and didExportFail/retry flows are skipped.

Useful? React with 👍 / 👎.

const iconToDisplay = getIntegrationIcon(connectionName, expensifyIcons);
const canBeExported = canBeExportedUtils(report);
const isExported = isExportedUtils(reportActions);
const isExported = isExportedUtils(reportActions, report);

Choose a reason for hiding this comment

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

P2 Badge Avoid gating export confirmation on stale report flag

Passing report here causes isExported() to short-circuit to report.isExportedToIntegration, but exportToIntegration() / markAsManuallyExported() only add optimistic report actions and do not optimistically update that report-level flag. When the flag is present and still false, a second quick export click before server reconciliation bypasses the “export again” confirmation and can send duplicate export requests.

Useful? React with 👍 / 👎.

@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions
Copy link
Contributor

🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.22-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 cancelled 🔪
🍎 iOS 🍎 cancelled 🔪

@github-actions
Copy link
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
Built from App PR #82861.

Android 🤖 iOS 🍎
❌ FAILED ❌ https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-ios-device-AdHoc-5d14d28-3498e81-527decd614d880ec6d265a3ef2a086c6fbf3cfa8/index.html
The QR code can't be generated, because the Android build failed iOS
Web 🕸️
https://82861.pr-testing.expensify.com
Web

👀 View the workflow run that generated this build 👀

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.3.22-4 🚀

platform result
🕸 web 🕸 cancelled 🔪
🤖 android 🤖 success ✅
🍎 iOS 🍎 cancelled 🔪

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.3.22-4 🚀

platform result
🕸 web 🕸 failure ❌
🤖 android 🤖 success ✅
🍎 iOS 🍎 cancelled 🔪

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