Commit graph

16188 commits

Author SHA1 Message Date
Dan Stillman
2522be0c17 Add test for removing group item from Recently Read on settings sync 2026-03-24 11:36:43 -04:00
Dan Stillman
a3909af5ab Clear lastRead in Item#fromJSON() when absent from API response
When the server returns an attachment without lastRead (because it was
cleared), fromJSON was not clearing the local value since it only
processes fields present in the JSON. Add explicit check after field
processing to clear lastRead when absent.
2026-03-24 11:36:43 -04:00
Martynas Bagdonas
6998235a31 Allow note creation when image annotation rendering fails
Fixes #5857
2026-03-24 11:56:53 +00:00
abaevbog
81591eb890
ItemTree: + expands all rows one level at a time (#5797)
On + keypress, expand the rows down one level, instead of
expanding all rows at once. If some rows are expanded
and some are collapsed, expand to the deepest level
currently visible.
E.g. if some regular items are already expanded,
expand only remaining collapsed regular items. If there
is a row with expanded attachments, expand all rows.

On - keypress, collapse the rows up one level to be consistent.

https://forums.zotero.org/discussion/129596/optional-annotations-in-item-list
https://forums.zotero.org/discussion/130365/expand-all-shift-in-zoteros-behavior-changed
2026-03-23 15:25:30 -04:00
Bogdan Abaev
6bec3c817e Citation dialog: allow to insert annotations (#5356) 2026-03-23 15:00:22 -04:00
Dan Stillman
587d5cda7e Show placeholder for image annotations without cache image in notes 2026-03-23 14:31:41 -04:00
Dan Stillman
351860273f Fix error creating note from image annotations when PDF file is missing 2026-03-23 14:31:41 -04:00
abaevbog
5823247df9
itembox: fix lost focus on tab from invalid DOI (#5856)
Fix lost focus on tab from DOI field after it is updated
from a valid to an invalid value.

https://github.com/zotero/zotero/pull/5850#discussion_r2976238955
2026-03-23 13:43:23 -04:00
Dan Stillman
d21a5d9cad Use Fluent strings for annotation type names
This also fixes title casing for "Image Annotation"/"Ink Annotation" in
the items list.

https://github.com/zotero/zotero/pull/5356#issuecomment-4112317776
2026-03-23 13:28:45 -04:00
Abe Jellinek
763330d1f4 Prevent attachment preview from bumping lastRead
And also use new _isTransient() to control lastPageIndex update, instead
of overriding _setState() as a no-op in ReaderPreview.
2026-03-23 12:54:00 -04:00
Mi Ramon
6fa5c4b3e3
Add "View Online" for PMID/PMCID (#5850)
resolves: #5845
2026-03-23 12:41:57 -04:00
Dan Stillman
fd7cc84f6b Fix quicksearch in Recently Read to match parent items
Add includeParents to the Recently Read search so parent items are
included in the search scope alongside their child attachments.
2026-03-23 11:22:01 -04:00
Dan Stillman
5bceea7b7b Fix Added By backfill skipping items when batch count doesn't change
Use itemID offset to advance through batches instead of comparing
result counts, which would bail out when the number of remaining items
equaled the previous batch size.
2026-03-23 10:25:34 -04:00
Dan Stillman
46ba21fe75 Add More Information link to Switch Accounts confirmation dialog 2026-03-23 10:25:33 -04:00
Abe Jellinek
8af91b0147
Bump lastRead when reader is closed (#5852) 2026-03-21 13:41:54 -04:00
Dan Stillman
e629a3c456 Update global schema to version 42 to enable lastRead fetching 2026-03-21 13:31:11 -04:00
Dan Stillman
6e5738de0f Try to fix missing Added By for some items
Backfill groupItems rows that have lastModifiedByUserID but null
createdByUserID (not totally sure how), and track completion with a
per-library flag in the settings table so the backfill only runs once
(since createdByUserID could potentially be permanently unavailable).
2026-03-21 12:27:27 -04:00
Dan Stillman
518056f9e7 Notify item tree after backfilling group item users
Fire a modify notifier event after _updateGroupItemUsers() so the
item tree refreshes to show the newly backfilled Added By / Modified By
values. Also change error handling from return to break so partial
progress still triggers the refresh.
2026-03-21 12:21:17 -04:00
Dan Stillman
ba3c3a506f Add test for preserving synced on lastRead setting download 2026-03-20 17:03:23 -04:00
Dan Stillman
e28c97dc56 Fix synced group item marked as unsynced when lastRead setting is applied
When a lastRead synced setting for a group item was downloaded and
applied via AttachmentReadObserver.notify(), the group attachment item
was saved without skipSyncedUpdate, causing it to be marked as synced=0.
On the next sync, this could trigger an upload attempt that failed with
403 for read-only group libraries.
2026-03-20 16:55:02 -04:00
Dan Stillman
7b17187a1a Update reader submodule 2026-03-20 15:46:42 -04:00
Dan Stillman
eb3a136ccd Use new batch setting deletion API endpoint
Use DELETE /settings?settingKey=key1,key2 instead of individual DELETE
per key, with batching matching uploadDeletionBatchSize.
2026-03-20 15:43:03 -04:00
Abe Jellinek
0ade1b9ed5 Show Attachments column by default in Recently Read 2026-03-20 15:19:03 -04:00
Dan Stillman
98d911f6b1 Add "Switch Accounts" flow for logged-out-but-linked state
When a user logs out without removing local data, the sync pane now
shows a third UI state with the linked username, a "Log In" button
(constrained to the same account), and a "Switch Accounts…" button
that shows a hard confirmation dialog requiring the user to type
"remove local data" before proceeding. On confirmation, local data
is reset and the app restarts, reopening the account preferences.
2026-03-20 13:11:52 -04:00
Dan Stillman
883747e372 Improve hard confirmation dialog textbox
- Show confirmation text as placeholder
- Auto-focus the textbox
- Fix border styling
2026-03-20 13:11:38 -04:00
Dan Stillman
35713fefd0 Upload setting deletions during sync
Deleted settings were written to syncDeleteLog but never uploaded. Add
dedicated setting deletion upload in _startUpload() using individual
DELETE requests per setting, since the API doesn't support batch setting
deletion.
2026-03-20 11:25:27 -04:00
Dan Stillman
3ebd26acc0 Fix saving lastRead in read-only library from synced setting
The same skipEditCheck fix from 5dc9705294 but for the synced setting
handler, which updates lastRead when a lastRead setting arrives via
sync for a group attachment.
2026-03-20 11:25:27 -04:00
Dan Stillman
5dc9705294 Fix saving lastRead in read-only library 2026-03-20 08:48:03 -04:00
Dan Stillman
cf7fcd751f Move lastRead column string from .properties to .ftl
Follow-up to 34039991f8
2026-03-19 16:19:52 -04:00
Dan Stillman
1d31ed2508 Fix sync runner test for updated login error button text 2026-03-19 15:48:16 -04:00
Dan Stillman
1502214b5d Web-based login flow
Replaces the login form with a "Log In" button that creates a dataserver
login session and opens the website for logging in. The client polls for
session completion every few seconds and also watches for a notification
from the streaming server.
2026-03-19 15:07:53 -04:00
Abe Jellinek
1f702fc5dc Read Aloud: Add sentence-granularity skip strings 2026-03-19 13:46:44 -04:00
Dan Stillman
c9f893a5a2 Update reader submodule 2026-03-19 12:46:37 -04:00
Martynas Bagdonas
376fba55b6 Update note-editor submodule 2026-03-19 15:57:30 +00:00
Dan Stillman
8401b83cb6 Update dateModified and lastModifiedByUserID when trashing 2026-03-19 11:35:15 -04:00
Dan Stillman
1fad46f983 Disable OA PDF lookups in feed item translation test
Avoid external network requests during test that may have been a source
of intermittent CI failures.
2026-03-19 11:04:22 -04:00
Dan Stillman
5b5b70b499 Show file size in MB instead of KB in ZFS quota warning 2026-03-19 10:38:57 -04:00
Dan Stillman
489a46564f
Add "Remove from Recently Read" (#5847)
- Non-force delete clears `lastRead` on all child attachments (with
  prompt), force delete moves to trash (matching collection behavior)
- Re-run search on item modify in Recently Read view so items disappear
  when lastRead is cleared (also handles sync changes)
2026-03-19 10:30:18 -04:00
Dan Stillman
f0af0bec9d Fix lastModifiedByUserID update overwriting createdByUserID
Use ON CONFLICT to update only lastModifiedByUserID when
createdByUserID isn't being set, rather than REPLACE INTO, which
replaces the entire row.
2026-03-19 00:10:02 -04:00
Dan Stillman
07d99d891f Fix breakage from aaed7ddfc0 in non-standard collectionTreeRow objects
Guard against collectionTreeRow missing isWithinGroup() (e.g., in
Advanced Search)
2026-03-18 23:28:29 -04:00
Dan Stillman
aaed7ddfc0 Add Added By and Modified By columns for group libraries
- Add columns as options in item tree, visible only in group libraries
- Fall back to createdByUserID for Modified By when lastModifiedByUserID
  is not set
- Update lastModifiedByUserID on local saves when dateModified changes
- Fix backfill in _updateGroupItemUsers() to process all batches
- Update formatColumnName() to support Fluent string keys

Closes #233
2026-03-18 23:19:11 -04:00
abaevbog
288fa8e401
hide recently-read pseudo-collection during filter (#5849)
Same way as unfiled, duplicates and trash pseudo-collections
are hidden
2026-03-18 12:05:16 -04:00
Tom Najdek
085a6fa5e0
Move search condition localization strings to Fluent (#5848) 2026-03-18 11:25:58 -04:00
Dan Stillman
d20cac39c9 Fix unhandled promise rejections in ConcurrentCaller when clearing queue
When stop() or stopOnError rejected queued task promises, the rejection
handlers (via Promise.allSettled) weren't attached yet, causing Mozilla
to report each one as "uncaught exception: Object". Add no-op catch
handlers before rejecting so the runtime knows they'll be handled
downstream. Also fix stopOnError path to reject with CanceledException
instead of undefined, and remove legacy Bluebird handledRejection flag.
2026-03-17 13:59:52 -04:00
Abe Jellinek
34039991f8
Track attachment last-read time, add Recently Read virtual collection (#2854)
Track when attachments are last opened or read, storing a `lastRead` Unix timestamp on the attachment. For user library items, `lastRead` syncs as an attachment property in item JSON. For group library items, it syncs via a per-user synced setting (like `lastPageIndex`).

- Add `lastRead` column to `itemAttachments`
- Add `AttachmentReadObserver` to update `lastRead` on file open and page change (throttled to 5 min for page changes)
- Add "Recently Read" virtual collection (items read in last 14 days, sorted by `lastRead` descending)
- Add `lastRead` search condition with date operators
- Add `lastRead` item tree column with new `dependsOnChildren` property for parent item aggregation
- Add `getItemLastRead()` to return max `lastRead` across child attachments

Also:

- Generalize collection tree SCSS to support universal (context-fill) icons alongside themed icons

---------

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2026-03-17 13:52:00 -04:00
Dan Stillman
0ce5cd5bac Clear Read Aloud voices pref when logging out 2026-03-17 11:44:09 -04:00
Dan Stillman
08c75006f3 Update English strings for Transifex 2026-03-16 15:26:28 -04:00
Dan Stillman
290d44480e Move new "Log In"/"Log Out…" strings to Fluent 2026-03-16 15:25:34 -04:00
Dan Stillman
43f422a989 Update English strings for Transifex 2026-03-16 15:16:10 -04:00
Dan Stillman
a9342cc242 "Log in with your zotero.org account" → "[…] Zotero account" 2026-03-16 15:15:07 -04:00