bulk-import-engineering
Bulk Import Engineering
Keep validation, preview, execution, and status tied to the same import operation.
When the import or export runs against client-side storage rather than a server, follow local import and export.
Trace the server contract
Before changing the flow, inspect the backend contract for validation, execution, status, retries, permissions, and concurrent submissions, and trace how the selected file and options are tied to the validation result and preview. Build on existing capabilities and surface gaps; the UI never defines server behavior, so invent no endpoints.
Bind preview to its inputs
A preview is valid only for the file contents and options that were validated; replacing or editing either requires validating again before execution. Execution is an explicit action after review, and validation and preview commit nothing.
If preview rows are editable, establish how the server validates the edited revision and binds execution to it. Ignore obsolete validation responses so an earlier selection cannot replace the current preview.
Represent pending, in-progress, successful, partial, and failed outcomes, and define retry and reset (failed items or the whole operation), from the server contract. Imports are not necessarily atomic, and a lost response does not prove that no work occurred.