Skip to content

Fix chapter updates for fast EPUB slider seeks - #3267

Merged
AlexAndBear merged 2 commits into
mainfrom
fix/epub-chapter-update-fast-seek
Aug 31, 2026
Merged

AlexAndBear merged 2 commits into
mainfrom
fix/epub-chapter-update-fast-seek

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

Fixes chapter selection desync in the EPUB reader when users drag the reading progress slider quickly (especially to the left).

Changes:

  • use relocated event payload as the primary location source in App.vue
  • improve chapter resolution to match navigation items by id as well as href
  • make spine-order chapter resolution deterministic when direct TOC matches are unavailable
  • add unit tests for stale relocated/currentLocation mismatch and ambiguous/frontmatter chapter resolution

Related Issue

  • Fixes <issue_link>

How Has This Been Tested?

  • test environment: local dev environment (macOS), Vitest
  • test case 1: pnpm test:unit --run packages/web-app-epub-reader/tests/unit/app.spec.ts
  • test case 2: pnpm test:unit --run packages/web-app-epub-reader/tests/unit/helpers/chapterResolving.spec.ts
  • test case 3: fast slider seek scenario covered by new unit tests in app.spec.ts and chapterResolving.spec.ts

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear AlexAndBear self-assigned this Aug 30, 2026
@AlexAndBear
AlexAndBear requested a review from kulmann August 30, 2026 01:20
@AlexAndBear
AlexAndBear merged commit 35ed1d9 into main Aug 31, 2026
31 checks passed
@AlexAndBear
AlexAndBear deleted the fix/epub-chapter-update-fast-seek branch August 31, 2026 06:59
@openclouders openclouders mentioned this pull request Aug 31, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants