Skip to content

fix(zotero): persist item conversations and restore their history - #1304

Merged
jorgepb96 merged 1 commit into
mainfrom
codex/zotero-item-conversation-history
Oct 23, 2026
Merged

jorgepb96 merged 1 commit into
mainfrom
codex/zotero-item-conversation-history

Conversation

@jorgepb96

Copy link
Copy Markdown
Owner

Summary

Switching from Zotero item A to B now opens B's active conversation (or an empty chat), and returning to A restores its previous chat. Conversations and history are bound to the parent item and library, while returning from a reader to the Library tab retains the current chat and sources.

Persist user turns before starting the assistant response, serialize history writes and deletions, and report save failures. Local history defaults on while preserving explicit opt-outs and retention settings. Recover legacy single-item ownership when it can be inferred unambiguously.

Closes #1303

Type of change

  • Bug fix
  • New feature or improvement

Validation

  • node --test scripts/test-zotero-plugin.mjs — 99 tests passed, including item switching, shared parent attachments, library identity isolation, item history deletion, restart recovery, concurrent persistence, and interrupted responses.
  • node scripts/smoke-zotero-xpi.mjs --timeout-ms 45000 — passed on Zotero 10.0.6 with a disposable profile, including item history persistence, restart recovery, deletion, and normal shutdown.
  • node --check zotero-plugin/content/sidebar.js
  • node --check zotero-plugin/content/store.js
  • git diff --check
  • New Zotero plugin workflow runs the plugin tests and XPI packaging and uploads the installable artifact.

For this PR, the maintainer requested only Zotero checks. The general CI run will be cancelled intentionally; unrelated desktop, native-platform, and research checks are outside this validation run. Normal CI routing remains unchanged.

Privacy and compatibility

Conversation data stays in the local Zotero profile. Stored ownership includes the library ID to prevent collisions between personal and group items. Explicit history opt-outs still prevent disk persistence. Regression tests use synthetic items, and live verification uses disposable profiles. Both English and Spanish UI strings are updated.

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.

Persist Zotero conversations per item and restore them when switching documents

1 participant