Summary
Currently only a single PDF can be uploaded per generation. Users want to upload multiple PDFs and have them merged as course material.
Current Behavior
pdfFile: File | null — single file state
- One
pdfStorageKey in IndexedDB
- One OCR parsing pass in generation-preview
- One
pdfText fed to the generation pipeline
Desired Behavior
- Upload multiple PDF documents
- Merged content is used as course material for generation
- UI shows a file list with individual remove buttons
Design Decisions Needed
- Content merging strategy: concatenate in upload order? per-file section headers?
- Token budget: how to distribute
MAX_PDF_CONTENT_CHARS across files — equal split, proportional to length, or sequential truncation?
- OCR images: per-file limit or shared
MAX_VISION_IMAGES pool?
- Max file count: cap at N files to avoid overwhelming the LLM context?
- UI: drag-to-reorder? total size indicator?
Affected Layers
| Layer |
Change |
| Toolbar UI |
File | null → File[], list display |
| IndexedDB storage |
Multiple storage keys or array storage |
| Session state |
Multi-file metadata |
| Generation preview |
Loop OCR parsing + content merge |
| Generation pipeline |
Combined text with truncation |
Summary
Currently only a single PDF can be uploaded per generation. Users want to upload multiple PDFs and have them merged as course material.
Current Behavior
pdfFile: File | null— single file statepdfStorageKeyin IndexedDBpdfTextfed to the generation pipelineDesired Behavior
Design Decisions Needed
MAX_PDF_CONTENT_CHARSacross files — equal split, proportional to length, or sequential truncation?MAX_VISION_IMAGESpool?Affected Layers
File | null→File[], list display