Skip to content

feat: add csv bulk quote import functionality#47

Merged
kYem merged 5 commits into
mainfrom
feature/csv-quote-import
Jan 10, 2026
Merged

feat: add csv bulk quote import functionality#47
kYem merged 5 commits into
mainfrom
feature/csv-quote-import

Conversation

@kYem
Copy link
Copy Markdown
Owner

@kYem kYem commented Jan 10, 2026

Summary

  • Add CSV bulk quote import to import quotes from books, articles, or other sources
  • Support drag & drop file upload with preview before importing
  • Option to assign all imported quotes to a new or existing collection

Changes

  • packages/shared/src/csv-utils.ts - CSV parsing utility with validation
  • packages/shared/src/types.ts - Added CSVQuoteRow, CSVParseResult, BulkImportResult types
  • apps/browser-extension/src/components/CSVImportModal.tsx - Import modal component
  • apps/browser-extension/src/stores/quote-store.ts - Added bulkAddQuotes action

CSV Format

Column Required Description
text Yes The quote text (max 500 chars)
author Yes Quote author (max 100 chars)
category No One of the 10 categories (defaults to "inspiration")
source No Book, URL, or reference (max 200 chars)
notes No Personal notes (max 300 chars)

Test plan

  • Upload valid CSV file and verify quotes are parsed correctly
  • Verify validation errors display for missing required columns
  • Test drag & drop file upload
  • Create new collection during import
  • Add to existing collection during import
  • Import without collection assignment
  • Verify keyboard accessibility on drop zone

kYem added 5 commits January 10, 2026 22:31
Add ability to import quotes from CSV files for bulk import from books,
articles, or other sources. Users can optionally assign all imported
quotes to a new or existing collection during import.

- Create CSV parsing utility in @cuewise/shared with validation
- Add CSVImportModal component with drag & drop file upload
- Support required columns (text, author) and optional (category, source, notes)
- Show preview of parsed quotes before importing
- Add bulkAddQuotes action to quote-store
Add 43 tests covering:
- Empty and invalid input handling
- Valid CSV parsing with various column configurations
- Quoted fields and special characters (commas, escaped quotes)
- Category validation and defaults
- Field length validation
- Mixed valid/invalid rows
- File validation (type and size)
Users can now download a pre-formatted CSV template with example
quotes to understand the expected format before importing their own.
- template now includes a comment line listing all valid categories
- parser updated to skip comment lines (lines starting with #)
- added tests for comment line handling
@kYem kYem merged commit a403b84 into main Jan 10, 2026
@kYem kYem deleted the feature/csv-quote-import branch January 10, 2026 17:00
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