You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Onboarding backup import still buffers the entire ZIP in memory #944
Issue #555 moved backup export/import/sync to bounded-memory streaming, including the native import path. However, the onboarding backup restore path still bypasses that transport.
In lib/src/onboarding_feature/steps/import_step.dart, _onZipSelected() currently does:
final bytes =awaitFile(filePath).readAsBytes();
...
request.add(bytes);
This loads the complete selected backup ZIP into memory before POSTing it to /api/v1/data/import.
By contrast, Settings > Data Management uses BackupTransferService.uploadZip(...), which streams the file and is aligned with #555.
This was noticed while triaging #918; it is not the cause of #918's too_many_entries rejection, but it is an inconsistency with the bounded-memory guarantees introduced by #555.
Expected behavior
All native Decaid backup-import entry points should use the same bounded-memory/streaming transport. Onboarding should not materialize a complete backup archive in a List<int> / Uint8List.
Suggested implementation
Reuse BackupTransferService.uploadZip(...) from the onboarding ZIP-import path instead of manually reading the file and constructing an HttpClient request.
Preserve current onboarding behavior:
POST to /api/v1/data/import?onConflict=skip;
convert the response through BackupImportResponse;
call persistenceController.notifyShotsChanged();
display the existing ImportResultView.
Keep error handling consistent with the Settings import path where practical.
Do not change the server-side archive limits or ZIP validation as part of this issue.
Acceptance criteria
Onboarding ZIP restore no longer calls File.readAsBytes() for the backup archive.
The selected ZIP is streamed/file-backed end-to-end using the existing backup transfer abstraction.
Activity