feat(desktop): Read/Watch toggle, Little Red Riding Hood, shelf upload feedback

Draft
CU
5mo ago
+783-79

Summary

This PR delivers three user-experience improvements identified from a full walkthrough of the Kinora desktop app, plus a second bundled public-domain demo book.

1. Desktop Read/Watch toggle (large UX fix)

On viewports below 1024px, the reading room previously hid the cinema panel entirely (hidden lg:block), so resized Electron windows and smaller laptops only showed the PDF. The desktop app now mirrors mobile: a Read / Watch segmented control switches between the reading column and the film pane, while wide layouts keep the familiar side-by-side split.

2. New open-source book: Little Red Riding Hood

Adds a second Brothers Grimm public-domain demo book (assets/books/little_red_riding_hood.pdf) with the same demo-friendly shape as The Frog-King (title + four story pages, three characters, selectable text, vector illustrations). Also adds:

  • assets/books/build_all_books.py — builds every bundled book
  • backend/scripts/seed_library.py — seeds the full library via API or direct ingest
  • make seed-library Makefile target

3. Shelf upload & ingest feedback (follow-up from testing)

  • Success/error banners after upload (no more silent failures)
  • Library polls every 3s while any book is importing so stage chips update live
  • Books that are not ready cannot be opened; importing/failed covers show cursor-not-allowed

Testing

Manual walkthrough (browser against Vite dev server + local API):

  • Login → library → open book → reading room side-by-side at wide width
  • Resize to ~900px → Read/Watch toggle appears and switches between PDF and cinema
  • Widen again → side-by-side layout returns
  • Demo user shelf shows Little Red Riding Hood with import-failed badge; cover is not openable
make demo-pdf
make app-typecheck   # desktop passes
pnpm --filter @kinora/desktop typecheck

Backend seed (requires stack + DashScope key for real ingest):

make stack-up
make seed-library
Open in Web View Automation 

Summary by cubic

Adds a Read/Watch toggle for narrow desktop windows, bundles the “Little Red Riding Hood” demo book, and improves shelf upload feedback with live ingest updates.

  • New Features

    • Desktop: Read/Watch segmented toggle below 1024px; wide layouts stay side‑by‑side; selection persists.
    • Shelf: Clear success/error banners after upload; library polls every 3s while any book is importing; books not ready can’t be opened and show a not‑allowed cursor.
    • Content: Adds the public‑domain “Little Red Riding Hood” demo book.
  • Migration

    • Rebuild bundled demos: run make demo-pdf.
    • Seed all demos into a local stack: run make seed-library (optionally SEED_ARGS='--via direct').