Repository navigation
fix(zotero): persist item conversations and restore their history - #1304
Merged
Merged
Conversation
This was referenced Oct 23, 2026
Closed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.jsnode --check zotero-plugin/content/store.jsgit diff --checkZotero pluginworkflow 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.