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

Groups are started and joined from the console

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:host/group-page

What changes

Starting a group (/new). Signed in, a person names the group's handle, its name, what it is for, and how people join (approval, open, or invitation), and starts it as its founder. The page then goes to the group. The host's refusal (a taken handle, say) is shown on the form. Signed out, the page asks them to sign in first; for someone this host does not start groups for, it says so. Home links to it.

A group's page (/g/<handle>), as getGroup answers it to the person looking:

  • its profile and rules, or that it is switched off;
  • where they stand, and what they can do about it: join or ask to, take back their request, or leave (a group by invitation says so);
  • its members and their roles, to its members;
  • those asking to join, admitted or turned down, to a member who may.

Group rows link to their pages.

A handle is resolved by the host's com.atproto.identity.resolveHandle, whose lexicon is copied as it is into lexicons/upstream, for the console's types.

End to end (harness/e2e/flows.spec.mjs), three new flows:

  • Alice starts a group from /new, sees it, and is refused a taken handle.
  • Bob, in his own browser, signs in, asks to join; Alice admits him from the group's page; he sees he is a member.
  • Bob leaves.

Why

Step 7's next part: a group is started and joined from the console. Running it (roles, invites, its apps and app passwords) comes next.

From the prototype's NewGroup.tsx and Group.tsx, plain for now as the console's pages are.

How it was checked

just e2e: nine flows, passing locally. svelte-check, the layers and the build pass. The host is unchanged.

Shortcomings

  • Members and those asking are shown by DID: a person's handle and name come with getActor, not yet built.
  • Admitting gives the group's default roles; choosing them on the page comes with roles.
Approved

This adds /new for starting a group and /g/<handle> for a group's page. The page resolves the handle, loads getGroup, and has join, cancel, leave, admit and deny actions. It also adds three e2e flows and the copied resolveHandle lexicon. The action inputs match the lexicons: admitMember takes did and denyJoinRequest takes member. The layering, the docs update and the shortcomings you list all look right.

I couldn't run anything. The check workflow passed. e2e, web, test and lexicons were still running or queued when I looked, so I have not seen the e2e flows or svelte-check pass.

One thing to consider, which doesn't block merging. A handle that doesn't resolve makes resolveHandle fail in load. A host refusal in admit, deny, join or leave fails the same way, because the actions neither catch it nor return fail(...). The user would get a generic error page rather than a message on the form. /new already handles this properly, so doing the same here when roles arrive would be consistent.

Merged as a8cf42c