From 2139bf53d1e511bf9ad0125276c0eb3c47dd9b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 21 May 2026 16:38:37 +0200 Subject: [PATCH] Set cursor totalItemsMode to exclude with explanatory comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cursor requests already carry the computed totalItems from page 1, so the count query is skipped regardless of this value. Setting it to 'exclude' reflects what actually happens, and the comment explains why the value doesn't matter. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Fredrik Adelöw --- plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts index c82a01166a..4f98d68e6e 100644 --- a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts +++ b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts @@ -870,7 +870,9 @@ function parseCursorFromRequest( if (isQueryEntitiesCursorRequest(request)) { return { ...request.cursor, - totalItemsMode: 'include', + // Doesn't matter — cursor already carries the computed totalItems + // number from the first page, so the count query is skipped regardless. + totalItemsMode: 'exclude', }; } return {