Repository navigation
Reader: way back after jumps, previewing progress bar, short phone text settings, fixes; Android widgets - #11
Merged
Conversation
…ings on phones, and fixes The way back - After a jump (Contents, a search result, a link in the book, the progress bar, another device's position) a small "Back to Chapter 3" pill offers the way back. It comes and goes with the toolbar: in the middle of the footer's line on the desktop, under the toolbar on phones. Several jumps in a row keep the way back to where the reader was reading. It goes after going back, after three page turns at the new place, or on paging back there by hand. - Alt+Left goes back too, and on Android the back gesture goes back there before leaving the book. The logic is pure (jumpBack.ts) and tested. The progress bar - Dragging it no longer moves through the book as it goes: a bubble names the chapter and percentage it would land at, and it goes there on letting go. Pointing at the bar on the desktop shows the same bubble. - Chapters' starts show as hairline notches. BookView.chapterStarts() replaces the unused sectionFractions(). Text settings - On phones the sheet opens short (theme, size, line spacing) so the page shows above it while changing them; "More options" opens the rest. One order on every screen, and "Two pages on wide windows" is left out on phones. Fixes - Search outlines are cleared however the search sheet closes; picking a result on a phone, a tap on the page or another sheet left every match outlined. - A search match's mark stays while it's on screen; a tap on a touch screen took it away. - Bookmarks and highlights in Contents are in book order, not the order they were made. - Scrolled, the arrow keys scroll wherever the focus is; before the page was clicked they did nothing. - Layout attributes are only set when they change: opening and closing any sheet re-laid out the book (8 times for one sheet on a phone). - The definition lookup lost a ref guard that left it stuck at "Looking it up…" in development, and unused styles are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011d6aBsdw5zNEaRoJx1ciHF
…the books being read - Continue reading shows the cover, title, chapter, progress and time left in the chapter; narrow, the cover over a ring of progress. Reading goal shows today's minutes in a ring against the goal, and the streak. Reading now shows the covers of the books being read, as many as fit, each over its progress. They take the book's colours over the Paper or Dusk surface, follow the system's dark mode, and a tap opens the book (or the stats). - The app sends a snapshot whenever its reading data changes (src/state/widgets.ts, tested), except while a book is open, when it waits for leaving the book or the app. Rust adds each book's cover file; Widgets.kt keeps the snapshot and draws from it, and redraws the goal just after midnight. A tap opens the app through an open request the UI takes when it starts, or on an app:open-request event when it's already running. - One cover lookup (protocol::cover_file) serves the cover:// scheme, the widgets and the read-aloud notification, which so far missed a cover the reader chose. - A reading session checkpointed on going to the background counts in today's stats at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011d6aBsdw5zNEaRoJx1ciHF
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.
Two batches, one commit each: reader features and fixes, then Android home-screen widgets. "Squash and merge" turns them into one commit on
main.Reader
A way back after jumps
src/reader/jumpBack.ts.A progress bar that previews
Text settings on phones
Fixes
Android widgets
What they show
How they look
How they work
src/state/widgets.ts, tested). While a book is open the widgets aren't visible, so it waits until you leave the book or the app.Widgets.ktkeeps the snapshot and draws from it, scaling covers down to stay within the size limit of a widget update.app:open-requestevent if the app is already running.protocol::cover_filenow serves thecover://scheme, the widgets and the read-aloud notification. The notification used to miss a cover you'd chosen yourself.Testing
bun run checkpasses, 137 tests, including new ones forjumpBack, book order and the widget snapshot.cargo testpasses (132, including the snapshot's cover filling and the new event). Desktop clippy with-D warningsand rustfmt are clean.android-alljar from Maven Central, since Google's repositories aren't reachable from where this was written. RemoteViews calls were checked against the framework's remotable methods, and the layouts' framework attributes were confirmed to exist.Generated by Claude Code