Commit graph

16113 commits

Author SHA1 Message Date
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
abaevbog
9640875fcf
Space on an option of menulist dropdown will select it (#5783)
Fixes: #5779
2026-02-09 16:43:23 -05:00
Dan Stillman
c35d7f21e9 Upload build-{os}.json manifests to deployment server
Needed by zotero/client-downloads@4b2060361, which reads build
metadata from these files instead of hardcoding it.
2026-02-09 15:24:07 -05:00
Dan Stillman
8a1bdacf7d Fix WebDAV verification failure on OPTIONS/PROPFIND auth type mismatch
`checkServer()` was capturing the Authorization header from OPTIONS and
explicitly setting it on PROPFIND via `setRequestHeader()`. If the auth
type didn't match what the server required for PROPFIND (e.g., Basic vs.
Digest, though maybe other things too), the explicit header could
prevent Firefox from negotiating the correct auth scheme on the 401
challenge.

To fix, move `onAuthorizationHeader()` from OPTIONS to PROPFIND and
don't pass captured auth to PROPFIND, letting Firefox handle the auth
transparently.

https://forums.zotero.org/discussion/129665/webdav-error-for-zotero-8-0-3
2026-02-09 14:21:58 -05:00
Dan Stillman
5cb83c69c6 Fix incorrect bold text in file-renaming banner 2026-02-09 14:21:58 -05:00
Yago Iglesias
fe3021701e
Use grep -E instead of egrep (#5789) 2026-02-09 09:54:19 -05:00
Dan Stillman
06794ce278 Update note-editor submodule 2026-02-06 15:57:43 -05:00
Dan Stillman
fa30baf523 Add CLAUDE.md with project guidance for Claude Code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 15:54:09 -05:00
Dan Stillman
c7014b97c7 Update locales from Transifex 2026-02-06 15:47:31 -05:00
Dan Stillman
752b0f7008 Convert preferences_sync.xhtml from spaces to tabs 2026-02-06 15:15:30 -05:00