8356
Wx
www-xonecas-io / files
www-xonecas-io / tickets / 1009-build-commit-history-and-diff-pages.md
3.3 KB
1--- 2id: 1009 3title: Build commit history and diff pages 4type: feature 5status: done 6priority: p2 7area: site 8created: 2026-11-07T19:30:00Z 9updated: 2026-11-08T04:02:05Z 10source: agent 11moves: 2026-11-07T19:30:00Z inbox todo agent; 2026-11-08T01:09:40Z todo doing drag; 2026-11-08T01:55:07Z doing review agent; 2026-11-08T04:02:05Z review done drag 12--- 13 14Per project: a paginated commit log and one page per commit with its message, author name, date and diff. 15 16Real commit messages are the best content on the site, for example zen's 2011 'our space hero now moves left to right :-)'. Show them unedited. 17 18Cap large diffs. Static output is the risk here, so measure the total size and build time across all projects and put the numbers on this ticket. 19 20Done when: mini-coder's 885 commits build and page correctly, an oversized diff is truncated with a clear message, and a rebuild only regenerates what changed. 21 22## Notes 23 24- 2026-11-08 01:55Z (agent): Done: every shown project has a commit log at /projects/<name>/commits/ (50 per page) and a page per commit at /projects/<name>/commit/<hash>/ with the full message, author name, date, parents and diff. The project page's commit count links to the log. Screenshots are attached. 25 26 NUMBERS (81 projects, 2,762 commits, 8 cores in the VM): 27 | | time | output | 28 |---|---|---| 29 | full build (after any code or template change) | 45s | 127 MB in public/, of which commit pages are 109 MB | 30 | rebuild, nothing changed | 5.6s | 0 commit pages rewritten | 31 | commit page | median 18 KB, largest 1.0 MB | | 32 For comparison, repos/ is 351 MB. 33 34 HOW: 35 - The log covers every branch and tag, so mini-coder shows all 885 commits. Only 135 are on its HEAD, because the history was rewritten. The log has 18 pages, the last with 35. Commits are deduped by hash across sources and listed newest first. 36 - Messages are shown as written, except that emails in angle brackets are removed (names only, per 1005). Across all repos that touched exactly 2 messages, both 'Signed-off-by: dependabot[bot]'. 37 - Cap: 1,000 diff lines per commit, and lines over 500 characters are cut. Past the cap, every file is still listed with its +/- counts and a note, and a banner at the top says the diff is cut. 344 commits hit it, mostly vendored libraries. Binary files show 'Binary file, not shown.' Merges diff against the first parent. 38 - Rebuilds: commit pages never change, so each is written only if missing or if the site program changed. public/.stamp holds a hash of the program, which embeds every template. A new commit renders just its own page. Log and project pages are always rewritten (cheap). 39 - Diff lines use a compact CSS class (.dl) instead of Tailwind utilities per line. That cut the output from 392 MB to 153 MB, and the 1,000-line cap took it to 127 MB. 40 41 CHECKED: go test (diff parser: line numbers, renames, binary files, the cap), mini-coder's 885 commits (18 pages, page 18 serves 200 with 35 rows), zen's 2011 commit renders unedited, a capped diff shows the banner, and the phone width of the log. Two back-to-back 'make build' runs: the second rewrote 0 commit pages. 42 NOT CHECKED: every commit page by eye. Pages of commits that disappear from a remote (a force-push) stay in public/ until it is wiped; the build never deletes. Diff file links to the file browser wait on 1008.