feat(library): pre-upload duplicate warning + admin cover audit#135
Closed
bndct-devops wants to merge 1 commit into
Closed
feat(library): pre-upload duplicate warning + admin cover audit#135bndct-devops wants to merge 1 commit into
bndct-devops wants to merge 1 commit into
Conversation
Upload dialog: files are sha256-hashed in the browser (sequential, 512MB cap) and checked via the existing POST /books/check-hashes before upload; exact duplicates show "already in your library" with a link and are skipped. The server already deduped silently — this saves the transfer and makes it visible. Hash-check failures degrade to the old behavior. Admin -> Covers (GET /admin/covers/audit): flags missing, unreadable, and low-res covers (PIL header reads only). The floor is 300px — the standard Google Books cover is 329px and fine in practice; the audit exists for the 98-128px thumbnails. Missing covers offer one-click auto-fix via the existing cover-candidates + set-cover endpoints (nothing to downgrade); low-res rows deep-link to the book's cover picker. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Overnight run PR 4/12 — stacked on #134; merge in order.
What
POST /books/check-hashesbefore sending. Byte-identical files get an amber "Already in your library — will be skipped" note with a link to the existing book. The server already deduped silently on upload; this saves the transfer and tells the user. If the check fails (offline), everything proceeds as before.GET /api/admin/covers/audit(admin-only) lists books with missing/unreadable/low-res covers, with dimensions. Threshold 300px — chosen after running against the real dev library: the standard Google Books cover is 329px and looks fine; the audit's real targets are the 98–128px thumbnails it found. Missing covers have a one-click auto-fix that applies the first cover-search candidate (safe: nothing to downgrade); low-res rows deliberately don't auto-fix (a blind refetch could downgrade) and deep-link to the book's cover picker instead.Verification