fix list_tasks pagination #31
Labels
No labels
blocked:needs-decision
bug
chore
cron
design
in-progress
infra
milestone
module-o
needs-decompose
needs-research
ops-task
pm
quickfix
security/medium
triage-approved
vikunja
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/org_mode#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug: VikunjaClient.list_tasks silently drops page 2+ — ground-truth reads incomplete for any project with >50 tasks.
VikunjaClient.list_tasks in both:
only fetches page 1. Vikunja v2.3.0 returns 50 tasks per page by default; project 3 (org_mode) currently has 57 tasks (2 pages). Every consumer using these methods operates on incomplete ground truth:
Verified headers (live GET /projects/3/tasks, 2026-08-21 21:05 UTC):
Verified impact: in a recent PM round (kanban t_9ac29016) tasks #106 and #107 were created on page 2; they were only verifiable via get_task(id) directly — list_tasks could not have surfaced them. Today, list_tasks initially returned 50 tasks all done=True (missing the 2 open ones); only the full pagination scan returned the truthful 57 tasks / 2 open. This is a substrate defect.
Fix: change VikunjaClient.list_tasks to iterate page=1..N until x-pagination-total-pages is exhausted (or until a page returns < per_page results). Update both copies of the file. Add a unit test that asserts list_tasks returns >= N for a project known to have N tasks.
Acceptance:
Source: Vikunja task #109 (org_mode project) — filed from kanban tasker card t_c47ff2c0.
Fix verified landed and closed out by root kanban t_c47ff2c0 (substrate-defect pagination bug, Vikunja #109).
Commits on origin/main referencing this issue:
06002bffix(server): paginate list_tasks across all pages (org_mode#31)71a2b38style(lint): fix ruff F401 and E401 violations (org_mode#31 gate)Both file copies carry the page=1..N loop with short-page break + _MAX_TASK_PAGES cap:
Verification (t_4af8fee6, 2026-08-23): full pytest suite 843/843 green, 8 pagination tests pass, live list_tasks(3) on deployed copy returned 75 tasks across 2 pages (target 57). No consumer calls client.list_tasks directly, so no signature-drift risk. Acceptance criteria met. Closing.