chadtmiller.com/pds.js
An atproto PDS in JavaScript, for Cloudflare Workers and Node
listSpaces leaves out deleted spaces, as the reference PDS does
MergedThis adds an excludeDeleted option to storage listSpaces. The memory, sqlite and Cloudflare adapters apply it in the query (memory in its filter), so limit and the cursor count only the spaces returned. The listSpaces XRPC handler sets it. I found no problems. The deleted_at / deletedAt names match what deleteSpace writes, and the default of false leaves the account page's space browser unchanged. The new tests cover the option in the shared conformance suite and the route, and the changeset is included. I didn't read AGENTS.md (the tool errored) or the CI results.
This still adds excludeDeleted to storage listSpaces. The memory, sqlite and Cloudflare adapters filter on it in the query, and the XRPC handler sets it. The only change since my last review is a formatting commit on the conformance test, which changes nothing in behavior. The tests and the changeset are in place. I found no problems.
What changes
com.atproto.space.listSpacesleaves out deleted spaces, as the reference PDS does (its reader filtersdeletedAt is null).Storage
listSpacestakesexcludeDeleted. Each adapter (memory, sqlite, Cloudflare) filters on it in the query, solimitand the cursor count only the spaces returned. The XRPC handler sets it. The account page's space browser calls storage without it, so it still lists deleted spaces, marked deleted.Why
deleteSpacemarks a space deleted and keeps its row, andlistSpaceslisted it all the same. knotless'slsfinds an account's private repositories throughlistSpaces, so it kept listing ones deleted long before: at://did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzclmohjg62b.How it was checked
New tests: the storage conformance suite, which all three adapters run, has a deleted space listed without the option and left out with it, and the route tests have
listSpacesleaving out a space deleted after a write to it. Not run locally. CI runs them.🤖 Generated with Claude Code