Skip to content

✨ (expo) Ephemeral reading timer and improved conflict resolution - #1329

Merged
aaronleopold merged 44 commits into
nightlyfrom
non-persist-timer
Aug 19, 2026
Merged

✨ (expo) Ephemeral reading timer and improved conflict resolution#1329
aaronleopold merged 44 commits into
nightlyfrom
non-persist-timer

Conversation

@aaronleopold

Copy link
Copy Markdown
Collaborator

Description

This branch started with ephemeral reading timer refactors to improve some drift/funk between online/offline reading, and morphed to also build out more advanced conflict resolution when syncing offline progress to your Stump server:

  • Remove extra locally-persisted reading times (zustand), seconds are now source from either
    • local sqlite database for offline reading
    • a remote Stump server
  • Consolidate common timer ops into useReadingTimer
  • Add ability to reset timer for both online/offline reading
  • Add explicit CONFLICT status so conflicts can be manually managed after detected during sync operations
  • Add a conflict-resolution sheet with a pager view to manually resolve conflicts sequentially with multiple options:
    • Accept local -> your local progression will replace any remote progress at the divergence point
    • Accept remote -> your remote progression will replace your local progress
    • Accept both -> your local progression will be appended to your remote progress as a continuation
  • Add the concept of a ReadingSessionConflictResolutionView
  • Adjust server mutations to better support timer resets atomically within a single transaction, instead of serially calling clear then update progress
    • Refactor some bits into reusable service functions
    • Add corresponding tests, etc
  • Add initial helpers for querying a Stump server outside server context, will be more common moving forward so will want to improve these patterns
  • ... And a bunch more

There are still some remaining TODOs sprinkled throughout I'll need to address, but think this is getting close to ready. I'm hoping to wrap it up within a week's time.

Screenshots

TODO: I will add later

Stump Contributor License Agreement

By contributing to Stump, you agree that your contributions will be licensed under the following licenses (where applicable):

@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 47.36842% with 50 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/graphql/src/query/media.rs 0.00% 44 Missing ⚠️
crates/graphql/src/mutation/reading_progress.rs 78.26% 5 Missing ⚠️
crates/graphql/src/loader/reading_session.rs 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
apps/server/src/routers/opds/v2_0.rs 41.96% <ø> (ø)
crates/graphql/src/input/media.rs 13.18% <100.00%> (+8.36%) ⬆️
crates/graphql/src/object/reading_session.rs 60.00% <ø> (ø)
crates/integrations/metadata/src/merge/merger.rs 84.23% <100.00%> (+0.15%) ⬆️
crates/models/src/services/reading_progress.rs 88.79% <100.00%> (+0.94%) ⬆️
crates/graphql/src/loader/reading_session.rs 2.41% <0.00%> (-0.02%) ⬇️
crates/graphql/src/mutation/reading_progress.rs 95.96% <78.26%> (-2.07%) ⬇️
crates/graphql/src/query/media.rs 47.25% <0.00%> (-3.40%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aaronleopold
aaronleopold marked this pull request as ready for review August 18, 2026 21:21
@aaronleopold
aaronleopold merged commit e5b163c into nightly Aug 19, 2026
7 checks passed
@aaronleopold
aaronleopold deleted the non-persist-timer branch August 19, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants