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>
- Added middleware for handling authentication based on environment variables.
- Introduced functions for generating and managing authentication tokens.
- Updated summarization logic to support chunked processing with context limits.
- Enhanced settings modal to include context limit configuration for summarization.
- Improved PDF viewer to manage document loading states and prevent rendering during transitions.
- Added progress indicators for chunked summarization in the summarize modal.