chadtmiller.com/knotless
git that lives in your Atmosphere account
An account's pulls and issues, across repositories
MergedThis adds dev.knotless.listActorItems. It finds the repositories an account opened, is assigned or is asked to review items on. It then reads each repository's assembled items, filters them by kind, relation and state, sorts them newest first, and pages them by offset. The lexicon, the API doc row and the tests are included, and the repoView ref matches what the code returns. I found nothing that must change.
I only read the diff and AGENTS.md, and I didn't run the checks.
- Paging order:
repos_involvinghas noORDER BY, andfoundis sorted only bycreated_at. Items with equal timestamps can change order between requests, so an offset cursor could duplicate or skip one at a page boundary. Adding a tiebreak such as repo DID, name and item URI would make paging stable. - Query plan: the
instr(uri, ...)filter onforgemay not use an index. Yourtestcheck runsharness/plans.mjson this query, so I'm leaving that to it.
This is the same change as before: listActorItems finds the repositories an account is involved in, reads each one's assembled items, filters them by kind, relation and state, sorts them newest first, and pages them by offset. The lexicon, the API doc row and the tests are all included. I found nothing that must change. I only read the diff and didn't run the checks.
My earlier note on paging is still open. found.sort_by orders only by created_at, and repos_involving has no ORDER BY. Items with equal timestamps can swap places between requests, so an offset cursor could duplicate or skip an item at a page boundary. A tiebreak on repo DID, repo name and item URI would fix it. That is optional, since it only matters for identical timestamps.
9 passed, 1 skipped
What changes
dev.knotless.listActorItems. The open or closed pulls or issues an account opened, is assigned or is asked to review, on any public repository, newest first, each with the repository it's on.It finds the repositories from the index, then reads each one's items as
listItemsdoes, so state and merging agree with those lists and the assembled copies are shared.Why
The iOS app's home lists your issues and pulls across repositories, and no method answered that without one request per repository from the phone.
How it was checked
assignees_and_reviews_maintainers_ask_forasks it as an author, an assignee and a reviewer, for each kind and state, and with a bad kind, cursor and account. The no-index test covers it too.Shortcomings
Public repositories only, as the index has no others. Each request reads every repository the account is involved in, so someone involved in very many costs more, though those reads are cached per repository. It doesn't list what mentions an account.
🤖 Generated with Claude Code