Skip to content

Fix reading resume after jumping ahead in an article - #10

Merged
jaibhasin merged 5 commits into
mainfrom
codex/fix-resume-reading
Oct 4, 2026
Merged

jaibhasin merged 5 commits into
mainfrom
codex/fix-resume-reading

Conversation

@jaibhasin

Copy link
Copy Markdown
Owner

What this fixes

After jumping two paragraphs ahead while listening, reopening the article could resume at the wrong place.
Resume rewound to the beginning of the sentence, a rewind to audio frame zero could retain an older checkpoint, and missing word timestamps in an earlier speech section could prevent accurate mapping in later sections.

This change restores the unfinished word at its original position in the article, including after a paragraph jump.

Changes

  • Resume at the saved word instead of repeating the entire sentence.
  • Use one audible-position resolver for saving progress, changing voices, and reconnecting.
  • Save rewinds correctly, including the beginning of a resumed passage, and save progress when the tab becomes hidden.
  • Map each speech section to its own source text so earlier alignment gaps cannot displace later checkpoints.
  • Add regression tests for jumping two paragraphs and reopening, word boundaries, rewinds, hidden tabs, and missing earlier timestamps.

Validation

  • Type checking and production build.
  • All 106 JavaScript tests and both Python bridge tests.
  • Real Chrome with Web Audio: jump two paragraphs ahead, pause and save, reload, resume from the exact saved word, verify the paragraph highlight, then rewind and resume again.
  • git diff --check.

The Chrome check uses synthetic PCM, a controlled extension port, and the actual bundled reading-list store persisted across reloads.
Installed-extension worker behavior and live Fish Audio playback still need a manual check.

Validation details are recorded in tests/PLAYBACK_VALIDATION.md.

Manual check

  1. Load the built extension and refresh an article.
  2. Start listening, then double-click a word two paragraphs ahead.
  3. Let a few words play, pause, and reopen the article from Reads.
  4. Choose Resume and confirm playback and highlighting return to the unfinished word in that paragraph.

@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 02399e4c-2b72-4a65-96e1-867976b6e044
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jaibhasin
jaibhasin merged commit 66fd21e into main Oct 4, 2026
5 checks passed
@jaibhasin
jaibhasin deleted the codex/fix-resume-reading branch October 4, 2026 09:39
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.

1 participant