Skip to content

Add Editable Table with File Path Matching for PDF-Only Uploads #166

@JonnyTran

Description

@JonnyTran

Add Editable Table with File Path Matching for PDF-Only Uploads

Problem

When users upload PDFs without bibliography files, they currently have no way to create reference entries or match PDFs to file paths for extraction. This limits the usefulness of the PDF-first upload flow.

Solution

Create a MVP editable table interface that allows users to:

  1. Generate reference entries from uploaded PDFs (initially start with an empty editable table)
  2. Manually edit reference metadata (title, authors, etc.)
  3. Match PDFs to file paths for extraction
  4. Add custom reference keys

Requirements

Core Functionality

  1. Automatic Table Generation: When PDFs are uploaded without bibliography files, automatically generate an empty table with reference and files columns
  2. Editable Fields: Allow editing and adding additionally columns (title, authors, year, journal, DOI, etc.) (already implemented in RenderTable)
  3. File Path Matching: Listing uploaded PDFs that have mapped to the metadata table entries or not

UI Components

  1. Table Interface: Data table with inline editing capabilities
  2. File Matching: multi-selection interface to match 1 or more PDFs to each reference
  3. Metadata Extraction: Extract basic metadata from PDF headers/OCR when possible

Integration Points

  1. PDF Processing: Extract metadata from uploaded PDFs on the backend
  2. File Matching Logic: Intelligent matching based on filename patterns, extracted titles, etc.
  3. Fallback Creation: Generate placeholder entries when metadata extraction fails

Files to Modify

  • extralit-frontend/components/features/import/file-upload/ImportFileUpload.vue :
    • Integrate new table creation flow with editable table (by default) and validators for unique value in the reference column.
    • Additionally the files column (frozen right) need to be a multi value list editor where user can multi-select the uploaded pdf file paths to each reference, configured in tableColumns passed to BaseSimpleTable. See https://tabulator.info/docs/6.3/edit#editor-list
    • Potentially need to create list of PDF files not yet mapped to a reference
  • extralit-frontend/components/features/import/analysis/useImportAnalysisTableViewModel.ts, trigger update on status on cell edits on reference or files column.

Files for reference

  • extralit-frontend/v1/domain/services/FileMatchingService.ts - only run when a BIB/CSV file uploaded for the initial pdf file mapping
  • extralit-frontend/components/features/import/file-upload/CsvColumnSelection.vue - only use for field mapping (column renaming to reference column) with uploaded CSV

Acceptance Criteria

  • Users can upload PDFs and get an editable table of reference entries
  • Table allows inline editing of all reference fields
  • PDF-to-entry matching works multi-select
  • Uses existing validators for files and reference column

Dependencies

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions