Commits
2026-09-25
✨ feat(api): server-side filters on the list doorsAhmet Kaan Gümüş · d8dad92
✨ feat(api): server-side filters on the list doors A caller no longer has to download a capped collection and narrow it in the client: - events, exams: the WindowParams pair is SQL (no whole-table load) and gains starts_before/ends_before, so a past/completed view is expressible - sessions: starts_after/starts_before, half-open months - homework: due_after/due_before (the open/past tabs), class_course - meals menus: slot (was a post-page JS filter — page counts lied) - users (admin): roles= comma set; courses: kind, q, taught - appointments + slots: teacher (or me), starts_after/starts_before, status - pomodoro log: from/to, with the focus total summed in SQL - messages and boards: q (folded literal substring) - pool questions: ?status= is a WHERE, not a post-filter - bank/course-notes id filters: garbage is a 400 naming the field, not an empty page Absent params return today's response byte-shape; page and count share one WHERE.
2026-09-12
2026-07-25
feat: 🔭 let /events and /exams ask for the next rows, not the newestAhmet Kaan Gümüş · b50d48b
feat: 🔭 let /events and /exams ask for the next rows, not the newest `?limit=100` handed back the 100 most recently created rows, so an event scheduled for tomorrow that was created before them never appeared. The only correct call was to drop `limit` entirely — ~3.4 MB per poll — and the frontend has been paying that on every right-nav tab open. `?starts_after=` / `?ends_after=` (unix ms, both optional) filter on the schedule instead, and either one flips the order to soonest-first, so `limit` finally truncates the right end. `ends_after` keeps rows whose window has not finished, falling back to `starts_at` when `ends_at` is null; a row with no schedule at all drops out rather than sorting to an end. Send neither and the list is untouched — same order, same total — so nothing has to deploy in lockstep. For exams the window lands after the visibility split and the draft retain, so `total` still counts only what the caller may see.
2026-07-15
✨ feat(web)!: paginate every list endpointAhmet Kaan Gümüş · f3d2b0a
✨ feat(web)!: paginate every list endpoint
Every array-returning GET now accepts `?limit=&offset=` and returns a
`{ items, total, limit, offset }` envelope instead of a bare array.
Paging is opt-in: omitting `limit` returns the full list (limit echoes
null), so callers that need the whole set — an exam's questions during a
sitting, roster/grade pickers — are never silently truncated. `total`
always carries the unpaged count, so a frontend can render "100 of 256"
and drive a pager without a second request.
Windowing is a slice over the already-ordered domain list (the domain
layer is untouched); endpoints that embed people run that join over the
page alone. `limit` must be 1..=500 and `offset` >= 0 (else 400); an
offset past the end yields an empty page, not an error.
Covers all 17 list GETs, including /courses/me, /work/me, /work/{user},
and /users/search — whose hard 10-row cap is dropped in favour of the
same paging. Not paged: /exams/{id}/attempt/{questions,answers}, the
marks & attendance report objects, /exams/{id}/live, and /settings.
Shared machinery lives in web::page (Page<T>, PageParams, paginate).
Docs updated across the OpenAPI spec (utoipa query params + Page_*
response schemas), the Swagger UI it feeds, and the README (a Paging
section plus a `· paged` tag on every list row).
BREAKING CHANGE: list endpoints return a pagination envelope, not a bare
JSON array — clients must read `.items`. /users/search no longer caps at
10 results.