Commit
Remove dead and legacy code (chunked uploads, dead endpoints, unused exports)
Commit details
Commit notes
The app is not live, so disabled/legacy systems and unreferenced code are deleted outright instead of being kept for compatibility.
Chunked/resumable upload system (disabled since the move to direct presigned uploads): - Delete the legacy /uploads/chunked/* routes, the chunk-assembly queue and its worker handler, chunk session state (Lua scripts, chunk-set tracking, progress/missing-chunk helpers, chunk-size heuristics), the chunk upload rate limit, and the orphaned-chunk cleanup stubs. - Delete the cleanup queue entirely — its only producer was the chunk-assembly handler. - UploadSession is now a minimal direct-upload record (no uploadMode, chunk counts, status machine, storagePrefix, or jobId); staleness is purely presigned-URL-expiry age. The completion lock is renamed accordingly (lockSessionForCompletion).
Upload endpoints with no consumers: - Remove GET /uploads (list), GET /uploads/:id/status, GET /uploads/:id/job, POST /uploads/batch/status, POST /uploads/cleanup, and DELETE /uploads/sessions. The kept surface is initiate, batch initiate, complete, abort, and check-duplicates. - Remove the matching frontend API functions, the five unconsumed upload hooks (single-file mutation, folder-as-pack mutation, session list/cleanup/force-delete), the uploads query keys, and the resumable-upload localStorage cleanup (nothing writes those keys).
Dead exports: - clap-client: embedText / embedAudioFromS3Key / embedAudioBytes (the classify endpoints are the live path). - similarity-search: cosineSimilarity / isPgVectorAvailable. - storage: the unused storage object + Storage interface, getProxyUrl, uploadParallel, the 5GB MAX_FILE_SIZE (the 500MB audio limit at initiate is the real gate), and unused config getters.
Docs updated to match (worker job list, uploads route description). Deliberately kept: calculateFileFingerprint / checkForDuplicates and the /uploads/check-duplicates endpoint — the duplicate-detection feature is functional server-side and awaiting UI wiring.
Co-Authored-By: Claude Fable 5 <[email redacted]> Claude-Session: [private session redacted]
- Files changed
- 22
- Lines added
- +234
- Lines removed
- −2,768