Commit Graph
4512 Commits
Author SHA1 Message Date
shamoon 62648fffe8 Fix migration 2026-11-06 14:15:05 -08:00
shamoon 26552f54b4 Ah, need a backend filter for wf type 2026-11-06 14:14:28 -08:00
shamoon a5c460a567 Add some backend tests for the manual wf 2026-11-06 14:14:27 -08:00
shamoon cfca79e7fc api bulk edit run_workflow 2026-11-06 14:14:27 -08:00
shamoon 9d59f3aaa2 run_workflows task= with filter_documents option 2026-11-06 14:14:26 -08:00
shamoon 332c308f84 Add skip_matching to run_workflows 2026-11-06 14:14:26 -08:00
shamoon a0b8da7687 Add manual trigger 2026-11-06 14:14:23 -08:00
GitHub Actions 2642cefd35 Auto translate strings 2026-11-06 20:20:35 +00:00
shamoonandCodex 8aa99a381a Performance: replace django-treenode with adjacency-list tags (#14612)
---------

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
2026-11-06 20:18:59 +00:00
Trenton H d14cfc93f4 Performance: use small vec0 chunks and larger pages for the LLM index (#14678)
The vec0 default of 1024 rows per vector chunk makes each chunk a
multi-megabyte blob. On spinning disks, indexing a document took about
2.5 seconds and re-indexing one about 13 seconds. With 32 rows per
chunk the same operations take about 35 and 180 milliseconds, with the
write-ahead log a third of the size and no cost in query speed or file
size.

Pair that with 64 KiB SQLite pages, which made cold scans about 35%
faster and warm ones about 45% faster at no write cost once the chunks
are small. The page size is set before the file enters WAL mode, so it
applies to new files.
2026-11-06 10:20:03 -08:00
Trenton H a4543c03dc Fix: release the LLM index read lock before streaming the chat answer (#14674)
Document chat held the shared index read lock for the whole request,
including the LLM stream, which can take minutes. A compaction or
migration swap waiting for exclusive access could time out behind it
and be skipped until the next run.

Now that the answer is synthesized from the nodes already retrieved,
nothing after the vector search touches the store. Hold the lock only
while loading the index and searching, and release it before synthesis.
2026-11-06 07:03:44 -08:00
Trenton H 45a2ac4879 Fix: retrieve once per document chat question (#14673)
Document chat searched the vector store twice per question: once
explicitly to build the reference list, and again inside
RetrieverQueryEngine.query(), which retrieves before synthesizing. That
meant two query-embedding calls and two full vector searches each time.

The engine added nothing beyond the retriever call (no node
postprocessors are configured), so drop it and synthesize directly from
the nodes already retrieved. The streaming response is unchanged.
2026-11-06 07:03:43 -08:00
shamoon e88303cc16 Fix: apply PDF/A conversion once for mail archives (#14698) 2026-11-05 18:03:36 -08:00
shamoon cb3513c6f3 Fix default MFA trusted AMR setting (#14693) 2026-11-04 23:46:15 +00:00
GitHub Actions 057aee8bbd Auto translate strings 2026-11-04 19:07:00 +00:00
shamoon fa83a4c5dc Fix: check descendant tag permissions on delete (#14687) 2026-11-04 11:05:48 -08:00
shamoon 22746aa202 Fix: lock rows for first-user signup (#14688) 2026-11-04 16:33:28 +00:00
shamoon d939d873e1 Bump version to 3.4.2 2026-11-03 13:37:33 -08:00
github-actions[bot]andCrowdin Bot f0cc7fa953 New Crowdin translations by GitHub Action (#14607)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-11-03 18:08:48 +00:00
shamoon 936f9363a0 Fix: ensure import bulk_edit tasks in Celery workers (#14653) 2026-11-02 07:59:27 -08:00
GitHub Actions a19804a0b7 Auto translate strings 2026-10-31 16:34:17 +00:00
Trenton Handshamoon 3289be7383 Fix: Various small bugs found during typing updates (#14593)
* Fix: match Apple Mail tag colors case-insensitively

* Fix: reject OAuth callbacks with an unrecognized scope

* Fix: refuse to refresh OAuth tokens for non-OAuth accounts or missing refresh tokens

* Fix: parse datetime strings in the format_datetime filter and reject invalid ones

* Fix: reject a PAPERLESS_URL without a hostname

* Fix: report a database error in the system status instead of failing with a 500

* Fix: surface the database error when refreshing a document before moving its files

* Fix: report no unapplied migrations when the applied migrations cannot be read

* Fix: return the parsed value directly in format_datetime for typing

* Chore: annotate the paperless_dirs fixture in the refresh failure test

* Allow null for the latest_migration system status type

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2026-10-31 09:32:58 -07:00
shamoon b67cfdf3fd Bump version to 3.4.1 2026-10-30 22:20:31 -07:00
github-actions[bot]andCrowdin Bot 98d2ddd1c6 New Crowdin translations by GitHub Action (#14584)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-10-31 05:12:07 +00:00
GitHub Actions 91b35eada6 Auto translate strings 2026-10-31 04:48:33 +00:00
shamoon 11248f776d Fix: fix the id__none schema in the right place (#14604) 2026-10-30 21:47:12 -07:00
GitHub Actions 5e397e1222 Auto translate strings 2026-10-30 22:26:54 +00:00
Trenton H 6f99ad9469 Chore: Improve idle memory via more lazy imports (#14599)
* Chore: Import dateparser lazily so processes that never parse dates skip it

* Chore: Import turbohtml lazily in the mail parser

* Chore: Import lxml lazily in the SVG validator

* Chore: Import paperless_ai.indexing lazily in document tasks

* Chore: Import paperless_ai helpers lazily in views

* Chore: Read the OCRmyPDF sRGB profile on first use instead of at import

* Chore: Import pikepdf and img2pdf lazily so startup does not load them

* Chore: Reuse the initialized Django ASGI application for HTTP routing
2026-10-30 22:25:42 +00:00
shamoon ced3cf9303 Bump version to 3.4.0 2026-10-29 15:11:14 -07:00
Trenton HandClaude Sonnet 5.5 08a7d1d4b8 Chore: Consolidate test sample files (#14430)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 12:43:51 -07:00
github-actions[bot]andCrowdin Bot 47052d6506 New Crowdin translations by GitHub Action (#14499)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-10-29 18:35:37 +00:00
shamoon 9c4c9f2386 Enhancement: support custom fields in workflow title templates (#14564) 2026-10-29 17:40:53 +00:00
GitHub Actions cc54e3e5aa Auto translate strings 2026-10-29 17:26:37 +00:00
shamoon 67c194978e Enhancement: relative date custom field queries (#14549) 2026-10-29 17:25:21 +00:00
shamoon ec52490e4a Fixhancement: show better result for revoked / expired tasks (#14566) 2026-10-28 08:59:07 -07:00
GitHub Actions fed9e8d783 Auto translate strings 2026-10-28 02:55:55 +00:00
shamoon d4457efe44 Fix: move re-index after workflow runs on doc edit (#14558) 2026-10-27 19:54:30 -07:00
GitHub Actions 5f17b1a310 Auto translate strings 2026-10-24 21:12:29 +00:00
shamoon 63eca7b427 Enhancement: skip local 2FA for trusted OIDC AMR (#14403) 2026-10-24 21:11:10 +00:00
GitHub Actions c88d02ab42 Auto translate strings 2026-10-24 20:30:00 +00:00
Trenton H 4299e9b12e Chore: consolidate direct permission grant lookups into one helper (#14456)
* Chore: drop get_groups_with_only_permission

It worked around get_groups_with_perms lacking only_with_perms_in, which
django-guardian added in 3.1.0. The pinned version is newer.

* Chore: consolidate direct grant lookups into get_permission_grantees

Six places listed who holds a permission on an object, each with its own
query and result shape, and one had already drifted into expanding group
members.

* Chore: drop the unreachable empty viewer grant default

get_permission_grantees returns an entry for every requested document.
2026-10-24 13:28:25 -07:00
Trenton H 10a1a9eae8 Chore: drop get_groups_with_only_permission (#14454)
It worked around get_groups_with_perms lacking only_with_perms_in, which
django-guardian added in 3.1.0. The pinned version is newer.
2026-10-24 13:28:25 -07:00
Trenton H e7d70497c2 Chore: Consolidate to a single way to set permission on an object (#14453)
* Chore: drop set_permissions_for_object in favor of the bulk helper

The same grant rules were implemented twice, and only the bulk version
validated every action before writing, so the single-object one could leave
a partial change behind.

* Chore: type the set-permissions dict

Callers passed whatever they had, including querysets of User and Group
objects that only worked because id__in accepts a subquery.
2026-10-24 13:28:25 -07:00
shamoon f71a9a6eda Merge branch 'main' into dev 2026-10-22 15:38:13 -07:00
shamoon 558cb01a1d Bump version to 3.3.4 2026-10-22 14:58:47 -07:00
GitHub Actions 35ba0b36a8 Auto translate strings 2026-10-22 19:30:17 +00:00
Trenton H 7bdbcca051 Chore: Refactor bulk edit to remove PDF knowledge (#14445)
* Refactor: add pure pdf_ops module with real-PDF tests
* Drops tests we don't relly need + adds the typing annotation
* Now that I'm sure it works, re-work these tests to mock pdf_ops, rather than pikepdf
* Validates pages ahead of time in build_pdfs rather than during the building
* Adds the given/when/then and some additional cleanups of pytest style
* This is redundant now
2026-10-22 19:25:39 +00:00
Ben Petty 9b56dc2f61 Fix: folder export with --delete fails on a stale manifest.json.tmp (#14526) 2026-10-22 11:50:31 -07:00
GitHub Actions e2b884d353 Auto translate strings 2026-10-22 12:55:09 +00:00
shamoon 97c98ee44c Fix: fix list type for api schema document object filters (#14524) 2026-10-22 05:53:17 -07:00