feat(upload): multi-file drag-and-drop upload with per-file name + bike - #4
Merged
Merged
Conversation
Rework UploadDialog into a multi-file flow (M1 + M2): - Drag-and-drop zone (and click-to-browse) accepting .fit/.tcx/.gpx/.gz, with dedupe by name+size. A single drop is just a one-row queue. - Queue of files; each row editable for name (pre-filled from filename) + bike; per-row remove and clear-all. - Sequential batch submit reusing the existing POST /api/uploads endpoint once per file; per-file status (uploading/done/error), i/n progress, and a completion summary. Dialog auto-closes on all-success, stays open on failure. - RidesList reloads on the existing 'uploaded' event. No backend changes: recompute_all(force=False) is incremental, so calling the single-upload endpoint per file is cheap. New i18n keys added (de + en).
…ction paths Adds tests/backend/routers/test_admin.py (M4): upload with name+bike_id persists correctly, upload without bike leaves it null, missing name defaults to the filename stem, unsupported extension -> 400, and a file with no track points -> 422.
Add a Multi-file upload feature bullet and correct the now-stale wording
('individual files' -> 'one or more'; drop the nonexistent '/import' UI
route reference).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reworks the upload dialog into a multi-file flow: drag-and-drop (or browse) multiple GPX/FIT/TCX files, edit each file's name and bike, then upload them sequentially. A single drop is just a one-row queue, so single-file upload still works.
Changes
frontend/src/lib/UploadDialog.svelte— multi-file queue + drop zone, per-row name/bike editing, sequential submit with per-file status + progress, auto-close on all-success (stays open on failure).frontend/src/lib/i18n.ts— new de/en keys.tests/backend/routers/test_admin.py— new tests forPOST /api/uploads(name+bike persistence, no-bike, default-name-from-filename, 400 bad extension, 422 empty file).README.md— document the feature; drop a stale/importroute reference.docs/plan-multi-upload.md— the plan.No backend changes:
recompute_all(force=False)is incremental, so reusing the single-upload endpoint per file is cheap.Validation
svelte-check: my files clean (the 3 remaining errors are pre-existing inRouteMap.svelte).Commits
feat(upload): multi-file drag-and-drop upload with per-file name + bike (M1+M2)feat(upload): honorprefers-reduced-motion(M3)docs: plan (M0)test(uploads): coverPOST /api/uploads(M4)docs(readme): document the feature (M5)