Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

Public channels, guests and requests to join in Chat (#44) #46

Closedsyntaqx wants to merge public-channels into main

Lands #137

syntaqxopened this pull request

Closes #44.

What changes

Channels now have three visibilities:

Workspace #Private 🔒Public 🌐
Find / read / joinanyone in the workspaceonly the people in itanyone signed in to g1t (confirmed email)
Who makes onemembers (unless owners restrict)members (unless owners restrict)workspace owners only

What the old UI called a "public" channel (anyone in the workspace) is now called a Workspace channel.

  • Guests. Anyone in a channel who isn't a member of the workspace is marked Guest on messages, in the people list, and in requests and invitations. A guest sees only their channels plus the workspace's public ones: no DMs, no directory, no channel changes.
  • Inviting outside collaborators. In a channel's details, Add takes any g1t username. The person gets an invitation in their own Chat sidebar and joins as a guest when they accept. Owners can always invite guests. Members can while Members can invite outside collaborators is on, which is the same setting repositories use.
  • Ask to join. A link to a channel you can't open shows "You can't open #x", with Ask to join and an optional note. The page is identical whether or not the channel exists, so it reveals nothing. Requests appear in the channel's details, with a count on its members button. Anyone in the channel can let in a workspace member; only those who may invite guests can let in an outsider.
  • @g1t answers workspace members only. Guests can't open a DM with g1t, and post never starts an answer for a non-member.
  • Moderation. Channel owners and workspace owners can take people out. An outsider taken out of a public channel can't rejoin on their own; inviting them again lifts that. Switching a channel from public back to workspace drops the outsiders who joined on their own and keeps the ones who were invited.
  • Guests' own sidebar gets an Other workspaces section with unread counts and an Invitations section. Another workspace's chat pages stay in Chat mode instead of Explore.

Where

  • services/chat/migrations/0007_public_channels.sql adds channels.public and the tables channel_invitations, channel_requests and channel_removals. Personal-data erasure covers all of them.
  • The rules live in services/chat/src/access.ts, with tests.
  • services/chat/src/index.ts: place/visitWorkspace let guests in where the rules allow. New RPCs: remove_member, channel_invitations, answer_channel_invitation, request_access, answer_access_request.
  • The site's chat routes no longer 404 people outside the workspace; the chat service decides what they see. The issue/PR card route (ref.ts) stays members-only.
  • Docs: the chat guide covers public channels, guests and asking to join; the permissions page renames the setting to Workspace channels.

Checked

  • Chat tests: 83 passing, 7 of them new.
  • npm test --workspaces: no failures. The web suite is 950 of 951 after rebasing; one test didn't run.
  • scripts/deploy tests: 92 passing.
  • tsc -b --force passes in apps/web, the mobile app and the chat service.
  • react-router build succeeds.
  • The migration and the new queries were run against a local D1.

Not yet checked live: the guest flow end to end needs a second account outside flagon-io. After deploy, I'll create #community-support in flagon-io as a public channel.

syntaqxclosed this·

All checks have passed

6 passed · on da6fe51

Workflows

CI / pull_request — CI passedDetails
CI / push — CI passedDetails
Caches / push — Caches passedDetails
Dependency review — No dependency changesDetails
Deploy / push — Deploy passedDetails
deploy / production — Deploy deployedDetails

public-channels is still there

Closed without merging. Deleting it can be undone here.

Sign in to comment.