Repository navigation
feat: live shelf ingest progress + import gate for non-ready books - #5
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
Subscribe desktop shelf to GET /api/books/events for real-time ingest stage/pct updates, with polling fallback until books reach ready/failed. Mobile polls while importing (no EventSource). Add Little Red Riding Hood as a second bundled public-domain demo PDF. Co-authored-by: Rishabh Bansal <rishabhcli@users.noreply.github.com>
Walkthrough showed failed imports opened into a normal reading room with no explanation. Gate importing/failed books on the shelf with a clear dialog; show the same message if the reading-room route is hit directly. Load electron-liquid-glass via dynamic require so Linux builds start. 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
Two UX improvements from a full user walkthrough of the Kinora desktop app:
1. Live shelf ingest progress (large improvement)
The backend already exposes
GET /api/books/events(SSE) foringest_progress, but the shelf never subscribed — import status chips froze until manual refresh.LibraryEventStreamin@kinora/corewith cache patching helpersimportingCanon · 42%)2. Import gate for non-ready books (from testing feedback)
Walkthrough found that books with IMPORT FAILED opened into a normal reading room with no error — users couldn't tell anything was wrong.
importing/failedbooks from the shelf with a clear dialog (desktop + mobile)@kinora/core(importGateMessage)Bonus
assets/books/little_red_riding_hood.pdf)electron-liquid-glassvia dynamicrequire(graceful skip when native module unavailable)Verification
Manual walkthrough: login as
e2e@kinora.test, confirm live import chips, tap failed Little Red Riding Hood → import gate dialog instead of reading room.New book
Public-domain Grimm tale built with
assets/books/build_little_red_cap_pdf.py(5 pages, 3 characters for canon lock).Summary by cubic
Adds live import progress to the shelf and blocks opening books that aren’t ready. Users see real-time stage and percent, and get a clear gate for importing or failed books.
New Features
GET /api/books/eventsviaLibraryEventStreamin@kinora/corewith a 3s poll fallback; mobile polls while importing. Status chips show “Stage · %”.importing/failedbooks on the shelf and in the reading room. Desktop dialog and mobile sheet use shared copy viaimportGateMessagein@kinora/core.make demo-pdfnow builds it.Bug Fixes
electron-liquid-glasswith dynamicrequirewhen the native module isn’t available.Written for commit 647b83e. Summary will update on new commits.