From 306f7700035a56d4bb6856f1b315fc3b5859d30c Mon Sep 17 00:00:00 2001 From: Vito Sansevero Date: Sat, 31 Oct 2026 17:11:37 -0700 Subject: [PATCH] docs(system): say what the #583 regression spec proves in each browser (#583) --- tests/browser/workspace-system-backups.spec.mjs | 3 ++- web/js/workspace/system-backups.mjs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/browser/workspace-system-backups.spec.mjs b/tests/browser/workspace-system-backups.spec.mjs index 0335e984..1ed52d22 100644 --- a/tests/browser/workspace-system-backups.spec.mjs +++ b/tests/browser/workspace-system-backups.spec.mjs @@ -287,7 +287,8 @@ test('a restore seen finishing elsewhere closes an open restore review and disca // #583: in WebKit, while a page.route is armed, a file part of a FormData body is read only when the request goes on; // a garbage collection in between dropped the form once nothing referenced it, and the server got an empty file // ("Uploaded file is empty"). The page keeps the form until its upload is answered. The route holds the upload -// through a collection, so the loss is certain rather than left to when the collector happens to run. +// through a collection; without the fix WebKit lost the file every time (0/10 in the pinned image). Chromium and +// Firefox keep the body anyway, so there it only checks that a held upload still opens the review. test('a review upload survives a garbage collection while it is in flight', async ({ page, request }) => { const bytes = await backupBytes(request); await page.route(`**${PREVIEW_URL}`, async route => { diff --git a/web/js/workspace/system-backups.mjs b/web/js/workspace/system-backups.mjs index 14831179..d25ed5cf 100644 --- a/web/js/workspace/system-backups.mjs +++ b/web/js/workspace/system-backups.mjs @@ -183,6 +183,7 @@ export function reviewRefusal(error) { * #583: the review uploads not answered yet. WebKit can read a FormData's file part after the fetch call returned (it * did whenever a request interceptor, here Playwright's, was armed); a garbage collection in between dropped a form * nothing referenced any more, and the server got an empty file. Each form is held here until its upload is answered. + * Exported for the unit tests only. */ export const uploadsInFlight = new Set();