Commit graph

16820 commits

Author SHA1 Message Date
JRanne
d4bdd76026
Merge 08f9bfa53f into cc951f9916 2026-09-25 13:53:20 +08:00
Dan Stillman
cc951f9916 Rebuild Windows zotero.exe/updater.exe stubs from Firefox 153.3.0esr
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 / Test (Windows arm64) (push) Blocked by required conditions
CI / Test (Windows x64) (push) Blocked by required conditions
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
153.3.0esr updated the Chromium sandbox, changing the TargetConfig
interface that xul.dll calls into the launcher's sandbox broker
through. The stubs were still built from 153.0esr, so the 153.3.0esr
xul.dll called the wrong methods and crashed on startup with
"config->SetProcessMitigations(initialMitigations) failed".
2026-09-24 13:37:25 -04:00
Dan Stillman
5237f27060 Update builds to Firefox 153.3.0esr 2026-09-24 09:37:15 -04:00
Martynas Bagdonas
3ff64b658d Fix virtualized table scrollbar width oscillation
The item table mixed fractional and integer widths to calculate scrollbar
padding. At certain pane sizes, changing that padding changed the table
width, causing ResizeObserver to measure and update it again. The loop made
the Info pane and PDF tab flicker and kept CPU busy while idle.

Calculate scrollbar width from matching integer measurements to stop the
feedback loop.

Cause of the reproduced loop: 7df21ed introduced the mixed-width
calculation; f3328b0 made ResizeObserver rerender the table immediately.

Potentially fixes these reports:
- https://forums.zotero.org/discussion/133865/pdf-reader-flickers-shakes-trembles-macos
- https://forums.zotero.org/discussion/133718/bug-after-updating-to-zotero-10-0-2-64-bit-on-windows
- https://forums.zotero.org/discussion/133764/zotero-10-0-2-high-cpu-usage-with-pdf-right-sidebar-open
2026-09-24 09:22:16 +01:00
Abe Jellinek
ed8ca1bfce Item merging: Don't merge web link attachments with different URLs
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 / Test (Windows arm64) (push) Blocked by required conditions
CI / Test (Windows x64) (push) Blocked by required conditions
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
https://forums.zotero.org/discussion/133795
2026-09-23 13:53:08 -04:00
Dan Stillman
22a26bb483 Local API: Fix object writes with API-client-supplied keys
Requests that included a key got a 400 with `'primaryData' not
loaded for item`
2026-09-23 13:21:52 -04:00
Dan Stillman
4e3b208e4a Don't log an error when no bibliography locale is set
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 / Test (Windows arm64) (push) Blocked by required conditions
CI / Test (Windows x64) (push) Blocked by required conditions
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
In the error console in https://forums.zotero.org/discussion/133857/
2026-09-22 16:31:42 -04:00
Dan Stillman
5245b6cf5e Bundle Safari App Extension in release builds
The release script never set SAFARI_APP_EXTENSION, so 10.0 through
10.0.3 shipped with only the web extension, which doesn't run on Big Sur
or Monterey. Only beta builds have been including both.

https://forums.zotero.org/discussion/133871/
2026-09-22 16:14:03 -04:00
Dan Stillman
e061e565b7 Update release script to 10.0 branch 2026-09-22 16:07:56 -04:00
Dan Stillman
8e7639d73d Show virtual rows (e.g., Trash) matching the collection filter
https://forums.zotero.org/discussion/133833/cant-show-trash-via-collections-search
2026-09-21 23:26:03 -04:00
windingwind
7c7560bad1
Fix fcntl() flags not being passed by Subprocess on macOS (#6051)
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 / Test (Windows arm64) (push) Blocked by required conditions
CI / Test (Windows x64) (push) Blocked by required conditions
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
This showed up as devtools failing to start in a -d build on some machines, but any Subprocess.call() could fail because of it.

---------

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2026-09-21 15:05:34 -04:00
JRanne
08f9bfa53f
Merge branch 'main' into local-api-reader-open-items 2026-09-18 14:56:32 +03:00
Dan Stillman
b6f0f6c0ba Show login manager error when a credential write fails outside the keystore
Some checks failed
CI / Detect changes (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
CI / Build, Upload (push) Has been cancelled
CI / Test () (push) Has been cancelled
CI / Test (macOS NFS) (push) Has been cancelled
CI / Test (Windows arm64) (push) Has been cancelled
CI / Test (Windows x64) (push) Has been cancelled
The login manager can fail to store a value even when the OS keystore
works -- e.g., if key4.db is read-only, which Firefox 153 triggers
because NSS now creates a new AES key on the first write. Show the
existing corrupted-logins instructions instead of the keystore alert or
the unencrypted-storage offer, neither of which can help.

Also update the corrupted-logins dialog to add an "Open Profile
Directory" button
2026-09-17 10:37:04 -04:00
Adomas Venčkauskas
213b0d7d76 Update Word for Mac submodule 2026-09-17 12:24:16 +03:00
Dan Stillman
acc4fd5ad2 Pass a temp copy of dragged attachment files on Windows
Allowing only 'copy' for file attachment drags kept File Explorer from
moving files out of 'storage' but locked the cursor at '+' even for
moves within Zotero. Instead, provide the file via a flavor data
provider that copies it to the temp directory when a target asks for it,
so the drag can allow 'copyMove' again and Explorer's move only touches
the copy. A copy's directory is removed once Explorer has moved the file
out of it, at the next drag, or with the temp directory at shutdown.
2026-09-16 22:39:03 -04:00
Dan Stillman
bdb656ad5c Fix dragging file attachments to and from parent items on Windows
Since 56eb77b704, drags of file attachments allow only 'copy' so that
File Explorer doesn't move the file out of storage, but the trees set
dropEffect to 'move' in onDragOver() for drops within Zotero, and OLE
refuses a drop whose dropEffect isn't among the drag's allowed effects.
Have setDropEffect() fall back to an allowed effect and have onDrop()
act on the effect the tree chose, kept in
Zotero.DragDrop.currentDropEffect, rather than on the drop event's
dropEffect.

https://forums.zotero.org/discussion/133765/
2026-09-16 22:38:23 -04:00
Dan Stillman
c30163ed90 Fix row contents shifting when showing a between-rows drop indicator
Some checks are pending
CI / Detect changes (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
CI / Test () (push) Blocked by required conditions
CI / Test (macOS NFS) (push) Blocked by required conditions
CI / Test (Windows arm64) (push) Blocked by required conditions
CI / Test (Windows x64) (push) Blocked by required conditions
The drop indicator span was inserted before the cells, so the first
cell stopped matching :first-child and picked up inline-start padding.
Insert it after the cells instead.

Regression from 5ca1fbb167, which replaced the .first-column class with
:first-child.
2026-09-16 15:44:05 -04:00
Dan Stillman
1d4b8bc89a Fix WebDAV auth for passwords containing '%' followed by two hex digits
fd812070b6 made _parseURI() decode the URL credentials so that
download() could build its own Basic Auth header from the decoded
values, but request() passed the decoded credentials to xmlhttp.open(),
which percent-decodes them again, so a password like "example%41pass"
was sent as "exampleApass". Re-encode the credentials before passing
them to open().

Fixes #6048
2026-09-16 10:04:14 -04:00
Dan Stillman
3c959e1012 Pass a triggering principal when launching non-HTTP URLs
Some checks failed
CI / Detect changes (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
CI / Build, Upload (push) Has been cancelled
CI / Test (macOS NFS) (push) Has been cancelled
CI / Test (Windows x64) (push) Has been cancelled
CI / Test () (push) Has been cancelled
CI / Test (Windows arm64) (push) Has been cancelled
Gecko 140.15 made nsIExternalProtocolService.loadURI()'s triggering
principal mandatory, so Zotero.launchURL() threw NS_ERROR_ILLEGAL_VALUE
for any scheme handled by an external app.

https://forums.zotero.org/discussion/133709/
2026-09-11 14:31:51 -04:00
Dan Stillman
ab34e9031a Handle overlong filenames in getClosestDirectory()
Some checks are pending
CI / Test (Windows arm64) (push) Blocked by required conditions
CI / Test (Windows x64) (push) Blocked by required conditions
CI / Build, Upload (push) Waiting to run
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
relinkAttachment() calls getClosestDirectory() before showing the file
picker, and a too-long filename caused the OS.File.stat() in
getClosestDirectory() to throw, which prevented the file picker from
appearing after clicking Locate.

https://forums.zotero.org/discussion/133685/
2026-09-10 09:53:46 -04:00
Dan Stillman
913aff342d Say a keyring service may need to be installed on Linux
Some checks are pending
CI / Detect changes (push) Waiting to run
CI / Test (macOS NFS) (push) Blocked by required conditions
CI / Build, Upload (push) Waiting to run
CI / Test () (push) Blocked by required conditions
CI / Test (Windows arm64) (push) Blocked by required conditions
CI / Test (Windows x64) (push) Blocked by required conditions
CI / Utilities Tests (push) Waiting to run
https://forums.zotero.org/discussion/133599/
2026-09-09 14:34:11 -04:00
Dan Stillman
cc700a1e11 Add a More Information link to keystore failures on Linux
https://forums.zotero.org/discussion/133599/
2026-09-09 14:34:10 -04:00
Dan Stillman
e03920890a Start HiddenBrowser loads from the parent process
Some checks are pending
CI / Build, Upload (push) Waiting to run
CI / Detect changes (push) Waiting to run
CI / Test () (push) Blocked by required conditions
CI / Test (macOS NFS) (push) Blocked by required conditions
CI / Test (Windows arm64) (push) Blocked by required conditions
CI / Test (Windows x64) (push) Blocked by required conditions
CI / Utilities Tests (push) Waiting to run
Firefox ESR 140.15 rejects loads from a content process for URLs that
process couldn't load on its own, including blob: URLs created by chrome
code. Full-text indexing loads HTML attachments through such a URL, so
indexing crashed Zotero with "Illegal load attempt of blob: URL from
web". Loads started by the parent are exempt, so start the load there
and use the child actor only to disable content retargeting.

https://forums.zotero.org/discussion/133661/
2026-09-08 17:08:55 -04:00
Dan Stillman
26988646bf Include the error message in startup error dialogs
SpiderMonkey stacks contain only frames, so the startup error messages
that showed just the stack didn't say what had failed. 9b3d7a32e3 added
the message to one of the three, where a ternary-precedence bug then
dropped the surrounding text instead. Format all three the same way.
2026-09-08 16:12:47 -04:00
Dan Stillman
bdaecbb5cc Detect database corruption reported by a transaction's commit
We only ever checked for corruption errors from transactions in
queryAsync(), so a corruption error raised by the COMMIT that mozStorage
runs itself bypassed the check. A 10.0 schema upgrade -- which heavily
exercises the database -- that failed due to corruption showed "Database
upgrade error" and a single Sqlite.sys.mjs frame instead of the prompt
offering to restore from a backup.

Two users reported this, but it's not clear what triggered it --
corruption usually occurs during a statement, which we did catch. There
may have been some statement transaction whose corruption error was
caught and ignored rather than being left to abort the transaction,
causing SQLite to then block the commit. That's what the test does, and
it fails without the fix.

https://forums.zotero.org/discussion/133611/
2026-09-08 16:01:23 -04:00
Dan Stillman
a43c1d5ad5 Update reader submodule 2026-09-08 09:37:42 -04:00
Dan Stillman
fc17dcd24a Tell the user to set up syncing again if credentials can't be decrypted
Some checks failed
CI / Build, Upload (push) Has been cancelled
CI / Detect changes (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
CI / Test () (push) Has been cancelled
CI / Test (macOS NFS) (push) Has been cancelled
CI / Test (Windows arm64) (push) Has been cancelled
CI / Test (Windows x64) (push) Has been cancelled
If the keystore's secret is replaced -- say, after a keyring reset --
the stored value won't be able to be decrypted again, so tell them to
try logging in again instead of trying to fix their keyring.

https://forums.zotero.org/discussion/133603/
2026-09-04 18:12:31 -04:00
Dan Stillman
1086d80cec Update reader submodule 2026-09-04 16:06:00 -04:00
Dan Stillman
92dfac8c64 Don't make an unloaded tab reopenable with Undo Close Tab
unload() closes and re-adds the tab, and the close recorded an undo-close
history entry, so Undo Close Tab could open a duplicate of a tab that was
still open.
2026-09-04 15:30:33 -04:00
Dan Stillman
e88b7ee10f Don't clear the hidden flag when refreshing retractions data
_addEntry() wrote the row with REPLACE INTO, listing only itemID and
data, so flag reverted to its default of 0. It's called for every match
on every update, not just new ones, so a retraction the user had hidden
came back as soon as the list changed and Zotero restarted.
2026-09-04 15:07:15 -04:00
Dan Stillman
53bcd30a5f Don't report a window's observers as leaked while it's still closing
A window is marked as closed before its unload handlers run, so the tab
events fired from ZoteroPane.destroy() warned about every observer that
the closing window hadn't torn down yet. The leak check now also requires
the window to be detached from its docShell, and it covers functions. It
caught an observer that outlived its window -- the sync-reminder API key
observer, which is now unregistered on teardown.
2026-09-04 14:40:24 -04:00
Dan Stillman
22a1b33a42 Remove library tree event listeners on teardown
Listeners added to the item and collection trees' event bindings
survived unregister() and held ZoteroPane and the views for as long
as the tree objects did. makeClassEventDispatcher() now provides
clearEventListeners(), which the trees call on unregister, so callers
don't need to remove their own listeners. The collection tree focus
listener, a plain DOM listener, is removed in destroy().
2026-09-04 14:28:11 -04:00
Dan Stillman
0e46a5356b Fix tag selector observer leaks on uninit
Hiding the tag selector destroyed the TagSelectorContainer but left
its media-query listener registered, keeping the destroyed instance
alive for the lifetime of the window and firing setState() on the
unmounted component when the display density changed. The fontSize
pref observer id was also overwritten by the uiDensity registration,
so it was never unregistered.
2026-09-04 14:28:11 -04:00
Dan Stillman
d0a32a3b4f Poll for expected tag selector state in flaky tests
Selecting a collection doesn't wait for the tag selector to re-render,
so waitForTagSelector() could be resolved by the initial render instead
of the awaited change, and the assertions could run against a stale tag
list.
2026-09-04 14:28:11 -04:00
Dan Stillman
b3b6e7f33d Reopen closed reader and note tabs at their original position
The undo-close hooks read the index from the wrong object, so reopened
reader and note tabs were always appended at the end.
2026-09-04 14:24:47 -04:00
Dan Stillman
4d94810def Don't send a conditional request for an invalidated retractions cache
The cached retractions list is saved with the current data version from
the code, which we can bump to make clients discard their cached data
and refetch it. We've never actually done that, but if we did, it
would've hit a bug: init() would've started the refetch but still sent
the cached ETag, so if the list itself hadn't changed, the server
would've returned 304 and nothing would have been updated. The stale
version then would have survived, so the refetch would have been retried
on every startup.
2026-09-04 13:27:12 -04:00
Dan Stillman
54cea6cc37 Update Retraction Watch reason descriptions
Retraction Watch has renamed, merged, and added reason terms since these
were added, leaving only 65 of the 102 entries matching a term still in
use. 90% of retracted items had at least one reason that didn't show a
description, and 21% showed none at all. Rebuilt from the current
Appendix B list, which covers every reason in the data.
2026-09-04 13:12:43 -04:00
Dan Stillman
f3810befde Show file access error for NS_ERROR_FILE_FS_CORRUPTED
Windows returns this for ERROR_FILE_CORRUPT/ERROR_DISK_CORRUPT. It's not
in xpc.msg, so the exception has an empty name and isn't in
Components.results, and it was falling through to the generic file sync
error instead of the file access error with the path. Show a message
about the reported corruption in place of the usual permissions advice.

https://forums.zotero.org/discussion/133592/
2026-09-04 12:37:49 -04:00
Jakob Nylin
e3da52bebc
Match duplicate books by ISBN-10/13 equivalence (#6028)
---------

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2026-09-03 12:42:04 -04:00
Martynas Bagdonas
9086156a91 Update document-worker submodule 2026-09-03 18:20:11 +03:00
Dan Stillman
e56fad828d Throw from removed selection methods in pre-release builds
The shims from 5697ee0af7 keep old plugins working for users, but
beta/dev/source builds should still throw to get the attention of
developers and (hopefully breakage-tolerant) beta users.
2026-09-02 22:34:19 -04:00
Dan Stillman
0e00c1ce51 Center single-paragraph items pane status messages when they wrap
Status messages were left aligned for the multi-paragraph intro text,
but in a narrow window, that made single lines that wrapped sit
off-center, so center those instead.
2026-09-02 22:16:13 -04:00
Dan Stillman
5697ee0af7 Shim removed selection methods when a single row is selected
Plugins written for earlier versions call methods like
CollectionTree#getSelectedSearch(), which now throw. We did this
intentionally to make old code more obviously broken, even with single
selection, so developers would fix their code, but we're not yet
blocking plugins that illegitimately declared compatibility with a
future version, so some haven't been updated and are breaking Zotero.
With a single row selected, the pre-10 functions can technically
continue to work, so for now, restore them and just warn and name the
plugin instead of throwing. They still need to throw if multiple rows
are selected, since plugins that haven't been updated can't safely act
on a selection that might span collections or libraries.

https://forums.zotero.org/discussion/133565/
2026-09-02 22:16:13 -04:00
Dan Stillman
fac6c8ebf6 Name the responsible plugin when the items list fails to load
A plugin that monkey-patches a method in the item list's load path --
say, Zotero.CollectionTreeRow.prototype.getItems() -- can throw and
leave the pane showing only "Error loading items list", with nothing in
the error report to identify it. Update the message to name the culprit.

https://forums.zotero.org/discussion/133565/
2026-09-02 22:16:12 -04:00
Dan Stillman
08ed64f17f Fix "false" in Added By/Modified By columns for trashed collections
The row values were computed with `row.isItem && …`, so collection and
search rows in the trash got the boolean `false`, which the table then
rendered as the text "false".

https://forums.zotero.org/discussion/133560/
2026-09-02 12:18:12 -04:00
Dan Stillman
9e28eb0d39 Don't clear the saved session if startup fails
Zotero.Session.save() runs from a quit-application-granted observer
registered before the database checks, but session.json is only read
after them, so a startup error -- an incompatible database from a newer
version, say -- meant that quitting overwrote the file with an empty
state and all open tabs were lost.

https://forums.zotero.org/discussion/133542/
2026-09-01 22:56:41 -04:00
Dan Stillman
661843b03f Fix sync error due to invalid attachment filename
A stored-file path of 'storage:/' -- left behind by the 128 schema step,
which skipped paths with no basename -- triggered an
NS_ERROR_FILE_UNRECOGNIZED_PATH that aborted the whole
checkForUpdatedFiles() loop, so no files synced in the library. Skip an
attachment that throws instead of failing the whole library.

Also apply the setter's directory-path rule in getFilePath[Async]() to
avoid errors elsewhere.

https://forums.zotero.org/discussion/133523/synchronize-issue
2026-09-01 22:52:54 -04:00
Dan Stillman
a0ce7b3256
Show recently used collections in the Add to Collection menu (#6036)
Collections are now tracked as they're selected, added to, or dropped
on, and the five most recent usable targets are listed above the
full collection hierarchy by full path.
2026-09-01 21:59:20 -04:00
Dan Stillman
4a8a88dd41 Fix error using a CSL 0.8 style
transformToDocument() needs a load group, which it takes from the source
document or from the window that created the XSLTProcessor. Neither of
those has existed since 0f2690eb75 in Zotero 8 stopped taking
XSLTProcessor from the hidden window, so the CSL 0.8 → 1.0 upgrade threw
NS_ERROR_FAILURE. In Word, this showed as "Zotero encountered an error
while updating your document."

https://forums.zotero.org/discussion/133543/
2026-09-01 15:45:48 -04:00
Martynas Bagdonas
b4f1deb998 Add note editor indentation strings 2026-09-01 12:06:28 +03:00