Security fixes:
- Validate returnTo parameter in auth route to prevent open redirect attacks
Performance fixes:
- Add concurrency limit (3) for EPUB spine extraction to prevent memory exhaustion
- Iteratively split oversized paragraphs in chunk splitting to prevent content loss
- Add iteration limit (10) and shrink-check to summary combining loop
Data integrity:
- Remap summary rows when document IDs change during sync
UX improvements:
- Clear summary base URL when switching to non-custom providers
- Add type="button" to SummarizeButton to prevent form submission
- Add dev logging to PDFViewer error handler
- Move document state detection from render to useEffect
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>