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

Kicker lets people ask to join, cancel, and leave, from the site

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

Kicker now lets people ask to join, cancel the request, and leave, from the site itself, using the acts the host just opened to sites. Its landing says "Sign in with your Atmosphere account", and its text no longer flashes in a fallback font before Archivo loads.

Claude Opus 5.5 · high effort

What changes

The way in follows the join policy. Signed in but not a member, the landing shows:

StateNoteAct
approval (Kicker's)Not a member yetAsk to join, a dialog with an optional note and Send request
a request waitingYour request is waitingCancel request
openNot a member yetJoin
inviteJoining is by inviteJoin, which an invite waiting lets in; without one, "There's no invite waiting for you yet." (JoinClosed)

Each state also has a quiet Sign out. context() reads getGroup first and lists members only for a member. Before, a non-member's closed listMembers threw away viewer.request along with it.

Leaving. In People, the viewer's own row has a quiet Leave, which asks "Leave this group?" with a danger Leave. For the last admin the host answers LastConfigurer, which the dialog turns into "You're the last admin. Make someone else an admin in the console first." DESIGN.md adds leaving to what Danger is for, and app.css gets button.danger.

The font. @fontsource's faces use font-display: swap, so the page drew in a fallback face and then swapped. The masthead is sized for Archivo, so it jumped. app.css now declares the same three faces with font-display: block, and index.html preloads the Latin file, the same hashed asset, so the wait is one small download that starts with the page.

The seed publishes requestJoin, cancelJoinRequest and leaveGroup. just look --as erin draws the non-member states and the ask dialog. A member's look adds the leave dialog.

How it was checked

  • just e2e, all flows, on main with the host change:
    • New: erin cancels her request, asks again with a note, alice finds the note in listJoinRequests and lets her in, and erin sees the rooms.
    • New: erin leaves from her own row and gets the landing with Ask to join; alice, the only admin, is refused with the message above.
  • just check: svelte-check with no errors or warnings, the view tests and the layer check.
  • just look: each state above, desktop light and phone dark.

asking-as-erin-desktop-light.png

waiting-as-erin-phone-dark.png

ask-dialog-as-erin-phone-dark.png

leave-dialog-as-alice-desktop-light.png

Approved

The pull adds ask-to-join, cancel and leave to Kicker, and the landing's way in follows the join policy. I read the whole diff and found nothing that must change.

  • Policy states: context() now reads getGroup first and lists members only for a member. That keeps viewer.request for a non-member, which fixes the old listMembers failure.
  • Errors: then() in App.svelte turns JoinClosed into the invite message and treats AlreadyMember as a reread. Other errors show beside the way in. It catches the error, so a refused ask closes the dialog and the refusal shows on the landing, which is acceptable.
  • Leaving: LeaveDialog turns LastConfigurer into the "last admin" message. Success rereads through ctx.reread, so the dialog goes away when the room unmounts.
  • Dialog titles: both titles are fixed words, as the repository requires.
  • Docs and seed: the README, DESIGN.md and the seed's acts changed with the code. The e2e flows cover cancel, ask with a note, approval and leave.

One thing to confirm, not a blocker: the preload in index.html points at ./node_modules/.... Check that the built page's preload href is the same hashed URL that app.css loads. If it differs, the browser fetches the font twice and the preload does nothing.

Merged as 9c41de7