Skip to content

MWPW-194184: Fix cancel on 2nd Generate redirecting to Firefly instead of a.com#768

Merged
sanjayms01 merged 3 commits into
stagefrom
MWPW-194184
May 9, 2026
Merged

MWPW-194184: Fix cancel on 2nd Generate redirecting to Firefly instead of a.com#768
sanjayms01 merged 3 commits into
stagefrom
MWPW-194184

Conversation

@sanjayms01
Copy link
Copy Markdown
Collaborator

  • Reset assetId in cancelUploadOperation so subsequent Generate calls re-upload the asset with proper AbortController support rather than skipping to continueInApp with a stale assetId and no cancellation hook.

Resolves: MWPW-194184

Test URLs:

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented May 6, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@asonnalagi
Copy link
Copy Markdown
Collaborator

Looks fine in the branch URL.
Test results are in the task: MWPW-194184

Sanjay Saravanan and others added 2 commits May 8, 2026 22:14
…d of a.com

Reset assetId in cancelUploadOperation so subsequent Generate calls re-upload
the asset with proper AbortController support rather than skipping to continueInApp
with a stale assetId and no cancellation hook.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…refly on Windows

Two guards added to handle cancellation at every phase of the Generate flow:

1. continueInApp(): check promiseStack before redirect — prevents Firefly redirect
   when cancel fires during the connector POST (fast-network / Windows case where
   upload completes before the user clicks cancel).

2. uploadAsset(): check signal.aborted after asset-creation POST — closes a race
   where cancel fires during the signalless first POST, causing assetId to be
   re-set after cancelUploadOperation already nulled it, which would skip the
   upload on the next Generate and reproduce the original bug.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The handleVerbLinkClick beforeEach was passing the shared workflowCfg by
reference, allowing tests that replace targetCfg to corrupt shared state and
break subsequent tests that depend on limits being set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sanjayms01 sanjayms01 merged commit 6e23d79 into stage May 9, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Something isn't working doodlebug2.1 verified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants