chadtmiller.com/knotless
git that lives in your Atmosphere account
The History button counts the commits, and the Commits tab goes
MergedThis pull adds an optional commitCount to getLastCommits, answered at the root only. The count walks the history once per tip and is kept in memory in a bounded cache. The History button shows the count, and the Commits tab is gone.
I found nothing that must change. The cache key is the tip's object id, which is safe because a commit's history never changes. The root-only gating is tested on both sides. The lexicon change is optional-only, so it passes the evolution rule. The serve design note and the API reference are both updated. The tab removal leaves no stale tab="commits" references. The {#await changes} button falls back to plain History while loading and in a folder.
Two things to know, neither blocking:
- A failed count now turns the whole
getLastCommitsanswer into a 404, because the count shares themap_err(not_found)path with the entry walk. That is fine while counting can only fail where the walk would. - The
checkworkflow had passed when I looked.test,shots,web,lexicons,docsande2ehad not finished, and I did not check whether an e2e flow clicked the Commits tab. Please make suree2epasses before you queue it.
Since my last round, the pull has one new commit. It swaps the git-commit icon for Octicons' history and turns the latest commit's History control into a quiet .history link instead of a bordered button. I read that diff and found nothing that must change.
- The new
.historyclass is used only inFileList.svelte. The phone rules inapp.css(:not(.grow,.history)and.history .word) are updated to match, and no other.historyselector is affected. - The file and blame pages keep
.btnand only take the new icon. historyis added to the icon map and to its type union.- The
checkworkflow passed on this head. testwas still running when I looked. Please wait for it, and fore2e, before the queue lands this.- My earlier note about
getLastCommitsreturning a 404 when a count fails still stands. It isn't blocking.
Since my last round, the pull has one new commit. On a phone, the latest commit's History link now shows its icon alone, 32px square, with its words in title and aria-label. I found nothing that must change.
- The words are wrapped in
.wordsand the phone rule hides.history .words..wordstill hides only the ref counts. --controlis defined intokens.css.- The
.historylink was already excluded from the phone rule that hides the row's other links. - The
titleandaria-labelare set in all three states: loading, folder and counted. - The
checkworkflow passed on this head. testwas still running when I looked. Please wait for it, and fore2e, before the queue lands this.- My earlier note still stands, and it isn't blocking. A failed count turns the whole
getLastCommitsanswer into a 404.
9 passed, 1 skipped
What changes
The History button says how many commits there are. At a repository's root, the button at the end of the latest commit's row reads "🕘 7 commits", for whatever branch or tag is shown. In a folder it still says History.
dev.knotless.getLastCommitsgains an optionalcommitCount, answered at the root only. Serve counts by walking the ref's whole history, which reads the commit-graph mirrors now keep, and keeps each count in memory by its tip, up to 32,768 of them. A commit's history never changes, so a kept count never goes stale.History links take Octicons'
historyicon (a clock turning back), rather thangit-commit, which means one commit: on the code page, a file and its blame. In the latest commit's row it is a quiet button (.btn.quiet, new): filled softly, with its border only under the pointer, as GitHub's sits back from the row.There is no Commits tab. The History button is the way to a repository's history, as on GitHub. The commits and commit pages sit under Code.
On a phone, the latest commit's row shows the way to the history by its icon alone, a tap's size, its words ("7 commits", or History) in its title and label, as GitHub's phone page has it; and it drops its time, as the file rows under it have none. Before, the row hid the button, and the Commits tab was the way to history.
The serve design note and the API reference say so.
Why
The tabs' counts are of what waits on someone: open issues, open pulls. A commit count only grows, so it belongs beside the code it counts, as a fact about the ref shown. On a tab it would always count the default branch, even on another branch's history. With the count on the button, the tab was a second way to the same page, in a tab row that already scrolls on a phone.
Counting the whole history on every view would be wasteful, which is why the commit-graph landed first. With one, a count of rust's 345,363 commits takes 170–200 ms and git's 82,634 takes 25–30 ms, once per tip. Prod's largest repository has 864 commits.
How it was checked
objects.rs's test counts main (a merge, five commits) and a side branch, twice to go through the cache, and a missing ref.web.rsasserts the root answer hascommitCountand a folder's does not.just look: the repository and a folder, desktop light and phone dark, and the count set to 345,363 for width. The commits page, with Code current. A fresh agent critiqued the pictures. Its finding of a subject squeezed to "Coun…" on a phone is fixed by dropping the time there, and since by the icon alone. Its other points were already the case (the tab row's fade on a phone, the time's colour by age) or are deliberate (a folder's button says History).harness/lexicons.mjspass here. The shots fixtures' two root answers gain their counts (7 for alice's tally, 8 for bob's fork), worked out from the world's script rather than recorded again.Shots-moved: repository, directory, file, blame, markdown, markdown-plain, diagram, image, commits, commit, commit-merged, pulls, pulls-closed, pull, pull-open, pull-files, issues, issues-closed, issue, issue-closed, issue-fixed, fork, empty, missing, check, queue, checks, pull-queued, pull-ejected, settings, settings-branches, settings-labels, settings-access, settings-actions, releases, releases-image, releases-empty
Shortcomings
🤖 Generated with Claude Code