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

Kicker keeps its spaces in the host's site space type, and publishes itself

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:examples/kicker-site-space

Kicker, the example skate club site, now keeps its room and calendar in the host's published fyi.opensocial.siteSpace type rather than in space types of its own, so members' PDSes can grant its sign-in without anything new being published. A new just publish <handle> puts it on a running host, which is how it got to kicker.next.opensocial.fyi.

Claude Opus 5.5 · high effort

What changes

Kicker's spaces are the host's space type. The room and the calendar are fyi.opensocial.siteSpace spaces under the keys room and calendar. The site's record names each by type and key in spaces and writes. Its own space types, com.example.place.room and com.example.place.calendar, are deleted. Its record collections (note, event, rsvp, card, topic, reply) stay; a PDS never reads their schemas, so they need no publishing. The seed, the site (site/src/lib/place.js), the e2e flows and the harness's PDS follow. README.md and AGENTS.md say so.

just publish <handle> (harness/publish.mjs) puts Kicker on a running host, signed in with OPENSOCIAL_AS and OPENSOCIAL_PASSWORD at OPENSOCIAL_HOST. The first time, it creates the group with its host role, its two spaces and its off-topic label. Every time, it publishes the built site. It writes nothing into the spaces, so the club starts empty. seed.mjs now makes the group through the same code instead of its own copy.

Labels are read from com.atproto.label.record, the collection the host writes them to since at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.pull/3n2oxvvn2rzht landed alongside the label rename. Under the old name, the site would show no labels.

Why

A member's PDS grants a site's space: scope only after it fetches that space type's schema through DNS. With types of its own, Kicker would need a domain, a _lexicon TXT record and a published schema before anyone could sign in. The host now publishes one general type for every site, so a site author publishes nothing.

How it was checked

  • just check in examples/kicker: svelte-check, the view tests and the layer check.
  • just e2e: all of Kicker's flows on this main, over the reference PDS, with real consent screens granting the keyed scopes.
  • Live: just publish kicker.next.opensocial.fyi as chad.pds.next.opensocial.fyi. On the next network, a sign-in through that PDS pinned a note that reached the host and showed on the board.

CI checks nothing under examples/, so these runs are the test.

Shortcomings

just publish doesn't change a group that already exists; it only publishes the site again. To change a group's spaces or roles, use the opensocial command.

Approved

This moves Kicker's room and calendar onto the host's fyi.opensocial.siteSpace type, under the keys room and calendar. It adds just publish, and it reads labels from com.atproto.label.record. I read the whole diff. It is consistent with the host's lexicon: siteSpace has key: any and an empty collections list, so the keyed spaces and write scopes make sense. The space URIs, write scopes, --spaces list and read grants (?skey=…&action=read) agree across seed.mjs, place.js, the e2e spec and the README. Pulling make and publish out of seed keeps the seeded flow the same. I couldn't run any of it. The pull says CI doesn't cover examples/, and it reports the e2e and live runs passing.

One small thing, which needs no change. publish.mjs treats any non-OK resolveHandle response as "group doesn't exist" and then runs make. A transient host error would try to create the group again. Checking for the specific not-found error would be safer.

Merged as 8c7f322