From 9a1dae49086ad86472492854717c8f4c0ea207c7 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Wed, 8 Apr 2026 09:31:18 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(backend)=20do=20not=20pagina?= =?UTF-8?q?te=20threads=20list=20response?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The threads list action was paginated its response. this is not the behavior we want. all threads should be loaded when the document is loaded. --- CHANGELOG.md | 7 ++++--- src/backend/core/api/viewsets.py | 2 +- .../core/tests/documents/test_api_documents_threads.py | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16cc9c7bc..494426579 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,12 +11,13 @@ and this project adheres to - 🚸(frontend) allow opening "@page" links with ctrl/command/middle-mouse click - ✅ E2E - Any instance friendly #2142 +### Changed + +- ♻️(backend) do not paginate threads list response #2186 + ### Fixed - 🐛(frontend) Fix drop cursor creating columns #2185 - -### Fixed - - 🐛 Fixed side effects between comments and versioning #2183 ## [v4.8.5] - 2026-04-03 diff --git a/src/backend/core/api/viewsets.py b/src/backend/core/api/viewsets.py index 805939341..a678d0200 100644 --- a/src/backend/core/api/viewsets.py +++ b/src/backend/core/api/viewsets.py @@ -2757,7 +2757,7 @@ class ThreadViewSet( """Thread API: list/create threads and nested comment operations.""" permission_classes = [permissions.CommentPermission] - pagination_class = Pagination + pagination_class = None serializer_class = serializers.ThreadSerializer queryset = models.Thread.objects.select_related("creator", "document").filter( resolved=False diff --git a/src/backend/core/tests/documents/test_api_documents_threads.py b/src/backend/core/tests/documents/test_api_documents_threads.py index cea0ae966..b7a53f265 100644 --- a/src/backend/core/tests/documents/test_api_documents_threads.py +++ b/src/backend/core/tests/documents/test_api_documents_threads.py @@ -342,7 +342,7 @@ def test_api_documents_threads_list_public_document_link_role_higher_than_reader f"/api/v1.0/documents/{document.id!s}/threads/", ) assert response.status_code == 200 - assert response.json()["count"] == 3 + assert len(response.json()) == 3 def test_api_documents_threads_list_authenticated_document_anonymous_user(): @@ -406,7 +406,7 @@ def test_api_documents_threads_list_authenticated_document(link_role): f"/api/v1.0/documents/{document.id!s}/threads/", ) assert response.status_code == 200 - assert response.json()["count"] == 3 + assert len(response.json()) == 3 def test_api_documents_threads_list_restricted_document_anonymous_user(): @@ -473,7 +473,7 @@ def test_api_documents_threads_list_restricted_document_editor(role): f"/api/v1.0/documents/{document.id!s}/threads/", ) assert response.status_code == 200 - assert response.json()["count"] == 3 + assert len(response.json()) == 3 # Retrieve