feat: live shelf ingest progress + shelf error feedback
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 (SSE ingest_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 importing- BookCover / BookCard — progress bar + percent on importing books; block opening until
ready
2. 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."
- Upload failures now surface the API error message in a dismissible banner
- Failed imports show an actionable banner (check
backend/.env/ API key) - Library load errors show "Can't reach Kinora" with retry instead of an empty shelf
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 LRRH
Other fixes
- Mobile reading room: fix
MetricsSheettypo, add Metrics button to header - Playwright
library.spec.tssmoke test (login → shelf → open book)
Verification
make install && make demo-pdf
pnpm --filter @kinora/core test
make app-typecheck
# With stack up + seed_e2e:
VITE_KINORA_API_URL=http://localhost:8000 make app-desktop-dev
# Upload a PDF and watch the shelf progress bar update live
Manual run-through: logged in as e2e@kinora.test, opened The Frog-King (e2e seed), exercised reading room + crew activity. Uploaded LRRH as demo@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
- Live ingest progress over SSE: subscribe to
/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. - Shelf error feedback: upload failures show the API message in a dismissible banner; failed imports show guidance (check
backend/.env/ API key); backend load errors show “Can’t reach Kinora” with a retry. - New demo book: adds
little_red_riding_hood.pdfandassets/books/build_little_red_riding_hood_pdf.py;make demo-pdfnow builds both demos. - Desktop E2E: Playwright smoke test for login → shelf → open seeded book.
- Live ingest progress over SSE: subscribe to
-
Bug Fixes
- Mobile reading room: fix
MetricsSheettypo and add a Metrics button to the header. - Desktop: correct
.gitignoreto ignoreapps/desktop/test-results/.
- Mobile reading room: fix