Skip to content

Enhance PDF/EPUB readers with progress tracking and create Android development branch#5

Draft
Claude wants to merge 3 commits intomainfrom
claude/improve-pdf-reader-and-epub
Draft

Enhance PDF/EPUB readers with progress tracking and create Android development branch#5
Claude wants to merge 3 commits intomainfrom
claude/improve-pdf-reader-and-epub

Conversation

@Claude
Copy link
Copy Markdown

@Claude Claude AI commented Mar 24, 2026

Improved PDF and EPUB reader UX with real-time progress indicators and established foundation for native Android app development.

PDF Reader Enhancements

  • Progress display: Real-time page counter with percentage in topbar (Page 5 of 120 (4%))
  • File identification: Document title extracted from filename, displayed with icon
  • Loading state: Spinner with feedback during PDF.js initialization
  • Performance: Reduced polling interval to 1.5s for more responsive updates
  • UI refinements: Enhanced topbar layout with better spacing and mobile responsiveness
// Before: minimal topbar with only close button
<div className="pdf-reader-topbar">
  <button onClick={onClose}>×</button>
</div>

// After: informative header with progress
<div className="pdf-reader-topbar">
  <div className="pdf-reader-info">
    <svg>...</svg>
    <span className="pdf-title">{title}</span>
    {!isLoading && totalPages > 0 && (
      <span className="pdf-page-info">
        Page {currentPage} of {totalPages} ({percentage}%)
      </span>
    )}
  </div>
  <button onClick={onClose}>×</button>
</div>

EPUB Reader Enhancements

  • Percentage tracking: CFI-based reading progress displayed in topbar ((45%))
  • Location generation: Automatic 1600-character interval indexing for accurate progress calculation
  • Persistence: Enhanced progress saving with precise percentage values
  • Performance: Progress updates only when locations are available to avoid stuttering

Key change in location tracking:

const handleGetRendition = useCallback((rendition: Rendition) => {
  const book = rendition.book as any;
  if (book && !book.locations?.length) {
    book.locations.generate(1600).then(() => {
      const percentage = Math.round(book.locations.percentageFromCfi(location) * 100);
      setReadingPercentage(percentage);
    });
  }
}, [location]);

Android Development Branch

Created booky-android branch with development infrastructure:

  • ANDROID_SETUP.md: Comprehensive roadmap covering technology stack (Kotlin, Jetpack Compose, MVVM), project structure, and Q2-Q4 2026 timeline
  • android/ directory: Placeholder structure with README and proper .gitignore
  • Feature planning: 3-phase roadmap (Core → Advanced → Mobile-Specific) documented

Branch establishes foundation for native Android implementation while maintaining web version parity.

Original prompt

improve the pdf reader and epub
make another branch for booky android

Claude AI and others added 2 commits March 24, 2026 14:25
@Claude Claude AI changed the title [WIP] Improve PDF reader and EPUB functionality Enhance PDF/EPUB readers with progress tracking and create Android development branch Mar 24, 2026
@Claude Claude AI requested a review from Programming2055 March 24, 2026 14:30
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