fix: harden epub progress saves during sync#193
Merged
Conversation
9979aa8 to
2da51d7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dddd3be543
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
imshentastic
referenced
this pull request
in imshentastic/CrumBLE
May 23, 2026
## Summary Adds define to omit optional fonts from the build. This reduces time to flash from >31s to <13s. Useful for development that doesn't require fonts. Addresses #193 Invoke it like this during development: `PLATFORMIO_BUILD_FLAGS="-D OMIT_FONTS" pio run --target upload && pio device monitor` Changing the define causes `pio` to do a full rebuild (but it will be quick if you keep the define). --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? NO
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.
Summary
progress.binthrough a synced temp file and rotate the previous file toprogress.bin.bakbefore replacing it.totalPageswhen applying remote progress so the saved resume data remains complete.Why
progress.binwas previously opened with the SDK write helper, which truncates the file before writing. If the device crashes or loses power during that write, the old resume pointer is already gone. The KOReader apply-remote path also wrotepageCount=0, which made the saved sync result less useful for resume/progress display.Validation
./bin/clang-format-fixpio run -e simulator -j1pio run -e tiny -j1