Commit graph

16122 commits

Author SHA1 Message Date
Dan Stillman
f6811bd1a8 Add Citation Key column
https://forums.zotero.org/discussion/130194/feature-request-citation-key-column-in-library-window
2026-03-08 14:46:39 -04:00
Dan Stillman
e60bf91e31 Fix PDF magic number sniffing matching anywhere in first 200 bytes
The %PDF- sniffer entry had no offset constraint, so it matched anywhere
in the file sample. This could cause ZIP files containing PDFs to be
misidentified as application/pdf when opened, since %PDF- could appear
within the first 200 bytes of the archive. Pin the match to offset 0,
where it must appear in a valid PDF.

Fixes https://forums.zotero.org/discussion/130161/zip-files-and-indexing
2026-03-08 14:46:39 -04:00
Abe Jellinek
81f80a62e3 Update RDF tests 2026-03-06 16:51:25 -05:00
Abe Jellinek
12942ec717 Update translators 2026-03-06 16:51:25 -05:00
Adomas Venčkauskas
ce11d5295c Update LibreOffice submodule 2026-03-06 13:57:53 +02:00
abaevbog
b80bcea184
add citationKey to quicksearch-titleCreatorYear (#5814)
So quicksearch and citation dialog in list mode search
by the citation key, in addition to title,creator,etc.

https://forums.zotero.org/discussion/130090/zotero-picker-i-cant-search-item-by-citation-key
2026-03-05 20:08:52 -05:00
Abe Jellinek
0abf2b455f
Add Read Aloud first-run guidance panel (#5818)
Plus guidance-panel changes:

- Fix description not updating when multiple panels exist
  in the document
- Fix nonfunctional noautohide attribute
- Show "Got It" button for noautohide with no navigation

---------

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2026-03-05 20:07:06 -05:00
Dan Stillman
20735c425f
Add resetData() as lightweight alternative to resetDB() for sync tests (#5822)
resetData() clears user data and sync state using application APIs
instead of doing a full Zotero shutdown/reinit cycle, making it much
faster for tests that just need clean state between runs.

Also make Tags.init(), Creators.init(), Users.init(), and
SyncedSettings.loadAll() properly clear their caches before reloading,
so they are safe to call more than once.
2026-03-05 15:54:10 -05:00
windingwind
76c7a613a9 Fix attachment preview 2026-03-05 12:24:26 -05:00
Mi Ramon
c0c9437da8
use different notes icons in itempane and tab sidepane (#5799) 2026-03-04 23:46:17 -05:00
Abe Jellinek
3a11ac146d Item merging: Don't merge trashed attachments of any type 2026-03-04 23:14:53 -05:00
Abe Jellinek
c9d108ba5e Extract merge logic to new module
Without changes. Most of this code was never called outside items.js,
so there was no reason to expose it.
2026-03-04 23:14:53 -05:00
Dan Stillman
810626e458 Temporarily disable attachment-pane tests due to test failures
https://github.com/zotero/zotero/issues/5810
2026-03-04 23:08:25 -05:00
windingwind
c4df6b2151
Fix should register other main window menus test (#5812) 2026-03-04 22:56:18 -05:00
Dan Stillman
3d09df1419 Temporarily disable attachments-pane tests due to test failures
https://github.com/zotero/zotero/issues/5810
2026-03-04 22:52:41 -05:00
Dan Stillman
9d5f46587e Disable Better BibTeX <9.0
https://forums.zotero.org/discussion/comment/508650/#Comment_508650
2026-03-04 22:43:24 -05:00
Dan Stillman
7c61d282ee Use our own blocked-plugin message that doesn't mention Mozilla 2026-03-04 22:43:11 -05:00
Abe Jellinek
a6a919234a Update reader submodule 2026-03-03 17:37:06 -05:00
Abe Jellinek
f07d7077b5 Read Aloud: Move caching to RemoteInterface 2026-03-03 17:36:51 -05:00
Abe Jellinek
4e60a9fbca Read Aloud: Don't log FTL fetching errors
appLocalesAsBCP47 contains locales that we don't have FTL files for, so
ignore those errors.
2026-03-03 16:07:47 -05:00
Abe Jellinek
db124860ed Read Aloud: Use POST for /speak 2026-03-03 15:40:35 -05:00
Dan Stillman
f5dd72dfb5 Run CI tests against zip-round-tripped build output
Instead of testing against the build/ directory directly, zip it up first
and then unzip it back into build/ before running tests. This ensures
tests run against the same artifact that gets uploaded to S3 and used by
the deployment scripts, catching issues that only manifest after a zip
round-trip (e.g., resolved symlinks, missing files).

Also makes Ruby setup conditional on deployment branches
2026-03-03 09:53:07 -05:00
Adomas Venčkauskas
1cd12791f6 Update LibreOffice submodule 2026-03-03 11:45:32 +02:00
Abe Jellinek
520a12ebe0 Update reader submodule 2026-03-02 17:51:17 -05:00
Abe Jellinek
b6ffa16893 Add failsafe to ensure pdf.js build worked 2026-03-02 17:46:05 -05:00
Abe Jellinek
a7c76e3202 CI: Trigger new build 2026-03-02 17:33:38 -05:00
Abe Jellinek
041fa48664 Read Aloud: Annotate Last Sentence → Annotate Sentence 2026-03-02 15:32:35 -05:00
Abe Jellinek
13f1606dc7 Read Aloud: Implement onPurchaseReadAloudCredits() 2026-03-02 14:47:14 -05:00
Abe Jellinek
3f90e60cd0 Remove AudioPlayback actor
Not necessary, and it caused some error spam.
2026-03-02 14:13:39 -05:00
Abe Jellinek
e63ed25b3f Read Aloud: Don't localize keys in Annotate Last Sentence 2026-03-02 13:32:28 -05:00
Abe Jellinek
8adee749e0 Read Aloud: Add key hint to Annotate Last Sentence string 2026-03-02 13:19:56 -05:00
Abe Jellinek
b0b2378866
Add support code for Read Aloud (#5355) 2026-03-02 13:00:23 -05:00
abaevbog
5905638907
Clear tag selector when itemTree selection changes, if needed (#5602)
Similar to how quickSearch is cleared already.

To avoid rerunning itemTree refresh twice (once for
clearing quickSearch and once for clearing tag filter),
clear tags and search text directly on collectionTreeRow.
And then call itemTree.refreshAndMaintainSelection to
refresh everything. Without it, tag selector sometimes
would find itself out of sync with current search
results and display tags as if quickSearch was not
cleared.

Fixes #5601
2026-02-28 15:41:32 -05:00
abaevbog
578361913a
Citation dialog: scroll to 1st cited row in library mode (#5782)
Scroll to the first cited item in this citation in current collection

Fixes: #5780
2026-02-28 15:33:36 -05:00
abaevbog
da4978354b
avoid reloading linked item each time it's fetched (#5565)
item.loadAllData() completely reloads all data and
may clear unsaved changes. Instead, Zotero.Items.loadDataTypes
will only load data once if it hasn't been loaded yet.

Followup to fefad8a9e3
per discussion in https://github.com/zotero/zotero/pull/5547#issuecomment-3373597427
2026-02-28 15:24:08 -05:00
Adomas Venčkauskas
003bdab3ff Auto-recover ALL-CAPS macOS corrupted word field codes.
Closes zotero/zotero-word-for-mac-integration#38
2026-02-26 16:22:28 +02:00
Tom Najdek
f0d3347b26
Fix tag splitting for strings containing Unicode characters. Fix #5807 2026-02-25 11:30:55 +01:00
Dan Stillman
f21e1b2d32 Add platform-native file change watcher for storage sync
Use platform-native file change APIs to track which stored-file
attachments have been modified, avoiding expensive full scans of all
attachment files during sync.

Backends:
- macOS: FSEvents (persistent event journal, survives restarts)
- Windows: ReadDirectoryChangesW (live recursive directory watch
  via overlapped I/O polling)
- Linux: inotify (live per-directory watches)

On unsupported platforms or on error, falls back to existing scan logic.
2026-02-24 14:15:15 -05:00
Dan Stillman
2739b29709 Avoid excessive /file requests during file sync
Don't mark attachments for download when server has no file (mtime is
null), and clear TO_DOWNLOAD state on 404 responses in both ZFS and
WebDAV so items aren't re-checked on every subsequent sync.
2026-02-22 23:45:55 -05:00
Adomas Venčkauskas
3386490a03 Fix browser toolbox switching windows breaking script debugging 2026-02-20 12:11:25 +02:00
Dan Stillman
2aaf0c213f DataObject: Set type-derived properties on prototype instead of per-instance
Move _ObjectType, _objectTypePlural, _ObjectTypePlural, and
_ObjectsClass from per-instance properties to prototype properties,
computed once per subclass on first instantiation. This avoids a huge
number of duplicate string allocations and reduce memory usage a bit
(e.g., ~35 MB in a 19K-item test library).
2026-02-17 12:09:59 -05:00
Dan Stillman
0d16d81a3c Share a single cached CSL.Engine instance across output formats
setOutputFormat() just sets this.opt.mode and this.fun.decorate, so
there shouldn't be a need to cache separate engines per format. The
format is excluded from the cache key, and setOutputFormat() is called
on cache hit instead.

Also simplify _preloadFormat() in quickCopy.js to only create one
engine instead of two (one per format).

Saves ~7 MB of resident memory (~140 MB before the citeproc-js
sort-macro caching optimization).
2026-02-17 12:09:59 -05:00
Dan Stillman
fe74fce120 citeproc-js: Cache sort-mode macro expansions to reduce memory usage
Previously, macros referenced by sort keys were expanded inline into
the sort token array every time they were encountered. Non-sort macros
were already cached in state.macros[name] and referenced via closures,
but sort-mode macros were duplicated across sort keys.

With a complex style like chicago-shortened-notes-bibliography (155
macros, 6 macro-based sort keys), this produced 179,605 tokens and
355,652 closures in bibliography_sort alone -- 99.9% of all tokens.

This commit caches sort-mode macro expansions in state.sort_macros[name]
using the same closure-reference approach as non-sort macros.

In addition to the memory savings, avoiding the redundant macro
expansion makes engine initialization dramatically faster with complex
styles.

Results with chicago-shortened-notes-bibliography:
- Engine initialization: 464 ms -> 57 ms (8x faster)
- Per-engine heap (Node.js): 123 MB -> 6.7 MB (94.6% reduction)
- Resident per engine (Firefox): ~140 MB -> ~7 MB
- Total tokens: 187,893 -> 11,669 (93.8% reduction)
- Total closures: 370,982 -> 21,823 (94.1% reduction)
- All 1,502 citeproc-js tests pass (at f88a47e6)
- Same 1501/1505 pass on master (same 4 pre-existing failures)
2026-02-17 12:09:59 -05:00
Dan Stillman
7fe4e50c4c HTTP.request(): Don't try to output responseText if not text response 2026-02-14 16:10:30 -05:00
Dan Stillman
c9ab1ec62c WebDAV: Compute fresh Digest auth headers for each request
The previous approach of capturing and replaying the Authorization header
from an initial request worked for Basic auth but broke with Digest auth,
where the header includes the HTTP method and URI in the hash. This caused
each replayed request to be rejected with a 401, which Firefox wouldn't
retry because the request already included Authorization.

Instead, split _channelAuthorization into _basicAuthHeader and
_digestParams. For Basic auth, the header is still replayed as-is. For
Digest, the challenge parameters (realm, nonce, qop, etc.) are cached
and a fresh Authorization header is computed per request.

_getAuthorizationHeaders() now takes method and URI parameters so it can
compute the correct Digest response hash for each request.
2026-02-14 16:10:30 -05:00
Abe Jellinek
ae397ca37c Fix item type becoming 'undefined' when menu is dismissed with Escape
By adding a missing getter override. If a setter is overridden, the
corresponding getter also needs to be overridden, or it will implicitly
return undefined.

Fixes #5793
2026-02-10 14:34:00 -05:00
Dan Stillman
c377c4c7ec CLAUDE.md: Additional test guidance 2026-02-09 22:38:33 -05:00
Dan Stillman
427fb1d4d9 Update version 2026-02-09 22:38:33 -05:00
windingwind
94dbdd5981
Skip plugin strict_max_version check on non-stable releases (#5781)
Unless `extensions.strictCompatibility` is set to true

resolve: #5775
2026-02-09 22:30:09 -05:00
Dan Stillman
fcd887a89d Fix cross-suite ZoteroPane test failures
Failed when running CollectionTree and ZoteroPane tests together

- Make `deleteSelectedItems()` async and await `deleteSelection()` so
  the full Notifier commit chain (including items list refresh)
  completes before the function resolves. Update tests to call
  `deleteSelectedItems()` directly instead of calling fire-and-forget
  keyboard events, and add a stubbed test for the Delete key binding.

- Fix "Delete Item…" menu test to explicitly re-select after `saveTx()`
  to guarantee selection state
2026-02-09 22:18:50 -05:00