Skip to content

[FIX] Import Files Flow#120

Merged
JonnyTran merged 20 commits into
developfrom
feat/import-file-flow
Aug 7, 2025
Merged

[FIX] Import Files Flow#120
JonnyTran merged 20 commits into
developfrom
feat/import-file-flow

Conversation

@JonnyTran
Copy link
Copy Markdown
Member

This pull request updates the design and requirements documentation for both the Import History Sidebar and the Papers Library Importer features. The main focus is on replacing the old ImportModal workflow with a new, more flexible ImportFlow that supports both .bib and .csv bibliography imports, enhanced PDF-to-reference matching, and improved user control over the import process. The documentation changes also clarify UI event handling, backend integration, and error handling for these workflows.

Import Workflow Modernization and Flexibility:

  • Replaced all references to ImportModal with ImportFlow, ensuring the main import workflow supports both .bib and .csv files, and updated event handlers and requirements to reflect this change. (.kiro/specs/import-history-sidebar/design.md [1] [2] .kiro/specs/import-history-sidebar/requirements.md [3] .kiro/specs/import-history-sidebar/tasks.md [4] .kiro/specs/papers-library-importer/design.md [5] [6] [7]
  • Enhanced the import workflow to allow flexible upload order (bibliography or PDFs first), preserve uploaded data between steps, require confirmation to close the modal during import, and refresh the recent imports list upon completion. (.kiro/specs/papers-library-importer/design.md .kiro/specs/papers-library-importer/design.mdR221-R251)

Bibliography and PDF Import Improvements:

  • Added support for .csv bibliography files with user-selectable reference and files columns, column preview, and flexible schema handling; improved CSV error handling and parsing. (.kiro/specs/papers-library-importer/design.md [1] [2] [3] .kiro/specs/papers-library-importer/requirements.md [4] [5]
  • Upgraded PDF-to-reference matching logic to prioritize maximum prefix path matching, support multiple files per reference, progressive file addition, and advanced fuzzy matching strategies. (.kiro/specs/papers-library-importer/design.md .kiro/specs/papers-library-importer/design.mdL558-R583)

Import Analysis and User Controls:

  • Updated the import analysis table to use a new view model, support additional import actions (ignore), and provide user options to import all references or only those with matched PDFs, automatically setting unmatched references to ignore as needed. (.kiro/specs/papers-library-importer/design.md [1] .kiro/specs/papers-library-importer/requirements.md [2]
  • Improved status indicators, filtering, and toggle functionality in the import preview, and ensured the backend receives the correct workspace context and data. (.kiro/specs/papers-library-importer/design.md .kiro/specs/papers-library-importer/design.mdL304-R330)

Other Documentation and API Schema Updates:

These changes collectively modernize the import experience, provide more flexibility for users, and improve the maintainability and clarity of the import-related code and documentation.

JonnyTran and others added 19 commits August 7, 2025 00:13
- Add performant CSV parser (papaparse) and types
- Implement CSV preview and column selection UI for reference/files columns
- Refactor BibTeX/CSV parsing logic into FileService
- Add PdfMatchingService for PDF-to-reference matching
- Update DI to register new services
- Update package.json and lock for new dependencies
- Add unit tests for file parsing and dataframe building
- Update import UI to support .csv files and show preview/selection
- Mark CSV parser task as complete in specs
- Updated BaseFlowModal.spec.js to correct the stub for BaseButton.
- Improved formatting in ImportHistoryDataPreview.spec.js and other test files for consistency.
- Updated ImportAnalysisTable.vue to improve import information display and remove unnecessary import mode logic.
- Introduced new components for managing import history, including ImportHistoryDataPreview.vue and ImportHistoryDetailsModal.vue.
- Added RecentImports.vue and RecentImportCard.vue for displaying recent import records with improved UI and error handling.
- Implemented useRecentImportsViewModel for managing recent imports state and interactions.
- Enhanced tests for recent imports components and view models to ensure reliability and coverage.
- Deleted ImportAnalysisTable.vue and its corresponding test file ImportAnalysisTable.spec.js to streamline the import functionality.
- Removed useImportAnalysisTableViewModel.ts as it was no longer needed after the component removal.
- Updated ImportBatchProgress.vue to utilize a filtered version of dataframe data for import history creation, ensuring only relevant references are included.
- Removed the Import Information section from ImportAnalysisTable.vue to streamline the UI.
- Updated RecentImports.vue to expose a refresh method for parent component interaction.
- Added a refresh method in useRecentImportsViewModel.ts to reload recent imports.
- Modified handleImportCompleted in useHomeViewModel.ts to refresh recent imports after import completion.
- Updated index.vue to reference the RecentImports component for improved import flow handling.
@JonnyTran JonnyTran self-assigned this Aug 7, 2025
@JonnyTran JonnyTran requested review from a team as code owners August 7, 2025 23:00
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 7, 2025

Codecov Report

❌ Patch coverage is 3.93836% with 561 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...mponents/features/import/file-upload/PdfUpload.vue 0.00% 178 Missing ⚠️
...onents/features/import/file-upload/TableUpload.vue 0.00% 177 Missing ⚠️
...s/features/import/file-upload/ImportFileUpload.vue 0.00% 79 Missing ⚠️
...features/import/file-upload/CsvColumnSelection.vue 0.00% 65 Missing ⚠️
...atures/import/file-upload/ImportSummarySidebar.vue 0.00% 27 Missing ⚠️
...frontend/components/features/import/ImportFlow.vue 23.80% 16 Missing ⚠️
...s/features/import/analysis/ImportAnalysisTable.vue 62.50% 9 Missing ⚠️
extralit-frontend/pages/index.vue 0.00% 7 Missing ⚠️
...mponents/base/base-breadcrumbs/BaseBreadcrumbs.vue 0.00% 1 Missing ⚠️
...rontend/components/base/base-switch/BaseSwitch.vue 0.00% 1 Missing ⚠️
... and 1 more
Flag Coverage Δ
frontend 10.70% <3.93%> (-0.56%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...tend/components/base/base-brand-icon/BrandIcon.vue 0.00% <ø> (ø)
...rontend/components/base/base-button/BaseButton.vue 22.50% <ø> (ø)
...end/components/base/base-checkbox/BaseCheckbox.vue 0.00% <ø> (ø)
...it-frontend/components/base/base-date/BaseDate.vue 77.55% <ø> (ø)
...end/components/base/base-dropdown/BaseDropdown.vue 50.70% <ø> (ø)
...-frontend/components/base/base-input/BaseInput.vue 0.00% <ø> (ø)
.../components/base/base-input/BaseInputContainer.vue 0.00% <ø> (ø)
...-frontend/components/base/base-modal/BaseModal.vue 0.00% <ø> (ø)
...rontend/components/base/base-slider/BaseSlider.vue 58.33% <ø> (ø)
...ntend/components/base/base-spinner/BaseSpinner.vue 0.00% <ø> (ø)
... and 29 more

... and 1 file with indirect coverage changes

Components Coverage Δ
extralit 64.93% <ø> (ø)
extralit 64.93% <ø> (ø)
extralit-server ∅ <ø> (∅)
extralit-frontend 10.70% <3.93%> (-0.56%) ⬇️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JonnyTran JonnyTran merged commit db3f86b into develop Aug 7, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant