Commit graph

16710 commits

Author SHA1 Message Date
Dan Stillman
847dffbf18 Update CI to Node 24
Include the version in the node_modules cache keys so that a version
change starts fresh caches.
2026-08-20 12:34:40 -04:00
Dan Stillman
96972db8c6 Don't install xvfb in Linux CI
xvfb comes with the GitHub runner image.
2026-08-20 12:34:39 -04:00
Dan Stillman
dac1ad489f Update utilities submodule
Some checks are pending
CI / Detect changes (push) Waiting to run
CI / Test () (push) Blocked by required conditions
CI / Test (macOS NFS) (push) Blocked by required conditions
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
And add test for citing date strings wrapped in double quotes

https://forums.zotero.org/discussion/133277/
2026-08-19 15:28:34 -04:00
Dan Stillman
ed8049dffc Run network-filesystem tests only for relevant changes, and on macOS
Run the smb/nfs test shards and a new macOS NFS job only when the
changes touch the Gecko version or the network-filesystem database
handling, plus on manual and monthly scheduled runs, via a 'changes'
job feeding the test matrix. The macOS job uses the native NFS server
with a loopback mount and runs the real code path that crashed on
network data directories on macOS.
2026-08-19 11:13:15 -04:00
Dan Stillman
e1759daa00 Show in-window message in style preview instead of progress popup
Since 30b5bf4bb9, the popup opens as a dependent window of the main
window, so it appeared behind the Style Preview window and, on Windows,
brought the main window to the front.

https://forums.zotero.org/discussion/133296/
2026-08-19 10:54:56 -04:00
Dan Stillman
4e532a17a2 Skip symlink tests on filesystems without symlink support
CIFS mounts can't create real symlinks without special mount options,
so skip the symlinked-database and broken-symlink tests when a created
symlink doesn't exist or isn't visible as one.
2026-08-19 09:37:38 -04:00
Dan Stillman
ad1bec62f2 Use offline database backups on network filesystems on Linux
The online backup API writes the backup file through SQLite's default
VFS, whose locking can hang on network filesystems -- its lock upgrades
conflict with the SMB byte-range lock mapping on CIFS mounts and retry
forever -- so fall back to an offline backup, which copies the file
with the connection closed. Extends getFileSystemInfo() to Linux using
statfs f_type magic numbers.
2026-08-19 09:37:38 -04:00
Dan Stillman
18f6fa50d5 Add CI test shards with the data directory on SMB and NFS shares
Adds 'smb' and 'nfs' entries to the test matrix that run the DB and
file test suites with the test data directory on a loopback CIFS or
NFS mount, covering the network-filesystem database handling from
bba85a3939. The test harness places the data directory under TMPDIR,
so connection initialization itself runs against the share, which is
where network-filesystem failures (startup crashes and hangs) occur.
The step timeout turns a startup hang into a failure.
2026-08-19 09:37:37 -04:00
Martynas Bagdonas
db1216d3e2 Fix annotations not appearing when imported while reader is opening
Fixes https://forums.zotero.org/discussion/133270/bug-embedded-pdf-annotations-and-highlights-fail-to-render-in-zotero-reader
2026-08-19 10:06:31 +03:00
Dan Stillman
b6837a3a57 Fix doubled Index Statistics numbers after searching in preferences
Some checks are pending
CI / Test (shard 1) (push) Waiting to run
CI / Test (shard 2) (push) Waiting to run
CI / Test (shard 3) (push) Waiting to run
CI / Test (shard 4) (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
The preferences search feature moves label value attributes into text
content for highlighting, so stats refreshes that set the value
attribute rendered the new number in front of the stale text.

https://forums.zotero.org/discussion/comment/516909/#Comment_516909
2026-08-18 17:42:34 -04:00
Dan Stillman
bba85a3939 Fix database access on network filesystems on macOS and Linux
On macOS, SQLite chooses locking methods based on the filesystem
containing the database, and network filesystems (e.g., SMB, NFS),
read-only volumes, and filesystems without byte-range locking get
methods without shared-memory support, which WAL requires. Opening a
database with an adjacent WAL file on those crashes -- Mozilla's VFS
wrapper hides the missing shared-memory methods from SQLite's WAL
support check -- so the first Zotero 10 run converted the database to
WAL and every launch after that segfaulted during connection
initialization.

On macOS, mirror SQLite's method selection and use a rollback journal
when shared memory isn't available, converting an existing WAL database
before opening it: an empty WAL by reverting the header format versions
in place, and a non-empty WAL by replaying it into a temporary copy on
local disk that replaces the database file only after passing an
integrity check. A WAL file next to an already-converted database
(e.g., from an interrupted conversion) goes through the same
conversion. Also use openNotExclusive during integrity checks and
corruption recovery, which otherwise fail on SMB shares with an I/O
error from the exclusive open lock.

This corrects 22055d92b7, which passed openNotExclusive on all
platforms for an open failure described as affecting macOS and Linux,
and expected locking_mode=EXCLUSIVE to keep the WAL index in heap
memory with no -shm file. Neither claim held up: mozStorage opens the
WAL while initializing the connection, before any pragma can run, so
the index uses shared memory unless the exclusive VFS is in use, and
the exclusive open works on Linux CIFS mounts -- where non-exclusive
access instead made SQLite's lock-upgrade sequence trip over the SMB
byte-range lock mapping, leaving startup hung and the database never
created. So pass openNotExclusive only on macOS. On Linux this restores
unix-excl, which performs all locking under a single held lock and
keeps the WAL index in heap memory; Windows has no distinct exclusive
VFS and is unaffected.

https://forums.zotero.org/discussion/133258/
2026-08-18 14:38:37 -04:00
Dan Stillman
5757396197 Fix changelog URL generation for two-digit major versions
Some checks are pending
CI / Test (shard 1) (push) Waiting to run
CI / Test (shard 2) (push) Waiting to run
CI / Test (shard 3) (push) Waiting to run
CI / Test (shard 4) (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
The short version was derived from the first three characters of the
version string, so 10.0 produced a detailsURL of "10._changelog".
2026-08-17 12:10:35 -04:00
Dan Stillman
5a6c9245f0 Fix locale update script under rpl 2.x
rpl 2.1.0 guesses each file's character encoding instead of assuming
UTF-8, and aborts on some locale files, leaving the script's later
steps unrun. Pin the encoding, and use -exec + so a failure in one of
these passes actually stops the script.

Also drop the ⏎ replacement, which hasn't matched anything since 2013
and would now insert real newlines rather than literal \n, truncating
.properties entries.
2026-08-17 09:57:58 -04:00
Abe Jellinek
844bd87824 Update reader submodule
Some checks failed
CI / Test (shard 1) (push) Has been cancelled
CI / Test (shard 2) (push) Has been cancelled
CI / Test (shard 3) (push) Has been cancelled
CI / Test (shard 4) (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
CI / Build, Upload (push) Has been cancelled
2026-08-14 13:41:03 -04:00
Dan Stillman
e0f9710c46 Update utilities submodule
edtf.js is replaced with a built-in parser in date.js, so it no longer
needs to be loaded at startup.
2026-08-14 10:44:23 -04:00
Maximilian Schmidt
b8fdee865a
Fix zero local data object versions (#6016)
Some checks are pending
CI / Test (shard 1) (push) Waiting to run
CI / Test (shard 2) (push) Waiting to run
CI / Test (shard 3) (push) Waiting to run
CI / Test (shard 4) (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
2026-08-13 11:23:05 -04:00
Dan Stillman
29a4d9d140 Skip focus traversal tests when the pane window can't be activated
The traversal waits on focus/blur events, which Gecko fires only while
the window is active, so a window that can't be activated -- another
app focused during a local run, or intermittent deactivation in CI --
timed out after 10 seconds instead of reporting that it couldn't run.
2026-08-13 10:43:51 -04:00
Dan Stillman
472a0bf856 Update utilities submodule
And add a test for citing a spelled-out BCE date, which citeproc-js
rendered as AD.
2026-08-13 10:01:09 -04:00
Tom Najdek
68bec97114
Add support for importing from encrypted Mendeley Desktop DB (#6019) 2026-08-13 09:33:41 -04:00
Dan Stillman
4a6a8220ff Fix error from header element in updater window
Some checks are pending
CI / Test (shard 1) (push) Waiting to run
CI / Test (shard 2) (push) Waiting to run
CI / Test (shard 3) (push) Waiting to run
CI / Test (shard 4) (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
attributeChangedCallback() runs before the content has been rendered.
2026-08-12 17:18:52 -04:00
Dan Stillman
f53d4b5eca fx153: Fix update window getting stuck on "Looking for changes"
Firefox 153 removed the wizard's extra1 and extra2 buttons, so onLoad()
threw while caching their labels and never got to starting the update
check or adding the page handlers. Create the buttons ourselves instead.
2026-08-12 17:18:52 -04:00
Dan Stillman
1d6158dfd8 Remove Linux i686 build support 2026-08-12 16:36:41 -04:00
Dan Stillman
5df473cf96 Fix grep warnings about stray backslashes during MAR builds 2026-08-12 16:29:20 -04:00
Dan Stillman
e7767c5bfa Don't build Linux i686 updates for Zotero 11
i686 builds are gone as of Zotero 11, so a full build failed trying to
package a linux-i686 MAR from a staging directory that no longer exists.
Skip the architecture entirely, and don't download it for older FROM
versions when building incrementals.
2026-08-12 16:29:20 -04:00
Dan Stillman
8d01216e5c Fix flaky search tests that used common words
Tests asserted exact search results for words like "one" and "two", so
a leftover item from an earlier test whose random title contained one
of the words as a substring could match and fail the assertion. Use
distinctive random strings instead.
2026-08-12 14:24:22 -04:00
Dan Stillman
8ac1273acb Support citing EDTF dates in the Date field and Extra
EDTF dates -- ranges ("2021/2026"), uncertain/approximate dates
("2004-06~"), and BCE dates ("-0429") -- and common equivalent notations
("1995-1996", "2021-22", "~1995", "ca. 1995", "429 BCE") are now passed
to citeproc-js as CSL date ranges, circa flags, and negative years.
Previously, such dates were mangled or dropped entirely unless entered as
CSL variables in Extra.

CSL date variables in Extra get the same parsing.

Other date handling in the client doesn't understand EDTF yet: the y/m/d
indicator in the date field doesn't reflect EDTF parsing, date searches
only match a range by its start date, and BCE dates still can't be
sorted.

Addresses #637
2026-08-12 14:11:26 -04:00
Dan Stillman
399a63ade2 Fix CI failures from items-in-view count updates
The debounced count update from fe35127f50 went through itemSelected()
and fired on any notifier change, so a pending timer could bump the
itemSelected spy after a test reset it, failing "shouldn't select a
modified item" in CI. Emit rowCountChange only when the row count
actually changed, and re-render the item pane message directly.
2026-08-12 13:25:34 -04:00
Dan Stillman
d9d52de516 Check that local app/ matches commit being built before deploying
The build-and-deploy scripts run scripts and config from the local
checkout but build source files from the tip of the remote branch, so
a stale or wrong-branch checkout could silently build with the wrong
Gecko version or omni patches.
2026-08-12 12:46:30 -04:00
Dan Stillman
a9e765e37f Remove 8.0 release build script 2026-08-12 12:46:30 -04:00
Abe Jellinek
fdec96911c Update reader submodule
Some checks are pending
CI / Test (shard 2) (push) Waiting to run
CI / Test (shard 3) (push) Waiting to run
CI / Test (shard 4) (push) Waiting to run
CI / Test (shard 1) (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
2026-08-11 13:42:41 -06:00
Abe Jellinek
ad7159834c Reader: Add support code for popup position persistence 2026-08-11 13:42:20 -06:00
Adomas Venčkauskas
e5508e870c Actually return 400 and throw when multipart body is malformed.
Some checks are pending
CI / Test (shard 1) (push) Waiting to run
CI / Test (shard 2) (push) Waiting to run
CI / Test (shard 3) (push) Waiting to run
CI / Test (shard 4) (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
Closes #6009
2026-08-10 16:16:00 +03:00
Dan Stillman
896582ab32 Hash files incrementally in md5Async() instead of blocking main thread
Some checks are pending
CI / Build, Upload (push) Waiting to run
CI / Test (shard 1) (push) Waiting to run
CI / Test (shard 2) (push) Waiting to run
CI / Test (shard 3) (push) Waiting to run
CI / Test (shard 4) (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
md5Async() read and hashed the entire file synchronously on the main
thread. Read the file via an input stream pump instead, with file I/O
off the main thread and hashing done a segment at a time.
2026-08-09 22:11:42 -04:00
Dan Stillman
c1cdd038a2 Select item explicitly in item-pane refresh test
The test relied on the automatic selection of a newly created item,
which can lose the race with a view switch (e.g., from another library
selected by a previous test), leaving the info pane empty.
2026-08-09 22:09:02 -04:00
Dan Stillman
fe35127f50 Update items-in-view count when rows change without a selection
Notifier events that added or removed rows (e.g., items downloaded
during a sync) didn't update the no-selection message in the item pane,
so the count went stale until the selection changed. The row provider
now emits a rowCountChange event, and the pane re-renders the count,
debounced, when nothing is selected.
2026-08-09 14:49:21 -04:00
Dan Stillman
b8cbdc8c95 Document in-memory state handling for transaction rollbacks 2026-08-09 14:33:22 -04:00
Dan Stillman
04321fc627 Restore cached user name on transaction rollback
Zotero.Users.setName() updated the in-memory cache even if the
transaction was later rolled back, so a retry (e.g., of a failed sync
download batch) would skip rewriting the users row.
2026-08-09 14:29:48 -04:00
Dan Stillman
3630b904d7 Process downloaded objects in batched transactions
Saving each downloaded object in its own transaction made large
download syncs extremely slow, since every object required a separate
disk commit. Objects are now saved in batches sized by the existing
notifier batch ramp, and a failed batch is reprocessed individually so
that an error still rolls back only that object's save. The cached
parent item is reloaded on rollback, since it would otherwise keep
collections added via newParentItemCollections in memory and the retry
would skip writing them.
2026-08-09 14:22:21 -04:00
Dan Stillman
646fbfae65 Don't treat error in commit callback as a rollback
An error thrown from a commit callback rejected executeTransaction()
even though the transaction had been committed, so callers would treat
saved data as rolled back, and rollback callbacks (e.g., the notifier
reset) ran against committed data. Commit-callback errors are now
logged instead, and any error after a successful commit skips rollback
callbacks and is marked with 'committed' on the error object.
2026-08-09 14:22:21 -04:00
Dan Stillman
46603ca4eb Discard queued commit callbacks on transaction rollback
If a transaction was rolled back, callbacks queued via
addCurrentCallback('commit') stayed queued and ran after the next
successful commit, potentially applying in-memory cache updates for
rolled-back data.
2026-08-09 14:22:20 -04:00
Dan Stillman
1d279fba5b Add executeTransactionWithForcedRollback() test helper
Runs a function within a transaction that's rolled back at the end,
with rollback callbacks guaranteed to have run by the time it returns.
Replaces try/catch blocks in existing tests that threw and caught a
marker string from executeTransaction() to force a rollback.
2026-08-09 14:22:20 -04:00
Dan Stillman
45867cea54 Update reader submodule
Some checks failed
CI / Build, Upload (push) Has been cancelled
CI / Test (shard 1) (push) Has been cancelled
CI / Test (shard 2) (push) Has been cancelled
CI / Test (shard 3) (push) Has been cancelled
CI / Test (shard 4) (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
2026-08-07 21:02:49 -04:00
Dan Stillman
c87328ada9 Fix leading space in creator autocomplete values
the all-creators mode (fieldmode 2) concatenated
firstname || ' ' || lastname, so a two-field creator without a first
name produced ' last', which advanced search fields inserted with the
space.
2026-08-07 11:03:57 -04:00
Dan Stillman
8f6dc583b8 Skip startup full-text index purge and optimize when unnecessary
Some checks are pending
CI / Test (shard 1) (push) Waiting to run
CI / Test (shard 2) (push) Waiting to run
CI / Test (shard 3) (push) Waiting to run
CI / Test (shard 4) (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
purgeOrphanedContent() ran on every startup, unlike the other
data-object purges, which are gated on the purge.* prefs.
startQueueDrain() also ran an FTS5 'optimize' even when the queues were
empty.

Gate the former on purge.items and the latter on having indexed
something.
2026-08-06 15:06:40 -04:00
Dan Stillman
3af8cea1af Name annotation types by type alone in the Advanced Search
Some checks are pending
CI / Test (shard 1) (push) Waiting to run
CI / Test (shard 2) (push) Waiting to run
CI / Test (shard 3) (push) Waiting to run
CI / Test (shard 4) (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
The menu labeled Annotation Type listed "Highlight annotation" and "Image
Annotation", from the strings the reader announces annotations with. Use
the short names, which existed for two of the six.
2026-08-05 15:02:21 -04:00
windingwind
09249bfb73
fx153: Interface should load with nsIID instead of string (#6008) 2026-08-05 14:18:32 -04:00
Dan Stillman
8fb2870f93 Restore dxcompiler.dll on Windows for WebGPU and leave WebGPU pref on
mozinference (which is currently CPU-only) is better for many tasks, but
plugins may want WebGPU for some features (e.g., chatbots), so just
follow Firefox, which currently enables it by default for Windows and
Apple Silicon macOS. Adds 5.8 MB compressed to the Windows installer.
2026-08-05 14:10:04 -04:00
Dan Stillman
9da57a9fe3 Search: Allow binding a group whose conditions match at any level
Binding is meaningful for a condition that matches at every level -- a
tag bound to an attachment means the tag is on the attachment -- but a
group carrying one lost the binding as soon as the search was
serialized, so "items with an attachment tagged foo" couldn't be built.
2026-08-05 13:14:37 -04:00
Dan Stillman
b83342d8e0 Include numeric cell values in row accessibility labels
The row label builder skipped values that weren't strings, so a numeric
cell -- a note count, or a pre-1000 year (which is parsed with
parseInt()) -- announced only its column
name.

Also switch to formatColumnName() while we're here, so row labels
resolve the column name the same way the header does.
2026-08-05 13:09:58 -04:00
Dan Stillman
2f90893e59 Fix clearing the previous sort column's persisted direction
The guard tested the newly clicked column's settings entry while the
delete targeted the previously sorted column's, so the old direction
survived when the new column had no entry, and clicking threw when the
old column had none.
2026-08-05 13:02:24 -04:00