~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

An account's pulls and issues, across repositories

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:serve/actor-items

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 listItems does, 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_for asks 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

Approved

This 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_involving has no ORDER BY, and found is sorted only by created_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 on forge may not use an index. Your test check runs harness/plans.mjs on this query, so I'm leaving that to it.
Approved

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.

Merged as 522a668