• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

GeorgeSG / KoInsight
56%

Build:
DEFAULT BRANCH: master
Repo Added 24 May 2025 09:56AM UTC
Files 39
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
  • master
  • 1-make-duration-rendering-max-in-hoursminutes-instead-of-days
  • UIVersion
  • add-coveralls
  • aggressive-suspend-sync
  • bulk-sync
  • feat/quick-action
  • fix/const-resolution
  • gg/fix-docker-build
  • gg/improve-annotations
  • gg/improve-seeds
  • gg/revert-annotations-change
  • harden-sync
  • patch/max-upload-size
  • stylua
  • sync-highlights

02 Mar 2026 03:26PM UTC coverage: 56.065% (+2.3%) from 53.749%
22582769013

push

github

web-flow
Harden sync (#99)

Fix last_open corruption, data loss, and edge case crashes

## Problems

### Main bugs

Several bugs were causing incorrect or missing data after syncing:

- "56 years ago" last open date: the annotation sync path read
summary.modified (an ISO date string like "2024-11-30") as the last_open
timestamp. SQLite coerced it to 0, making every book appear last opened
at Unix epoch (1970)
- Last open date on bulk sync: after fixing the above, os.time() was
used as a fallback — but the sidecar contains no reliable last-open
timestamp at all. This caused every bulk-synced book to be stamped with
the sync time instead of the actual last open date
- Silent data loss on manual sync: KoReader buffers reading session
stats in memory and only flushes to disk every ~50 page turns.
Triggering a sync mid-session meant the current session's data was never
captured. Sync-on-suspend was unaffected because the suspend event chain
flushed to statistics.sqlite3 beforehand

### Captured along the way

- In valid page stats reaching the DB: no server-side validation on
duration or total_pages fields, allowing null/NaN/zero values to be
inserted
- Server error on annotation-only sync: the plugin sends stats = {}
(empty Lua table → JSON object {}) on the annotation-only path (simplest
option is sending one data strucutre server-side). Calling .filter() on
a plain object threw TypeError, returning HTTP 500
- "NaN" avg. daily reading time: possible division by zero on the book
detail page when a book had no recorded reading days yet.
- Infinity started-reading date: getStartedReading() returned Infinity
for books with no page stats, which could propagate to the client

## Solutions

- Plugin: Set last_open = 0 in the annotation sync path. The sidecar
file contains no reliable last-open timestamp, and the statistics sync
path already sets this correctly. The server-side guard skips merging
zero values, so this is safe.
- Plugin: call ReaderStatistics:insertDB() b... (continued)

175 of 308 branches covered (56.82%)

Branch coverage included in aggregate %.

10 of 10 new or added lines in 2 files covered. (100.0%)

412 of 739 relevant lines covered (55.75%)

11.66 hits per line

Relevant lines Covered
Build:
Build:
739 RELEVANT LINES 412 COVERED LINES
11.66 HITS PER LINE
Source Files on master
  • Tree
  • List 39
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
22582769013 master Harden sync (#99) Fix last_open corruption, data loss, and edge case crashes ## Problems ### Main bugs Several bugs were causing incorrect or missing data after syncing: - "56 years ago" last open date: the annotation sync path read summary.m... push 02 Mar 2026 03:27PM UTC web-flow github
56.06
21561280025 master feat(koplugin): bulk sync annotations (#84) ### New Features Bulk Annotation Sync: The "Synchronize data" button now syncs all annotations from all books in your reading history at once (previously only the currently open book). Sync on suspend ... push 01 Feb 2026 10:28AM UTC web-flow github
53.75
21045802344 master chore: Improve seeds and add developer documentation (#88) - Improve seeds - Add annotation seeds - Add developer doc (vibe-coded & reviewed after) push 15 Jan 2026 08:46PM UTC web-flow github
53.63
20901215352 master chore: release v0.2.2 push 11 Jan 2026 08:14PM UTC GeorgeSG github
54.89
20901206718 master fix: annotations marked as deleted (fixes #86) (#87) Reverts the change from #82 and fixes #86. This brings back the old bug of deleting the last annotation of a book, but it is way more acceptable. It also allows annotations to be "restored" -... push 11 Jan 2026 08:14PM UTC web-flow github
54.68
20900360498 master fix: docker build failing with express type error (#85) push 11 Jan 2026 07:06PM UTC web-flow github
54.82
20896495487 master chore: Add koplugin-router tests push 11 Jan 2026 02:12PM UTC GeorgeSG github
55.08
20896368683 master chore: add tests for books-router push 11 Jan 2026 02:03PM UTC GeorgeSG github
49.39
20896126672 master feat: Hide raw values and book reload in "Advanced" option push 11 Jan 2026 01:44PM UTC GeorgeSG github
41.73
20895927535 master feat: Add tooltip to change cover button push 11 Jan 2026 01:29PM UTC GeorgeSG github
41.73
See All Builds (93)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc