[Feature]: Desktop app: books reader

Open
#94 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust, typescript

Research direction

Read the epic #80 and its prerequisites #82 and #83, then use the web reader files under web/src/books/ and the routes/book.$id.tsx and routes/read.$id.tsx routes as the specification. Start by porting packages/shared/src/books.ts and its books.test.ts tests to Rust. Done means long EPUB and FB2 books read like they do on the web, positions sync to the same sentence across window sizes, and quotes sync between web and desktop.

Written by the indexing model from the issue text.

Description

enhancement

[!NOTE]
This issue was written by Claude (Claude Opus 5.5) from a planning session with @PhrolovaMoe. Part of #80, builds on #82 and #83. Read the epic first.

Area

Desktop app

Problem

The web has a novel reader with positions shared across devices and quotes (highlights stored as clips). It's part of parity.

Proposed solution

The web is the spec: web/src/books/ (Library.tsx, Reader.tsx, components.tsx, focus.ts, quotes.tsx), routes/book.$id.tsx, routes/read.$id.tsx.

  • Port packages/shared/src/books.ts to Rust with its tests (books.test.ts): the content model (/api/books/{id}/content JSON, with style flags BOLD, ITALIC… as bits) and positions counted in characters of text, so the same position lands on the same sentence on web, Android and desktop, at any size.
  • Layout and text with iced's text stack (cosmic-text), in Geist and whatever font choices the web reader offers. Images through /api/books/{id}/files/{*name}, covers through /api/books/{id}/cover.
  • Every reading mode and setting the web reader has (paging/scrolling, sizes, margins, themes within the app's scheme), the focus behaviour of focus.ts, and keyboard navigation.
  • Progress: the same mutations and cadence as the web, so switching devices continues where you were.
  • Quotes: selecting text and saving a quote (a highlight stored as a clip), showing existing highlights, the quotes list, as on web.
  • The book's details page (book.$id): metadata, cover, continue reading.
Done when

A long EPUB and an FB2 read the same as on web. Positions round-trip between web and app to the same sentence at different window sizes, and quotes made in either show up in both.

Dominant language
TypeScript
Stars
4
Forks
1
Avg merge
4h 49m
Merged PRs (30d)
5

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tinystream-dev/tinystream

All issues in tinystream-dev/tinystream

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.