Skip to content

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

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

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

Conversation

@cursor

@cursor cursor Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

Summary

Two UX improvements from a full user walkthrough, plus a second public-domain demo book.

1. Live ingest progress on the shelf (large UX improvement)

The backend already exposes GET /api/books/events with ingest_progress SSE events, but neither app subscribed. This PR wires it end-to-end:

  • @kinora/core: LibraryEventSource, subscribeLibraryIngest, applyIngestProgress, ingestStageLabel, formatIngestPercent
  • Desktop + mobile shelves: subscribe on mount, patch the React Query books cache in real time, show progress bars + stage labels on importing covers
  • Upload errors: desktop shelf now surfaces API failure messages instead of failing silently

2. Guard non-ready books (feedback-driven improvement)

Testing showed users could open books still importing (or failed), landing in a broken reading room. Ready books open normally; importing/failed books are non-interactive with clear status chips.

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

  • assets/books/build_little_red_riding_hood.py — second Brothers Grimm public-domain demo PDF (5 pages, selectable text, vector art)
  • backend/scripts/seed_library.py — seeds both Frog-King and LRRH via the real upload flow
  • make demo-pdfs / make seed-library Makefile targets

Testing

make demo-pdfs
pnpm --filter @kinora/core test          # 168 passed
pnpm --filter @kinora/desktop typecheck

# Backend + walkthrough (local infra)
make migrate
uvicorn app.main:app --port 8000
backend/.venv/bin/python scripts/seed_e2e.py
pnpm --filter @kinora/desktop dev        # renderer at :5173

Manual walkthrough (browser renderer at :5173):

  • Login: e2e@kinora.test / e2e-password-123
  • Shelf shows ready Frog-King + failed/importing LRRH with status badges
  • Ready book opens reading room; failed book does not open
  • Navigation back to library works
Open in Web View Automation 

Summary by cubic

Adds live ingest progress to the shelf and disables opening books until they’re ready, improving feedback during imports. Also adds the Little Red Riding Hood demo book with scripts to build and seed the library.

  • New Features
    • Live ingest progress via GET /api/books/events SSE:
      • @kinora/core: LibraryEventSource, subscribeLibraryIngest, applyIngestProgress, ingestStageLabel, formatIngestPercent (+ tests).
      • Desktop/mobile shelves subscribe, patch the React Query cache in real time, and show progress bars + stage labels; invalidate when ready/failed.
    • Guard non‑ready/failed books:
      • Covers show status chips; clicks/taps are disabled until status is ready with clearer accessibility labels.
    • Upload errors on desktop:
      • File uploads now surface API error messages instead of failing silently.
    • New demo content and tools:
      • assets/books/build_little_red_riding_hood.py and bundled PDF.
      • backend/scripts/seed_library.py seeds Frog‑King + LRRH through the real upload flow.
      • Make targets: demo-pdfs, seed-library.

Written for commit d22ebcf. Summary will update on new commits.

Review in cubic

cursoragent and others added 2 commits June 23, 2026 18:23
Wire the existing GET /api/books/events SSE channel into @kinora/core with
LibraryEventSource, applyIngestProgress helpers, and ingest stage labels.

Co-authored-by: Rishabh Bansal <rishabhcli@users.noreply.github.com>
Add a second bundled Grimm fairy tale PDF builder, seed_library script, and
make demo-pdfs/seed-library targets alongside The Frog-King.

Co-authored-by: Rishabh Bansal <rishabhcli@users.noreply.github.com>
rishabhcli added a commit that referenced this pull request Jun 26, 2026
Per-agent deliverables, follow-ups (lucide retained-not-dead, vitest hygiene, A3 http
convergence), and a recommended grouped squash plan overnight/integration → main for
operator review (migrations e843aa7682b2 → d9e2f4a6b8c1). Do not push to main without OK.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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