Skip to content

feat(core): live shelf ingest progress + Little Red Riding Hood demo book - #7

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/user-experience-and-testing-16eb
Draft

cursor[bot] wants to merge 2 commits into
mainfrom
cursor/user-experience-and-testing-16eb

Conversation

@cursor

@cursor cursor Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

Summary

Implements live shelf ingest progress (the largest UX gap: users could upload a book and see a frozen "Preparing" chip with no feedback) and adds a second public-domain demo book.

Primary improvement: live ingest progress on the shelf

  • LibraryEventStream subscribes to GET /api/books/events (SSE) for ingest_progress events
  • Poll fallback every 5s while any book is importing
  • Progress bars + stage labels on desktop BookCover and mobile BookCard
  • Import gate prevents opening non-ready books with a clear dialog
  • Upload error messages on the desktop shelf toolbar

New open-source book

  • Little Red Riding Hood (Brothers Grimm, public domain) — assets/books/little_red_riding_hood.pdf + build_little_red_riding_hood_pdf.py
  • make demo-pdf builds both fairy tales; make seed-demo-books seeds both through the real ingest flow

Second improvement (from user walkthrough)

  • displayBookTitle() strips internal (e2e seed) suffixes from shelf UI
  • Shelf metrics button hidden outside dev builds (was exposing §13 eval tooling to readers)
  • Sign-out confirmation on desktop library
  • Mobile demo login aligned with demo@kinora.local credentials

Verification

make install && make demo-pdf
pnpm --filter @kinora/core test
make app-typecheck
make stack-up && make seed-demo-books   # full stack
make app-desktop-dev                    # walkthrough at :5173

Walkthrough tested

  • Onboarding → demo login → library with two books → reading room (PDF + cinema) → Director tab → back to shelf
Open in Web View Automation 

Summary by cubic

Adds live ingest progress to the library shelf with SSE and a 5s poll fallback, showing progress bars and stage labels on desktop and mobile. Also adds the public‑domain “Little Red Riding Hood” demo book and polishes shelf UX.

  • New Features

    • Live ingest: LibraryEventStream subscribes to /api/books/events (SSE) with a 5s poll fallback; shelf shows progress bars and stage labels on desktop BookCover and mobile BookCard.
    • Import gate: blocks opening non‑ready books with a clear dialog/alert; upload errors appear in the desktop shelf toolbar.
    • Core helpers/events: added displayBookTitle, stageLabel, progressPercent, importGateMessage; extended ingest_progress payload to include stage and pct; added tests.
    • Demo content: added “Little Red Riding Hood” PDF and builder; make demo-pdf builds both demos; make seed-demo-books seeds both via the real ingest flow.
    • UX polish: hides shelf metrics outside dev; adds sign‑out confirmation on desktop; aligns mobile demo login to demo@kinora.local.
  • Migration

    • Build demo PDFs: make demo-pdf
    • Seed both demos (optional): make seed-demo-books
    • Mobile demo login: demo@kinora.local / demo-password-123

Written for commit 9b884ac. Summary will update on new commits.

Review in cubic

cursoragent and others added 2 commits June 23, 2026 21:08
- Add LibraryEventStream, shelf helpers, and useLibraryEvents hooks
- Show progress bars and stage labels on desktop/mobile book covers
- Gate opening non-ready books with clear messaging
- Surface upload errors on the desktop shelf toolbar
- Add Little Red Riding Hood public-domain demo PDF + seed-demo-books
- Align mobile demo login with seed-demo credentials

Co-authored-by: Rishabh Bansal <rishabhcli@users.noreply.github.com>
- Strip internal (e2e seed) suffixes via displayBookTitle()
- Hide shelf metrics button outside dev builds
- Confirm before sign-out on desktop library
- Parameterize seed_e2e with book/email/password for demo user

Co-authored-by: Rishabh Bansal <rishabhcli@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant