Skip to content

fix: support Zotero 8 and stabilize citationKey handling#459

Open
Ascarshen wants to merge 1 commit intoPKM-er:masterfrom
Ascarshen:fix/zotero8-compat-citationkey
Open

fix: support Zotero 8 and stabilize citationKey handling#459
Ascarshen wants to merge 1 commit intoPKM-er:masterfrom
Ascarshen:fix/zotero8-compat-citationkey

Conversation

@Ascarshen
Copy link
Copy Markdown

Summary

This PR restores compatibility with Zotero 8 and fixes several related regressions in both the Zotero and Obsidian sides of obsidian-zotlit.

It focuses on three areas:

  • Zotero 8 menu and reader API compatibility
  • native citationKey / Better BibTeX fallback handling
  • Obsidian-side citation insertion and runtime/build fixes

Changes

  • added Zotero 8-compatible bootstrap fallback via Services.sys.mjs

  • updated item menu registration for Zotero 8

  • added MenuManager-based menu support and virtual menu adapters

  • updated reader menu/event hooks to support newer reader internals

  • hardened annotation update logic for changed reader iframe/window fields

  • fixed citekey backend selection in the db worker

  • fixed legacy BBT v0 search DB attachment alias

  • added fallback to Zotero native citationKey when BBT DBs are unavailable

  • fixed load status reporting for native citationKey fallback

  • updated Zotero addon compatibility metadata to strict_max_version: 8.*

  • fixed Obsidian-side async effect() callback issues

  • removed the broken direct dependency on @preact/signals-core

  • fixed plugin context typing around use.plugin(this)

  • improved template preview and citekey-click behavior for deferred markdown leaves

  • fixed JSON request parsing in the local Obsidian server

  • fixed citation insertion so stale results no longer render [@undefined]

  • updated default citation templates to skip missing citekeys instead of rendering undefined

Validation

  • app/zotero typecheck passed
  • app/obsidian typecheck passed
  • app/obsidian production build passed
  • verified literature note creation in a live Zotero + Obsidian setup
  • verified citation insertion no longer produces [@undefined]

Notes

This PR contains source-level compatibility fixes only.

I intentionally left local environment-only changes, temporary test fixtures, and unrelated workspace noise out of this branch.

@aidenlx
Copy link
Copy Markdown
Member

aidenlx commented Apr 10, 2026

Thank you! I'll test this locally and get this merged with some feat port back

@aidenlx
Copy link
Copy Markdown
Member

aidenlx commented Apr 10, 2026

i would suggest separate Zotero plugin changes from this PR so I can get obsidian plugin PR merged sooner and have an working obsidian plugin first. I haven't develop for Zotero plugins for quite some time so i'll need some time to catch up with the Zotero updates from 6 to 8.

@aidenlx
Copy link
Copy Markdown
Member

aidenlx commented Apr 10, 2026

btw, i've include an update that remove the custom build for better-sqlite3 from zotlit, you should rebase your branch first in case of conflicts.

@Ascarshen Ascarshen force-pushed the fix/zotero8-compat-citationkey branch from ebda9f5 to 0b8099e Compare April 13, 2026 05:08
@Ascarshen
Copy link
Copy Markdown
Author

Rebased onto latest master and split as requested. :)

This PR now only keeps the Obsidian-side changes plus the shared citekey/backend pieces needed by the Obsidian plugin:

The Zotero plugin changes have been moved to a separate branch/PR:

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.

2 participants