feat(upload): batch dedup-check + instant uploads + resilient parallel uploads
Backend:
- POST /api/dedup/check-batch — returns the subset of submitted whole-file
BLAKE3 hashes the caller already owns, in one query (user-scoped,
anti-enumeration via idx_files_blob_hash). Lets a client learn which of N
files it can skip with a single round trip.
(dedup_service::user_owned_blob_references, dedup_handler, routes) + tests.
Frontend — upload pipeline:
- Instant ("by-hash") upload for content the caller already owns: hash every
in-band file, ONE /api/dedup/check-batch, create the owned ones with zero
content bytes, upload only the rest. Covers all sizes below the 8 MB delta
threshold (delta handles larger files). vendor/hashWasm computes the
whole-file BLAKE3 on the main thread.
- Resilient parallel uploads: bounded concurrency (4) + a per-file deadline,
so one stuck/slow/failing file no longer freezes the whole batch — it blocks
only its own lane and times out / is skipped while the rest proceed. Quota
exhaustion stops the run early; partial results are reported ("N uploaded,
M failed").
- Folder uploads (uploadTree) show live bell progress + a final result and go
through the same dedup + parallel pipeline.
- Storage bar ("Almacenamiento") refreshes after uploads/deletes
(session.refresh) instead of showing the stale login value.
Frontend — i18n / UI fixes:
- Fix literal {{count}} and {{percentage}}/{{used}}/{{total}} (param-name
mismatches) in the selection toolbar and storage line; add es strings.
- Remove the underline on user-menu link rows.
Benchmark (uploadStrategies.bench.test.ts) compares baseline / per-file / batch:
the batch collapses N per-file probes into one check (e.g. a WAN 1000-file run
drops from 1700 to 1001 round trips) while matching per-file's byte savings.
Also includes in-progress group virtual-description i18n work present in the
working tree (groups.ts, ResourceList, locale `groups` keys).
Verified: cargo clippy -D warnings (clean), backend 448 tests; frontend
npm run check (clean), 58 unit tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -502,6 +502,8 @@
|
||||
"unfavorite": "Remove favorite",
|
||||
"uploaded": "Upload complete",
|
||||
"uploaded_saved": "Upload complete — {{mb}} MB deduplicated",
|
||||
"uploaded_partial": "{{ok}} uploaded, {{failed}} failed",
|
||||
"upload_failed": "Upload failed",
|
||||
"uploading": "Uploading…",
|
||||
"uploading_file": "Uploading {{name}}…",
|
||||
"uploading_n": "Uploading {{done}}/{{total}} files…",
|
||||
|
||||
@@ -367,7 +367,9 @@
|
||||
"share": "Compartir",
|
||||
"view": "Ver",
|
||||
"selected_count": "{{count}} seleccionados",
|
||||
"uploaded_saved": "Subida completa — {{mb}} MB deduplicados"
|
||||
"uploaded_saved": "Subida completa — {{mb}} MB deduplicados",
|
||||
"uploaded_partial": "{{ok}} subidos, {{failed}} fallaron",
|
||||
"upload_failed": "La subida falló"
|
||||
},
|
||||
"dialogs": {
|
||||
"rename_folder": "Renombrar carpeta",
|
||||
|
||||
Reference in New Issue
Block a user