Skip to content

feat: support multiple PDF uploads per generation #148

@YizukiAme

Description

@YizukiAme

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 | nullFile[], 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions