Skip to content

BibTeX import silently drops author-less entries (no editor fallback, no user feedback) #32

Description

@inactinique

Summary

BibTeX import silently drops any entry that has no author field, with no fallback to editor and no user-facing indication that anything was skipped. Edited volumes and anonymous/collective works — both common in historical bibliographies — typically use editor instead of author, so importing a .bib file containing them loses those entries without any warning in the UI.

Found while auditing the ClioDeck wiki against the actual code (pass 15, feature pages & home cluster, least-scrutinized-bullet check).

Current behavior (verified against code)

  • backend/core/bibliography/BibTeXParser.ts:379-388 — the parser hard-requires both author and title (year is optional, defaulting to 'n.d.'). If author is missing, the entry is rejected outright (return null), logged only via console.warn('⚠️ Citation incomplète ignorée: ...').
  • There is no editor field handling anywhere in the file (grep -n "editor" BibTeXParser.ts returns nothing beyond this issue's own description) — no fallback exists for edited-volume entries.
  • The import flow (BibliographyPanel.tsx's performImport) tracks only newCitations/duplicates/total counts — nothing accounts for or surfaces silently-rejected entries to the user.
  • The parser's own test suite has an it.skip test whose description explicitly acknowledges this as a known gap ("current impl requires author... Test describes a non-feature").

Impact

A historian importing a .bib file that includes edited volumes, anonymous works, or other author-less entries (all standard in historical bibliography practice) loses those entries on import with zero indication anything went wrong — the import simply reports fewer citations than the file contained, with no way to tell which ones or why.

Suggested fix

Accept editor as a fallback when author is absent (a common BibTeX convention for edited volumes), and/or surface a rejected-entry count (with keys) in the import result so the user knows something was skipped instead of silently losing citations.

Evidence trail

  • backend/core/bibliography/BibTeXParser.ts:379-388 — the hard author/title requirement.
  • The parser's own it.skip test acknowledging the gap.
  • src/renderer/src/components/.../BibliographyPanel.tsxperformImport, no rejected-count tracking.
  • Wiki page corrected in the same pass: Features.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions