feat: Allow selecting a destination when importing (#14486)

* feat: allow selecting import destination

* fix: address import destination review findings

* feat: multi-step import dialog with workspace root location

- Import dialog is now upload then location, the same height as the move dialog
- Document explorer lists the workspace as the root and marks the selected row
- A document export with a sibling folder merges into one document, or becomes
  the collection overview when creating new collections
- Destination document checks now rely on the createChildDocument policy

* fix: delete archived imported documents and read legacy task inputs

- Deleting an import now removes the children of archived imported documents
- Tasks queued before the rename to rootExternalId are still assigned correctly
This commit is contained in:
Tom Moor authored and GitHub committed 2026-11-06 08:05:31 -05:00
1 parent d8667e4b19
commit fe50488c97
26 files changed
+2137 -407

No files matched your search

+3 -3
View File
@@ -44,7 +44,7 @@ const ATTACHMENT_NODE_TYPES = ["attachment", "image", "video"];
interface DiscoveredDocument {
externalId: string;
parentExternalId?: string;
collectionExternalId: string;
rootExternalId: string;
export: DocumentJSONExport;
children: DiscoveredDocument[];
}
@@ -418,7 +418,7 @@ export default class JSONAPIImportTask extends APIImportTask<Service> {
): DiscoveredDocument => ({
externalId: doc.id,
parentExternalId: parentExternalId ?? doc.parentDocumentId ?? undefined,
collectionExternalId: externalId,
rootExternalId: externalId,
export: doc,
children: [],
});
@@ -524,7 +524,7 @@ export default class JSONAPIImportTask extends APIImportTask<Service> {
return {
externalId: doc.externalId,
parentExternalId: doc.parentExternalId,
collectionExternalId: doc.collectionExternalId,
rootExternalId: doc.rootExternalId,
title: exported.title,
urlId: exported.urlId,
icon: exported.icon ?? exported.emoji,