Skip to content

[Guilds 04] Join and leave a guild, and see its members - #210

Open
shanesmithdev wants to merge 2 commits into
NativePHP:mainfrom
shanesmithdev:guilds-04
Open

shanesmithdev wants to merge 2 commits into
NativePHP:mainfrom
shanesmithdev:guilds-04

Conversation

@shanesmithdev

@shanesmithdev shanesmithdev commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Status: Blocked by #214. Merge it first: this branch is built on it, for the CommitDetailTest fix.

This follows on from Guilds 01–03, which are merged. It lets you join and leave a guild from its page, and see who's in it, built only on guild API that is merged and live on dev-null.sh.

What's in this PR?

  • Join and Leave on a guild's page, beside its icon, where Follow sits on a profile. Join is filled in your colour, Leave is grey.

    • The button and the member count change at once, and go back if devnull refuses
    • Joining a guild you muted unmutes it, as devnull does
    • It's offered on paused guilds too, and the moderator can leave like anyone else
  • The new commit button moves into the header, as "Commit" beside Join, where Remote sits on a profile. The top bar keeps only Share. As before, a paused guild has no Commit.

  • The member count opens the guild's members, as the web's members page lists them:

    • Avatar, name, @handle and bio, with "(moderator)" after the moderator's name
    • Nobody is marked while the moderator isn't a member, or the guild is paused
    • No Follow buttons, as on the web
    • More load as you scroll, and "Nobody has joined this guild yet." when it's empty

Testing

Pest tests cover:

  • joining and leaving, the member count, putting Join back when devnull refuses, and unmuting on join;
  • the kept guild page following a join and a leave, the kept directory following a join, and the kept members being dropped;
  • Commit in the header, its absence on paused guilds, and Share alone in the top bar;
  • the members screen: rows, the moderator mark (none without a moderator, or once they've left), opening a profile, the title, the empty state, paging, and a guild that's gone.

Locally, the full suite passes. Checked by hand on an iPhone 17 Pro simulator and an Android phone.

Note: on iOS the members screen shows the guild's name without the "Members" subtitle that Android shows. The same happens to the commit page's short hash, so it's an existing iOS gap rather than this PR's.

Independent review

A fresh reviewer, who hadn't seen the work being built, read this commit and found nothing significant. Three of its smaller points are fixed:

  • Leaving is now checked in the kept guild page, as joining was.
  • A moderator who has left has a test: the members screen marks nobody when moderator_id names someone not in the list.
  • The members screen says when the guild is gone, "This guild is no longer available.", or when guilds are off for you, as the guild page does.

Two are left as they are:

  • A refresh already in flight can undo Join or Leave on screen. On a slow connection, if you tap Join before the guild page's own refresh lands, that older answer puts the button and the count back for a moment, though devnull has the join. The next refresh corrects it. Profile and organization Follow have the same race, so this follows an existing pattern.
  • Members paging can skip someone. Pages are numbered, so if someone leaves between pages, one member can be skipped until a refresh. The guild board has the same limit.

It also checked the cache keys and handle encoding, the counts never doubling, the shared member row on Followers, Following and Search, accessibility labels, and the endpoints against dev-null.sh, and found them fine.

Screenshots

guild

Notice Commit and Leave beside the guild's icon, the top bar with only Share, and the member count you can now tap.

iOS light iOS dark Android light Android dark
Before
After

guild-members

Completely new: the guild's members, opened from the member count.

iOS light iOS dark Android light Android dark
After

The guild page's header now has Join or Leave beside the icon, as a
profile has Follow, with Commit (posting to the board) where Remote
sits. Share stays alone in the top bar. Joining or leaving changes the
button and the member count at once, puts them back if devnull refuses,
and unmutes a guild you join, as devnull does.

Tapping the member count opens the guild's members, as the web lists
them: avatar, name, handle and bio, with "(moderator)" on the
moderator's row while they're a member, and no Follow buttons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant