diff --git a/openspec/changes/let-home-take-anything/tasks.md b/openspec/changes/let-home-take-anything/tasks.md index fa79cfb5..253ce547 100644 --- a/openspec/changes/let-home-take-anything/tasks.md +++ b/openspec/changes/let-home-take-anything/tasks.md @@ -13,5 +13,5 @@ ## 4. Delivery -- [ ] 4.1 Run the Playwright import spec against the shared golden fixture, the independent review and the merge, after a cell release with `file-imports-on-the-cell`. +- [x] 4.1 Run the Playwright import spec against the shared golden fixture, the independent review and the merge, after a cell release with `file-imports-on-the-cell`. - [ ] 4.2 On real phones (iOS Safari, Android Chrome), import photos into a sandbox cell and confirm that they are filed with their origin. This needs the operator's hands. diff --git a/src/app/exomem/home/__tests__/home-import.test.tsx b/src/app/exomem/home/__tests__/home-import.test.tsx index e99f026d..a00bfed8 100644 --- a/src/app/exomem/home/__tests__/home-import.test.tsx +++ b/src/app/exomem/home/__tests__/home-import.test.tsx @@ -281,8 +281,6 @@ it("a labelled folder upload states the label and the device in the series file, await page.choose(folder("Workspace", 3), "Folder to add"); await page.until(() => page.button("Encrypt and upload"), "the preflight"); await page.type("Where is this from?", "Notion export"); - // The label settles into the series file, and the preflight measures that archive again. - await act(() => new Promise((resolve) => setTimeout(resolve, 500))); await page.click("Encrypt and upload"); await page.until(() => page.text().includes("Checking and staging your files."), "acceptance"); diff --git a/src/app/exomem/home/home-import.tsx b/src/app/exomem/home/home-import.tsx index 2f253d4b..70f35018 100644 --- a/src/app/exomem/home/home-import.tsx +++ b/src/app/exomem/home/home-import.tsx @@ -415,17 +415,18 @@ export function ImportDocuments({ () => (parts ? selectImportFiles(parts, include) : null), [parts, include] ); + const labelPending = label !== settledLabel; // The archive is the series file and the selection; the series file asks the cell to file it. const archive = useMemo( () => - parts && selection && selection.files.length > 0 + !labelPending && parts && selection && selection.files.length > 0 ? importArchive( selection, selectionCollection(parts), uploadOrigin(navigator, settledLabel) ) : null, - [parts, selection, settledLabel] + [labelPending, parts, selection, settledLabel] ); // Creation is idempotent only for the same declaration, so a resumed selection must match it. const matches = @@ -928,11 +929,12 @@ export function ImportDocuments({ cancel the import.

)} - {measuring && measured === null && ( -

- Measuring the encrypted copy… -

- )} + {selection.files.length > 0 && + (labelPending || (measuring && measured === null)) && ( +

+ Measuring the encrypted copy… +

+ )} {measured && "failed" in measured && (

{measured.failed}