Commit graph

8 commits

Author SHA1 Message Date
Claude
b65ebd1d51
feat(ui): add table of contents for chapter navigation
Added table of contents modal for documents with multiple chapters:

New Features:
- TableOfContents component with modal dialog
- List icon button in chapter navigation bar
- Click any chapter to jump directly to it
- Current chapter highlighted in the list
- Scrollable list for books with many chapters
- Clean modal UI with transitions

Benefits:
- Quick navigation for large documents with many chapters
- Better UX for series/textbooks with 10+ chapters
- No need to click Previous/Next repeatedly
- Shows all chapter titles at a glance

Technical Details:
- Uses Headless UI Dialog for accessibility
- Integrates with existing goToChapter function
- Matches existing design system and styling
- Added to HTMLViewer chapter navigation bar
2026-01-11 05:16:57 +00:00
Claude
b13bf96b3b
fix(types): resolve TypeScript linting errors for build
Fixed all TypeScript errors preventing build:
- Added TTSAudiobookChapter type import to HTMLContext
- Replaced 'any' types with proper TTSAudiobookChapter type
- Removed unused goToChapter from HTMLViewer destructuring
- Updated AudiobookExportModal to accept 'html' documentType
- Fixed HTMLContext return types to match EPUB/PDF contexts
  - createFullAudioBook now returns Promise<string> (bookId only)
  - regenerateChapter now returns Promise<TTSAudiobookChapter>
- Prefixed/removed unused parameters in placeholder functions

Build now completes successfully with only minor warnings
in placeholder code that will be implemented later.
2026-01-11 04:47:44 +00:00
Claude
757fa5811b
feat(text): implement full pagination and auto-advance for large text files
Solve large file performance issues with automatic chapter pagination:
- Files >50KB automatically split into chapters
- Each chapter loads independently for instant performance
- TTS auto-advances through chapters seamlessly

HTMLContext enhancements:
- Integrate chapter detection on document load
- Track current chapter and total chapter count
- Implement chapter navigation (next/previous/goto)
- Register location change handler with TTS for auto-advance
- Only load current chapter text instead of entire file

HTMLViewer UI additions:
- Chapter navigation bar with Previous/Next buttons
- Display current chapter title and position (e.g., "Chapter 3 of 15")
- Responsive button states (disabled at start/end)
- Clean, minimal design matching existing UI

TTS Context improvements:
- Support location handlers for both EPUB and HTML
- Auto-advance to next chapter when reaching end
- Auto-reverse to previous chapter when going backwards
- Seamless playback across chapter boundaries

Benefits:
- 3.12MB file → ~60 chapters @ 50KB each
- Instant page loads instead of browser freeze
- Smooth TTS playback with automatic chapter transitions
- Memory efficient - only one chapter in memory at a time
- Works for both text and markdown files

Files changed:
- contexts/HTMLContext.tsx: Full pagination implementation
- components/HTMLViewer.tsx: Chapter navigation UI
- contexts/TTSContext.tsx: Handler-based auto-advance

Test with large files:
1. Open 3MB+ text file → automatically split into chapters
2. See chapter navigation bar at top
3. Click Previous/Next to navigate
4. Play TTS → automatically advances through chapters
2026-01-11 04:32:33 +00:00
Richard Roberson
21870ed576 fix(api): stabilize DOCX to PDF conversion and cleanup
- Isolate concurrent LibreOffice runs with per-job profile directories
  (soffice -env:UserInstallation) and per-job temp folders
- Poll for generated PDF and verify stable file size before reading
- Consolidate temp artifacts under docstore/tmp and clean up via rm -r
- Add headless/nologo flags and improve error handling

ui(accessibility):
- ConfirmDialog exposes proper dialog roles
- DocumentFolder toggle adds type, aria-expanded, aria-controls, and title;
  associate content panel with an id
- HTMLViewer wraps content in .html-container for HTML/TXT views

test: add comprehensive Playwright specs and helpers
- Accessibility, API health, deletion flows, folders, navigation, playback,
  and upload scenarios
- Add sample.md and unsupported.xyz; update sample.pdf; extend helpers

ci: run Playwright workflow on version1.0.0 branch
2025-11-12 16:21:11 -07:00
Richard Roberson
42665884d7 feat(audiobook): add chapter-based export with UI and API
Introduce end-to-end chapterized audiobook generation with persistent
storage, resumable workflows, and MP3/M4B support.

API:
- add /api/audio/convert/chapter (GET/DELETE) for per-chapter ops
- add /api/audio/convert/chapters (GET/DELETE) for listing/reset
- enhance /api/audio/convert:
  - accept mp3|m4b, stream combined file, cache complete output
  - robust chapter indexing, docstore persistence, list concat
  - AbortSignal-aware ffmpeg/ffprobe, 499 on cancel

UI/UX:
- add AudiobookExportModal with progress, resume, regenerate, download
- add ProgressCard, enhance ProgressPopup (click-to-focus, richer info)
- add Header, ZoomControl; move TTSPlayer to sticky bottom bar
- redesign EPUB/HTML/PDF pages for full-height layout and controls
- add HomeContent; compact uploader variant; document list polish

TTS/Contexts:
- EPUB/PDF contexts now generate per-chapter to disk, return bookId
- support chapter regeneration; progress/cancel propagation
- pass provider/model/instructions; standardize MP3 TTS output
- HTML context updates for model/instructions

Styling:
- globals: overlay-dim, scrollbar styles, prism gradient utilities
- theme vars: secondary-accent, prism-gradient; tailwind color addition

Misc:
- fix PDF scale calc to use container height
- EPUB theme reader area fills height
- time estimation update cadence stab
- audio util passes format to combine endpoint
2025-11-11 13:32:30 -07:00
Richard Roberson
a1465f1680 Increase size of .md viewer 2025-04-15 11:47:35 -06:00
Richard Roberson
5892383a61 Fix mardown viewer text color
Some checks failed
Build and Publish Docker Image / build (push) Has been cancelled
2025-04-15 11:41:26 -06:00
Richard Roberson
82bb91a850 Add TXT and MD support with and HTML viewer with react markdown + many refactors to support it 2025-04-15 02:28:51 -06:00