Repository navigation
feat: live shelf ingest progress + shelf error feedback - #9
Draft
cursor[bot] wants to merge 4 commits into
Draft
cursor[bot] wants to merge 4 commits into
cursor[bot] wants to merge 4 commits into
Conversation
Subscribe desktop and mobile shelves to GET /api/books/events so Phase-A import shows stage labels and a progress bar instead of a static chip. Add Little Red Riding Hood as a second bundled public-domain demo book. Co-authored-by: Rishabh Bansal <rishabhcli@users.noreply.github.com>
Show actionable banners when uploads fail, imports fail (e.g. bad API key), or the library cannot reach the backend. Fix mobile reading-room typo and add Metrics to the header. Add Playwright library smoke test. Co-authored-by: Rishabh Bansal <rishabhcli@users.noreply.github.com>
Co-authored-by: Rishabh Bansal <rishabhcli@users.noreply.github.com>
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 run-through of Kinora:
1. Live shelf ingest progress (large improvement)
The backend already exposed
GET /api/books/events(SSEingest_progress), but neither app subscribed. This wires it up end-to-end:LibraryEventsSourcein@kinora/core— EventSource client for the library SSE streamuseLibraryIngestEventshook on desktop + mobile — patches the React Query shelf cache with live stage + percent, with a 12s fallback poll while any book is importingready2. Shelf error feedback (from testing)
During testing, uploading Little Red Riding Hood failed ingest (invalid DashScope key) with only a dim "Import failed" chip and no guidance. Also, a backend outage reads as "bare shelves."
backend/.env/ API key)New open-source book
Added Little Red Riding Hood (Brothers Grimm, public domain) as a second bundled demo PDF:
assets/books/build_little_red_riding_hood_pdf.pyassets/books/little_red_riding_hood.pdfmake demo-pdfnow builds both Frog-King and LRRHOther fixes
MetricsSheettypo, add Metrics button to headerlibrary.spec.tssmoke test (login → shelf → open book)Verification
Manual run-through: logged in as
e2e@kinora.test, opened The Frog-King (e2e seed), exercised reading room + crew activity. Uploaded LRRH asdemo@kinora.local— ingest failed as expected with test API key; the new failed-import banner addresses that gap.Summary by cubic
Adds live ingest progress and clearer error feedback to the shelf on desktop and mobile, so users see import stages, percent, and actionable messages. Also bundles a second demo book and adds a desktop smoke test.
New Features
/api/books/eventsviaLibraryEventsSourcein@kinora/coreanduseLibraryIngestEvents(desktop + mobile). Shows stage + percent with a progress bar, auto-refetches on completion, and falls back to a 12s poll.backend/.env/ API key); backend load errors show “Can’t reach Kinora” with a retry.little_red_riding_hood.pdfandassets/books/build_little_red_riding_hood_pdf.py;make demo-pdfnow builds both demos.Bug Fixes
MetricsSheettypo and add a Metrics button to the header..gitignoreto ignoreapps/desktop/test-results/.Written for commit 874406f. Summary will update on new commits.