xonecas.io
8356
Wx

www-xonecas-io / files

www-xonecas-io / tickets / 1030-activity-and-projects-need-pagination.md

2.2 KB
1---
2id: 1030
3title: activity and projects need pagination
4type: feature
5status: done
6priority: p2
7created: 2026-11-08T04:38:19Z
8updated: 2026-11-08T20:16:24Z
9source: human
10moves: 2026-11-08T04:38:48Z inbox doing field; 2026-11-08T04:49:34Z doing review agent; 2026-11-08T20:16:24Z review done drag
11area: site
12---
13
14use pagination buttons at the bottom, with arrows and dots, discreete.
15
16## Notes
17
18- 2026-11-08 04:49Z (agent): Done: /activity and /projects both end with a small pager, like ← 1 … 4 [5] 6 … 21 →. It's in mono, soft grey. The current page is in ink, a dead arrow is faded, and the dots replace runs of hidden pages. I read 'dots' as those ellipsis gaps, not carousel dots. The pager hides when there is only one page.
19  
20  /activity is split in the build: 100 commits per page, at /activity/<year>/ then /activity/<year>/2/, 3/ and so on. /activity/ is still the latest year's first page. 2026 went from one 1.87MB page to 21 pages of about 100KB. The year list, the total and the month strip stay on every page. A day cut by a page break shows its heading again on the next page, and the count beside each heading covers only that page.
21  
22  /projects pages in the browser: 20 matching rows a page. The 'N projects' heading still counts all matches. The links are ?page=N and keep the filters. Any change to the filters, sort or search goes back to page 1, and a page number past the end clamps to the last page.
23  
24  Files: static/pager.js (new, shared), assets/site.css (.pager), activity.go (pages, days()), templates/activity.html and projects.html, static/projects.js.
25  
26  Checked in agent-browser:
27  - /activity/2026/5/: 100 rows, links 4/6/1/21 right, title 'Activity 2026, page 5'.
28  - /activity/: page 1 of 21. 2019, an empty year, shows no pager.
29  - /projects/?page=3: 20 of 82 rows. Ticking frontend makes it 38 matches over 2 pages and resets to page 1. ?tag=frontend&page=9 clamps to page 2 (18 rows). A search with no match hides the pager.
30  - At 390px there's no horizontal scroll.
31  go vet and go test pass.
32  
33  Not checked: without JS the activity pager doesn't show, since pager.js draws it. Leftover page folders from an earlier build with more pages would stay in public/ (same cause as 1023).