Skip to content

Add ability to import and bidirectionally sync Zotero reference collections - #654

Merged
petebachant merged 28 commits into
mainfrom
zotero-import
Jul 28, 2026
Merged

Add ability to import and bidirectionally sync Zotero reference collections#654
petebachant merged 28 commits into
mainfrom
zotero-import

Conversation

@petebachant

@petebachant petebachant commented Jul 26, 2026

Copy link
Copy Markdown
Member

Resolves #146

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Zotero-backed reference management to Calkit projects, including importing Zotero collections, syncing (pull) updates, and editing/viewing reference items and notes in the UI, with corresponding backend APIs and generated client updates.

Changes:

  • Implement Zotero import/sync endpoints plus reference item + note CRUD (with optional Zotero note/PDF integration).
  • Revamp the References page UI to support collection selection, search, item details modal (PDF + notes), and collection/item creation/editing flows.
  • Add BibTeX/LaTeX display-cleanup helpers (with tests) and introduce a project-wide Cmd/Ctrl+K command palette.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
frontend/src/routes/_layout/$accountName/$projectName/_layout/references.tsx New references UI with collection selection, search, modals, and Zotero import entry points
frontend/src/routes/_layout/$accountName/$projectName/_layout.tsx Mount project command palette in the main project layout
frontend/src/lib/bibtex.ts Add helpers to clean/display BibTeX/LaTeX field values
frontend/src/lib/bibtex.test.ts Test coverage for BibTeX display helpers
frontend/src/components/References/ReferencesInfoPanel.tsx Add info/comments panel for a selected references collection + Zotero sync button
frontend/src/components/References/ReferenceItemModal.tsx Full-screen reference item modal with PDF viewer + anchored notes editing
frontend/src/components/References/NewReferencesCollection.tsx Modal to create a new empty .bib references collection
frontend/src/components/References/ImportFromZoteroModal.tsx Modal flow to import from Zotero (whole collection or selected items)
frontend/src/components/References/FileViewModal.tsx Minor import/style adjustment for reference file viewing
frontend/src/components/References/EditReferenceItemModal.tsx Modal to add/edit a BibTeX entry in a collection
frontend/src/components/Common/SidebarItems.tsx Export project nav items for reuse by the command palette
frontend/src/components/Common/ProjectCommandPalette.tsx New Cmd/Ctrl+K project section jump palette
frontend/src/client/types.gen.ts Generated client types for new references/Zotero/note APIs
frontend/src/client/sdk.gen.ts Generated SDK methods for new references/Zotero/note endpoints
frontend/src/client/schemas.gen.ts Generated schemas for new references/Zotero/note models
backend/app/zotero.py Zotero Web API integration + BibTeX formatting + note (de)serialization helpers
backend/app/users.py Add helper to fetch Zotero API key plus Zotero user id
backend/app/tests/api/routes/projects/test_core.py Add extensive API tests for Zotero import/sync, PDF, reference items, and notes
backend/app/api/routes/projects/core.py Add/extend project routes for references collections, items, Zotero import/sync, and notes
AGENTS.md Add troubleshooting guidance for stale frontend client vs backend behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/routes/_layout/$accountName/$projectName/_layout/references.tsx Outdated
Comment thread frontend/src/components/References/ReferenceItemModal.tsx
Comment thread frontend/src/components/References/ReferenceItemModal.tsx Outdated
Comment thread backend/app/zotero.py Outdated
Comment thread backend/app/api/routes/projects/core.py Outdated
Comment thread backend/app/api/routes/projects/core.py Outdated
Comment thread frontend/src/components/References/ImportFromZoteroModal.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

frontend/src/routes/_layout/$accountName/$projectName/_layout/references.tsx:244

  • These reference-item rows are clickable (onClick) but aren’t keyboard-focusable and don’t respond to Enter/Space, which is an accessibility issue for keyboard-only users.
                        <Text
                          key={item.key}
                          fontSize="xs"
                          noOfLines={1}
                          py={0.5}
                          cursor="pointer"
                          fontWeight={isActive ? "semibold" : "normal"}
                          color={isActive ? "blue.500" : undefined}
                          _hover={{ color: "blue.500" }}
                          onClick={() => onSelectItem(item.key)}
                        >

Comment thread backend/app/api/routes/projects/core.py
Comment thread backend/app/api/routes/projects/core.py Outdated
Comment thread frontend/src/components/Common/ProjectCommandPalette.tsx Outdated
@petebachant
petebachant merged commit fc428ec into main Jul 28, 2026
4 checks passed
@petebachant
petebachant deleted the zotero-import branch July 28, 2026 04:53
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.

I want to be able to import references from Zotero so I can manage them on a project-by-project basis rather than as a horizontal silo

2 participants