Skip to content

Add active reading timer synchronization through PowerSync - #61

Merged
Eoic merged 2 commits into
developmentfrom
feat/reading-timer-sync
Nov 6, 2026
Merged

Eoic merged 2 commits into
developmentfrom
feat/reading-timer-sync

Conversation

@Eoic

@Eoic Eoic commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Active reading timers can now move between signed-in devices through PowerSync. The server accepts the first valid transition from a known version, acknowledges stale offline branches, and commits a saved timer together with its reading activities and optional book progress. Durable terminal states prevent retries from recording the session twice.

  • Add the reading_timers model, additive Alembic migration, owned replication stream, and publication/source-role setup.
  • Validate ownership, immutable session identity, recorded intervals, and atomic save effects under the existing owner lock.
  • Document rollout and conflict behavior in docs/reading-timer-sync.md.

Validation: tools/papyrus check server passed (Ruff and Mypy). All 18 focused timer, migration, replication-config, and sync-service tests passed against the isolated test database.

Deploy the migration, publication/grants, API, and PowerSync config before releasing the companion client. No production deployment was performed. Live multi-device acceptance remains separate from the database tests.

Closes #60. Related requirement: FR-5_3 (PapyrusReader/docs#36). Companion client PR: PapyrusReader/client#124.

Copilot AI balanced review requested due to automatic review settings November 6, 2026 00:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T00:35:45.895674Z 7bb47e3 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7bb47e3e75

ℹ️ 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".

Comment thread papyrus/services/reading_timer_sync.py Resolved
@Eoic
Eoic enabled auto-merge November 6, 2026 00:59
@Eoic
Eoic merged commit 1aa1346 into development Nov 6, 2026
2 checks passed
@Eoic
Eoic deleted the feat/reading-timer-sync branch November 6, 2026 08:15
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.

Synchronize active reading timers through PowerSync

2 participants