Repository navigation
feat(desktop): live shelf ingest progress and failed-book removal - #6
Draft
cursor[bot] wants to merge 2 commits into
Draft
cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
Wire GET /api/books/events into the desktop library with a shared LibraryEventStream in @kinora/core. Book covers now show a live progress bar and stage label during Phase A ingest, block opening until ready, and surface upload errors from the API envelope. Also add Little Red Riding Hood as a second public-domain demo PDF. Co-authored-by: Rishabh Bansal <rishabhcli@users.noreply.github.com>
Add DELETE /api/books/{id} so readers can dismiss a failed import
after the gate toast tells them to. Failed book covers now show a
Remove button that clears the book from the library.
Co-authored-by: Rishabh Bansal <rishabhcli@users.noreply.github.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.
Summary
This PR addresses the biggest first-run UX gap on the library shelf: after uploading a book, Phase A ingest can take minutes but the apps were not wired to the backend's live progress channel.
Primary improvement: live ingest feedback on the shelf
LibraryEventStreamin@kinora/coreto subscribe toGET /api/books/events(SSEingest_progress)New open-source demo book
assets/books/build_little_red_cap_pdf.py— Little Red Riding Hood (Brothers Grimm, public domain)make demo-pdfnow builds both Frog-King and Little Red Riding Hood PDFsSecond improvement (from user testing)
Testing surfaced that the failed-import gate toast told users to "remove the book" but provided no way to do it.
DELETE /api/books/{id}(owner-only, cascades child rows)Verification
Manual walkthrough (local stack):
Backend impact
DELETE /api/books/{book_id}(204)BookRepo.delete()helpertest_delete_book_removes_from_shelfSummary by cubic
Adds live ingest progress to the desktop shelf and lets users remove failed imports. Also adds a second public‑domain demo book for testing.
@kinora/core:LibraryEventStreamsubscribes toGET /api/books/events(SSEingest_progress) and patches React Query caches.DELETE /api/books/{id}(owner‑only) removes the book and cascades child rows.make demo-pdfnow builds both demos.DELETE /api/books/{id}.Written for commit da289d3. Summary will update on new commits.