Skip to content

fix(tts): advance continuous reading by section index#429

Open
codedogQBY wants to merge 1 commit into
mainfrom
codex/fix-tts-next-chapter-spine
Open

fix(tts): advance continuous reading by section index#429
codedogQBY wants to merge 1 commit into
mainfrom
codex/fix-tts-next-chapter-spine

Conversation

@codedogQBY

Copy link
Copy Markdown
Owner

Summary

  • Fix desktop TTS continuous reading for multi-volume EPUBs by advancing through foliate spine sections instead of indexing into the TOC tree.
  • Keep the current section index/total/title from relocate events so async TTS continuation uses the renderer's real reading order.
  • Update TTS previous/next chapter navigation to use section indices as well, leaving manual TOC panel navigation on hrefs.

Analysis

readerTab.chapterIndex is written from RelocateDetail.section.current, so it represents the foliate spine/section index. The old TTS fallback treated that value as an index into tocItems. For books whose TOC has volume parent nodes, the next TOC item can be a volume such as "第二卷" rather than the next readable chapter, so reading "第一章" could jump into the wrong volume.

This change makes the TTS fallback and TTS chapter controls use goToIndex(sectionIndex) with section bounds from relocate/book metadata. The TOC tree remains only for user-facing table-of-contents jumps.

Fixes #421

Verification

  • git diff --check
  • pnpm --filter app exec tsc --noEmit
  • pnpm exec biome format --write packages/app/src/components/reader/ReaderView.tsx

Known baseline: pnpm exec biome check packages/app/src/components/reader/ReaderView.tsx still reports existing ReaderView lint diagnostics unrelated to this fix (for example historical non-null assertion, forEach, and hook dependency warnings). Formatter output was applied.

@codedogQBY codedogQBY added bug Something isn't working priority:p1 High: important feature broken or major platform/workflow regression area:reader Reader, pagination, scrolling, layout, TOC area:tts Text-to-speech and read-aloud playback area:desktop Desktop, Tauri, Windows, macOS, Linux labels Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:desktop Desktop, Tauri, Windows, macOS, Linux area:reader Reader, pagination, scrolling, layout, TOC area:tts Text-to-speech and read-aloud playback bug Something isn't working priority:p1 High: important feature broken or major platform/workflow regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

windows pc端 小说目录带多个分卷的小说 语音阅读的时候 自动下一章 会错误跳转到下一卷

1 participant