Repository navigation
Preview: read a book without updating progress or stats (#289) - #290
Merged
Merged
Conversation
…tats (#289) The Read button on the book page is now a split button; its caret offers "Preview", which opens the reader with ?preview=1. In preview the reader skips its one write, PUT /books/{id}/status, so reading status, position, the synced device position, the derived web reading session and everything downstream stay untouched. All nine write sites (EPUB, CBZ, PDF, finish at the end) go through one helper. A quiet "Preview" tag shows in the reader bar. Highlights and notes still work. No server change. Playwright spec: a normal open writes "reading", a preview open sends no status request and leaves the book unread; the menu item lands on the preview URL. Changelog, website reader docs, i18n catalogs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #289.
What
The Read button on the book page is now a split button. Its caret offers Preview, with the hint "Does not update progress or stats". Preview opens the same reader with
?preview=1, and a small "Preview" tag shows in the reader bar while it is on. It applies to that one open only; there is no sticky setting.How
Every write the web reader makes is
PUT /books/{id}/status. That one call sets status and progress, upserts the synced device position and its history, derives the web reading session, and feeds everything downstream (Hardcover, Home, stats, streaks, calendar). In preview the reader never makes that call: all nine write sites (open, autosave, finish; EPUB, CBZ, PDF) go through onesaveStatushelper that returns early. No server change.Highlights and notes still work in preview. They are deliberate acts, not tracking.
Out of scope
Tests
frontend/e2e/preview-reading.spec.ts: a normal open writes "reading"; a preview open sends no status request and leaves the book unread with no progress; the menu item lands on the preview URL.Changelog entry under Unreleased, website reader docs updated, i18n catalogs extracted.