chadtmiller.com/knotless
git that lives in your Atmosphere account
A repository's Fork button shows how many forks it has
MergedThis adds forkCount to getRepo and shows it beside Fork, using the same joined .counted style as Star. The new Index::fork_count runs the same WHERE and down filters as Index::forks, so the count matches the listed forks. The account starred list now calls it instead of listing every fork to take its length. The count is absent for a private repository and when the server has no index, as starCount is. The lexicon, api.md and the recorded fixtures are updated with it. I read every changed file and found nothing wrong.
I did not run the layout. The phone CSS (.repo-actions columns, and the Star container query that only matches .star) looks consistent with the new .counted wrapper, and the body says it was checked on the phone.
9 passed, 1 skipped
What changes
A repository's header shows how many forks it has beside Fork, joined to the button as Star's count is.
getRepoanswersforkCountbesidestarCount. The index counts forks with a newfork_count, and the account's starred list now uses it too instead of listing every fork to take its length. LikestarCount, it is absent for a private repository, whose forks are private too, and from a server with no index.Star and Fork share one
.countedstyle for a button with its count joined on.Why
Watch, Fork and Star sat side by side, but only Star had a count. The index already counted forks for repository lists. Watch gets no count: what an account watches is kept for that account alone, and a small count would often say who.
How it was checked
just look repositorysigned out, as its owner (Fork disabled, count still shown) and as bob.test, desktop light and phone dark, with the fork menu open on both. The recordedgetRepoanswers carryforkCount(1 for alice.test/tally, which bob.test forked, 0 for the others), added by hand rather than re-recorded. CI runs the tests and the query plan. The signed-in repository pages move only in their button row, where Fork gains its count.Shots-moved: issue-subscribe, repository-watch, settings, settings-access, settings-actions, settings-branches, settings-labels
Shortcomings
The count is not a link: there is no page listing a repository's forks yet. Where Fork is hidden (signed out on a server with no logins), so is its count.
🤖 Generated with Claude Code