MWPW-206368 - Fix cancel button stuck screen, stray redirects and extra assets - #902
Conversation
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
|
@DavidKHahn @Ruchika4 Still noticing the issue in branch. upload.mp4 |
hi @asonnalagi thanks for testing this edge case. In your video, Cancel button was clicked after the bar hit 100%. At that point the redirect to Acrobat has already started so landing on Acrobat's "Converting…" screen is expected (that screen is owned by the Acrobat web app). Please for now re-test by clicking Cancel before 100% using ?unitylibs=mwpw-206368-cancel-button-fix and make sure that parameter stays in the URL each time. Suggestion: as a follow-up, we could hide or disable Cancel once the bar reaches 100% so users aren't shown a cancel that can't take effect. I'll check with design.
|
16963ad to
c22ab00
Compare
|
Validated in the below URL.
End to end validation will be done on stage. |
…ra assets Fix browser test isolation and add transition-screen error coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
c22ab00 to
561a424
Compare
|

Summary
Cancel on Acrobat verb pages (pdf-to-word, excel-to-pdf, etc.) could intermittently stop returning the user to the drop zone after several upload → Cancel cycles, and could trigger stray redirects/reloads. Root causes were leftover state from previous (cancelled) uploads. Fixes in
workflow-acrobat/action-binder.jsandworkflow-acrobat/upload-handler.js:showTransitionScreen()now clears the previous instance's progress-bar timer before creating a newTransitionScreen.abortSignal.aborted || !isUploadingguard, mirroringuploadMultiFile())./api/v1/assetcreate + connector call (HAR showed 13 extra assets for 13 cancels). Timeouts still surface as errors (NetworkUtilsnever throwsAbortErrorfor them).handleRedirect()if the upload was cancelled meanwhile.continueInApp()bails out if Cancel clearedredirectUrlduring its 500 ms delay. Previously this reloaded the page to?UTS_Uploaded&redirectTime&undefined(droppingunitylibs=).cancelAcrobatOperation()clearsoperations, so a later event can't redirect with a cancelled upload's data.DCUnity:RedirectReadyis registered once instead of on everyacrobatActionMaps()call (listeners were stacking since [MWPW-170867]Wait for event dispatched from DC acom code to redirect to acrobat web #334).Test plan
upload-handler.test.js73/73,action-binder.test.js256/256 (new tests for every fix above)action-binder.js200QA instructions
One-time setup (Requestly)
Install the Requestly Chrome extension; in
chrome://extensions→ Requestly → Details → enable Allow in Incognito.Open https://app.requestly.io/rules → New rule → Redirect Request (no Requestly sign-in needed):
unity-902URL+RegEx→ paste exactly (including the slashes):It should look like this:
Test
action-binder.action-binder.jsshows 307 with Location onmwpw-206368-cancel-button-fix--unity--adobecom.aem.live(PR code is loaded).Expected: Cancel always returns to the drop zone; no unexpected redirect/reload, no error toast; final upload converts.
Notes: Cancel clicked after the redirect to Acrobat has started (100%) can't be stopped by the page — expected. If a "free account" sign-in wall appears, fully quit Chrome (Cmd+Q) and retry. Turn the Requestly rule off when done.
JIRA: https://jira.corp.adobe.com/browse/MWPW-206368