Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openspec/changes/let-home-take-anything/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 0 additions & 2 deletions src/app/exomem/home/__tests__/home-import.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
16 changes: 9 additions & 7 deletions src/app/exomem/home/home-import.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -928,11 +929,12 @@ export function ImportDocuments({
cancel the import.
</p>
)}
{measuring && measured === null && (
<p className={dialog.text} role="status">
Measuring the encrypted copy…
</p>
)}
{selection.files.length > 0 &&
(labelPending || (measuring && measured === null)) && (
<p className={dialog.text} role="status">
Measuring the encrypted copy…
</p>
)}
{measured && "failed" in measured && (
<p className={dialog.text} role="alert">
{measured.failed}
Expand Down
Loading