From 4d2c241edd89615a57fc068cfb97316819598b4a Mon Sep 17 00:00:00 2001
From: Ris Adams
Date: Sat, 21 Nov 2026 14:52:32 -0500
Subject: [PATCH 01/12] docs: update knowledge base for guild aliases
---
KNOWLEDGE_BASE.md | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/KNOWLEDGE_BASE.md b/KNOWLEDGE_BASE.md
index c86097248..c6650e490 100644
--- a/KNOWLEDGE_BASE.md
+++ b/KNOWLEDGE_BASE.md
@@ -594,8 +594,8 @@ A signed request sees what the web shows you, such as your own pending commits a
- follow or unfollow people and organizations, mute or unmute, and block or unblock, and list who you muted and blocked;
- read who to follow, also as it is suggested beside a profile or a commit, and mark a suggestion not interested;
- read the hot topics, and each one's commits from the past week with its recap;
-- list guilds as the Guilds page does, 24 a page, searched by name, handle or description, with whether you joined or muted each one and whether it is paused, while guilds are available to you;
-- read a guild's board as its page does, 30 threads a page with reply previews, with the guild, its pinned commit and whether you moderate it, while guilds are available to you. The pinned commit also keeps its place in the list, so an app that shows it apart skips it there by its id;
+- list guilds as the Guilds page does, 24 a page, searched by name, handle, alias or description, with each guild's aliases, whether you joined or muted each one and whether it is paused, while guilds are available to you;
+- read a guild's board as its page does, by its handle or one of its aliases, 30 threads a page with reply previews, with the guild, its pinned commit and whether you moderate it, while guilds are available to you. The pinned commit also keeps its place in the list, so an app that shows it apart skips it there by its id;
- star or unstar, and list who starred your own commit, newest first, 20 a page;
- create polls on commits that are neither replies nor quotes, and vote on polls;
- change Remotes settings, read and send messages with images, link cards, and voice notes in conversations and orgs, mark them pulled, react to messages and list your reactions, pin and unpin org messages as a maintainer, find people, and start orgs;
@@ -652,7 +652,7 @@ Sources: [issue command UI](resources/js/components/issue-command.tsx), [issue v
Guilds are public groups around hashtags and are not generally available yet. In the preview, matching hashtags become small clickable guild labels; ordinary hashtags still open search. Create a guild from the Guilds overview or a hashtag's search page. From the overview, its display name determines the hashtag: “Laravel 4ever” becomes `#laravel4ever`. Display names and handles each allow up to 60 characters. When claiming a hashtag, the display name must match its letters, numbers and underscores, ignoring case; spaces, punctuation and decorative symbols are ignored, so `/dev/null` is valid for `#devnull`. Accents and underscores remain significant. Its creator joins automatically and maintains its display name, icon and description; a new display name must still match the hashtag, so `#adhd` can become “ADHD” but never another hashtag. Each person can create up to 100 guilds. A guild's name, description and icon pass the same automated moderation as commits before the guild is published or edited. When the moderation flags a new guild or an edit, it waits for an admin to review it instead: nothing of it is public until it is approved, the guild keeps its current details meanwhile, and a rejected submission is discarded. Submitting again for the same hashtag replaces the one still waiting, and new guilds waiting for review count toward the creation limit.
-The Guilds page lists groups by member count, with 24 guilds per page. Search matches keywords in guild names, handles, and descriptions, ignoring case; a leading `#` is optional. This directory search is keyword-based, not semantic. Click a guild's member count to browse its members: the moderator appears first, labeled “(moderator)”, followed by newest joins, with 50 people per page and Load more for the next page. Joining adds matching commits to Following without following every author and clears any existing mute. When a commit appears only because of a joined guild, it says “because you joined” beside the guild label. Leave a guild to reveal its Mute control. Muting hides matching commits from logs and search, including commits by followed authors. You can still open the guild or a commit directly.
+The Guilds page lists groups by member count, with 24 guilds per page. Search matches keywords in guild names, handles, aliases, and descriptions, ignoring case; a leading `#` is optional. This directory search is keyword-based, not semantic. Click a guild's member count to browse its members: the moderator appears first, labeled “(moderator)”, followed by newest joins, with 50 people per page and Load more for the next page. Joining adds matching commits to Following without following every author and clears any existing mute. When a commit appears only because of a joined guild, it says “because you joined” beside the guild label. Leave a guild to reveal its Mute control. Muting hides matching commits from logs and search, including commits by followed authors. You can still open the guild or a commit directly.
The guilds you joined are listed in the left navigation, with the guilds that have the most commits you missed first. Guilds with the same number of missed commits are ordered by how much you have committed in them, counting your recent approved commits. The count of missed commits starts from your last visit to the guild's board, or from when you joined, and leaves out your own commits, commits you cannot see, and commits by people you muted. Counts above 99 show as 99+, and a muted guild is not listed. Opening a board clears its count, and a line marks where the commits that are new since your last visit end.
@@ -660,6 +660,8 @@ While guilds are available to you, profiles show a guild count beside following
Each guild's bulletin board shows commits posted directly to it and regular commits containing its exact hashtag—not semantic search. Matching replies bring their thread onto the board, even when the root has no hashtag. Threads show reply previews and expand like a regular commit log, ordered by root date, newest first. Each page contains 30 distinct root commits; replies do not use up that limit, and Load more adds the next page. Posts from the board's composer stay attached to that guild without an automatic hashtag, including scheduled posts. They count toward the author's commit count but do not appear in their profile log or general feeds. Outside the board, such as when one is opened by its link, a board post names the guild it was posted in and notes that it is not shown in general logs. They appear in Following when you join the guild, and in semantic search suggestions and results under a divider with the guild's name and icon. Regular hashtag commits keep appearing on profiles and in feeds as usual. Typing a hashtag offers matching guilds in the autocomplete menu; select one with the keyboard or pointer to insert its handle.
+A guild's moderator can add aliases from its page: other hashtags that lead to the same guild. With `#golang` as an alias of `#go`, both hashtags show the guild's label, commits containing either appear on its board and count for joining, muting and missed commits, and `/guilds/golang` opens the same guild. An alias follows the rules of a handle: it starts with a letter, contains only letters, numbers and underscores, and allows up to 60 characters. It must be a free hashtag: one that is already a guild, including a paused guild, or already an alias of any guild cannot be used, and nobody can create a guild for a hashtag that is an alias. Each guild can have up to 10 aliases, and each passes the same automated moderation as commits; one that is flagged is refused. Aliases are listed beside the hashtag on the guild's page, the hashtag autocomplete finds a guild by an alias and inserts its handle, and the directory search matches them. The moderator can remove an alias at any time, which takes commits that only carry that hashtag off the board. Aliases stay with a paused guild.
+
The guild's moderator can pin one commit from its board, including a thread brought in by a matching reply. It appears first with a “Pinned to board” label, without appearing twice or changing profile pins or other guilds. The pin is separate from the 30 chronological threads per page, so pinning never changes what Load more brings in. Pinning another replaces it; unpinning restores its natural position if already loaded, or removes its promotion until you load that older page. A pin never overrides visibility, blocks or author mutes, and disappears from the board if the thread no longer matches the guild. Permanently deleting the pinned commit clears the pin.
Guild descriptions can be reported privately. When a guild has no moderator, including after its moderator deletes their account, it is paused, not deleted. Its page, posts, icon, description, memberships and mute preferences stay connected. New board posts wait until it has a moderator; scheduled board posts stay pending and keep their guild, and committing one now says the guild is paused. Ordinary hashtag commits still appear. A different person can claim the hashtag to resume the same guild, but a removed moderator cannot reclaim it.
@@ -672,7 +674,7 @@ Choose **Download JSON** in Settings → Profile to export your account data. Th
- the days you used /dev/null (dates, not times), oldest first, with which of its apps you used on each (days before apps were tracked say web, whatever you used, and a phone approved before the mobile app started identifying itself says other), and the last of them;
- your commits and replies (including pending, rejected, and deleted entries still stored), their cached translations, polls, and your votes;
- stars, followers and people you follow, mutes, blocks, and dismissed **Not interested** suggestions;
-- guilds you moderate, guilds and guild edits you submitted that are waiting for review, your guild memberships and mutes, reports you submitted, and guild moderator-removal records relating to your account;
+- guilds you moderate with their aliases, guilds and guild edits you submitted that are waiting for review, your guild memberships and mutes, reports you submitted, and guild moderator-removal records relating to your account;
- messages you sent, including links to your voice notes, and notifications;
- SSH key fingerprints, approved devices, timeout history, and ban history;
- active-session metadata: IP address, browser information, and last activity.
From a508a553d4e0c5da10fe6ee366b35b2c9e04b26d Mon Sep 17 00:00:00 2001
From: Ris Adams
Date: Sat, 21 Nov 2026 14:52:28 -0500
Subject: [PATCH 02/12] test: add frontend tests for guild aliases
---
tests/Unit/GuildControls.test.tsx | 29 +++++++++++++++++++
tests/Unit/Guilds.test.ts | 21 ++++++++++++++
tests/Unit/LinkifiedText.test.tsx | 16 +++++++++--
tests/Unit/OrgMentionSuggestions.test.tsx | 35 ++++++++++++++++++++++-
4 files changed, 97 insertions(+), 4 deletions(-)
create mode 100644 tests/Unit/Guilds.test.ts
diff --git a/tests/Unit/GuildControls.test.tsx b/tests/Unit/GuildControls.test.tsx
index 31d29ee29..6cbcef199 100644
--- a/tests/Unit/GuildControls.test.tsx
+++ b/tests/Unit/GuildControls.test.tsx
@@ -18,6 +18,7 @@ vi.doMock('@inertiajs/react', async () => ({
{
id: 'guild-id',
handle: 'rust',
+ aliases: [],
name: 'Rust',
is_joined: true,
},
@@ -60,6 +61,8 @@ const { default: GuildBoard } =
await import('../../resources/js/pages/guild/show');
const { CommitCard } =
await import('../../resources/js/components/commit-card');
+const { GuildAliasesButton } =
+ await import('../../resources/js/components/guild-aliases');
const { GuildDialog } =
await import('../../resources/js/components/guild-dialog');
const { GuildPreferences } =
@@ -181,6 +184,32 @@ test('clears the missed commits of a joined guild when its board opens', () => {
assert.deepEqual(put.mock.calls[0][2].only, ['joinedGuilds']);
});
+test('removes an alias optimistically from its own guild only', () => {
+ const remove = vi.fn();
+ const optimistic = vi
+ .spyOn(router, 'optimistic')
+ .mockReturnValue({ delete: remove } as unknown as typeof router);
+ const guild = {
+ id: 'guild-id',
+ handle: 'go',
+ aliases: ['golang', 'gopher'],
+ } as Guild;
+ const other = { id: 'other', handle: 'rust', aliases: ['golang'] } as Guild;
+
+ const button = elements(GuildAliasesButton({ guild })).find(
+ (element) => element.props['aria-label'] === 'Remove #golang',
+ )!;
+ (button.props.onClick as () => void)();
+
+ const update = optimistic.mock.calls[0][0] as (props: {
+ guilds: Guild[];
+ }) => unknown;
+ assert.deepEqual(update({ guilds: [guild, other] }), {
+ guilds: [{ id: 'guild-id', handle: 'go', aliases: ['gopher'] }, other],
+ });
+ assert.equal(remove.mock.calls[0][0], '/guilds/go/aliases/golang');
+});
+
test('changes only the pin optimistically and prevents pin and load-more requests from overlapping', () => {
const commit = { id: 'target' } as Commit;
const view = () => {
diff --git a/tests/Unit/Guilds.test.ts b/tests/Unit/Guilds.test.ts
new file mode 100644
index 000000000..fa76b229b
--- /dev/null
+++ b/tests/Unit/Guilds.test.ts
@@ -0,0 +1,21 @@
+import assert from 'node:assert/strict';
+import { test } from 'node:test';
+import { guildFor } from '../../resources/js/lib/guilds.ts';
+
+const guilds = [
+ { handle: 'go', aliases: ['golang', 'gopher'] },
+ { handle: 'rust', aliases: [] },
+];
+
+await test('finds a guild by its handle or by one of its aliases', () => {
+ assert.equal(guildFor(guilds, 'go'), guilds[0]);
+ assert.equal(guildFor(guilds, 'golang'), guilds[0]);
+ assert.equal(guildFor(guilds, 'gopher'), guilds[0]);
+ assert.equal(guildFor(guilds, 'rust'), guilds[1]);
+});
+
+await test('finds no guild for a hashtag nobody claimed, or without the guilds', () => {
+ assert.equal(guildFor(guilds, 'golanguage'), undefined);
+ assert.equal(guildFor(null, 'go'), undefined);
+ assert.equal(guildFor(undefined, 'go'), undefined);
+});
diff --git a/tests/Unit/LinkifiedText.test.tsx b/tests/Unit/LinkifiedText.test.tsx
index e8b14424a..80d5cf26d 100644
--- a/tests/Unit/LinkifiedText.test.tsx
+++ b/tests/Unit/LinkifiedText.test.tsx
@@ -108,7 +108,7 @@ test('renders only matching prose hashtags as guilds when the preview is availab
const content = (
@@ -119,6 +119,7 @@ test('renders only matching prose hashtags as guilds when the preview is availab
guilds: [
{
handle: 'jobs',
+ aliases: ['work'],
name: 'Job Board',
description: 'Hiring',
emoji: '💼',
@@ -127,8 +128,9 @@ test('renders only matching prose hashtags as guilds when the preview is availab
],
});
- assert.equal((markup.match(/href="\/guilds\/jobs"/g) ?? []).length, 1);
+ assert.equal((markup.match(/href="\/guilds\/jobs"/g) ?? []).length, 2);
assert.match(markup, /aria-label="Job Board, #JoBs guild"/);
+ assert.match(markup, /aria-label="Job Board, #Work guild"/);
assert.match(markup, /href="\/search\?q=%23rust"/);
assert.match(markup, /]*>#jobs<\/code>/);
assert.match(markup, /href="https:\/\/example.com\/#jobs"/);
@@ -787,7 +789,15 @@ test('gives a bare hex-shaped hashtag its guild or search link and renders an ex
const auth = { user: { id: 'viewer' }, pasteis: null };
const html = renderPage(content, {
auth,
- guilds: [{ handle: 'dead', name: 'Dead', emoji: '💻', icon_url: null }],
+ guilds: [
+ {
+ handle: 'dead',
+ aliases: [],
+ name: 'Dead',
+ emoji: '💻',
+ icon_url: null,
+ },
+ ],
});
assert.equal((html.match(/href="\/guilds\/dead"/g) ?? []).length, 1);
diff --git a/tests/Unit/OrgMentionSuggestions.test.tsx b/tests/Unit/OrgMentionSuggestions.test.tsx
index 65102d241..8a82e9f3b 100644
--- a/tests/Unit/OrgMentionSuggestions.test.tsx
+++ b/tests/Unit/OrgMentionSuggestions.test.tsx
@@ -108,6 +108,7 @@ test('suggests loaded guilds and inserts a hex-shaped hashtag without fetching',
({
id: handle,
handle,
+ aliases: [] as string[],
name: handle,
emoji: '💻',
icon_url: null,
@@ -142,6 +143,31 @@ test('suggests loaded guilds and inserts a hex-shaped hashtag without fetching',
assert.equal(fetchMock.mock.calls.length, 0);
});
+test('suggests a guild by one of its aliases', () => {
+ guilds = [
+ {
+ id: 'laravel',
+ handle: 'laravel',
+ aliases: ['artisan'],
+ name: 'Laravel',
+ emoji: '💻',
+ icon_url: null,
+ } as Guild,
+ ];
+ state[0] = { kind: 'guild', start: 6, query: 'ART' };
+ cursor = 0;
+ effects = [];
+ const fields = elements(
+ MentionTextarea({ value: 'Hello #ART', onValueChange: () => {} }),
+ );
+ assert.deepEqual(
+ fields
+ .filter((element) => element.props.role === 'option')
+ .map((option) => option.props.id),
+ ['mentions-guild-laravel'],
+ );
+});
+
test('does not suggest guilds inside code, URLs, partial handles or when preview data is absent', () => {
for (const value of [
'`#rust',
@@ -152,7 +178,14 @@ test('does not suggest guilds inside code, URLs, partial handles or when preview
'##rust',
'color(#dead',
]) {
- guilds = [{ id: 'rust', handle: 'rust', name: 'Rust' } as Guild];
+ guilds = [
+ {
+ id: 'rust',
+ handle: 'rust',
+ aliases: [] as string[],
+ name: 'Rust',
+ } as Guild,
+ ];
cursor = 0;
state[0] = null;
const fields = elements(
From bcf7ec73207622d03c38924362d57eb5a4515fe1 Mon Sep 17 00:00:00 2001
From: Ris Adams
Date: Sat, 21 Nov 2026 14:52:25 -0500
Subject: [PATCH 03/12] feat: integrate guild aliases into frontend components
---
resources/js/components/guild-aliases.tsx | 134 +++++++++++++++++++
resources/js/components/linkified-text.tsx | 6 +-
resources/js/components/mention-textarea.tsx | 3 +
resources/js/pages/guild/show.tsx | 13 ++
resources/js/pages/search/index.tsx | 5 +-
5 files changed, 155 insertions(+), 6 deletions(-)
create mode 100644 resources/js/components/guild-aliases.tsx
diff --git a/resources/js/components/guild-aliases.tsx b/resources/js/components/guild-aliases.tsx
new file mode 100644
index 000000000..1fea0e459
--- /dev/null
+++ b/resources/js/components/guild-aliases.tsx
@@ -0,0 +1,134 @@
+import { Form, router } from '@inertiajs/react';
+import { Plus, X } from 'lucide-react';
+import {
+ destroy,
+ store,
+} from '@/actions/App/Http/Controllers/GuildAliasController';
+import InputError from '@/components/input-error';
+import { Button } from '@/components/ui/button';
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+} from '@/components/ui/dialog';
+import { Label } from '@/components/ui/label';
+import type { Guild } from '@/types/guild';
+
+export function GuildAliasesButton({ guild }: { guild: Guild }) {
+ function remove(alias: string) {
+ router
+ .optimistic<{ guilds: Guild[] | null }>((props) => ({
+ guilds: props.guilds?.map((item) =>
+ item.id === guild.id
+ ? {
+ ...item,
+ aliases: item.aliases.filter(
+ (other) => other !== alias,
+ ),
+ }
+ : item,
+ ),
+ }))
+ .delete(destroy.url({ guild: guild.handle, alias }), {
+ preserveScroll: true,
+ onSuccess: () => router.flushAll(),
+ });
+ }
+
+ return (
+
+ );
+}
diff --git a/resources/js/components/linkified-text.tsx b/resources/js/components/linkified-text.tsx
index 38fe900d7..24e86b4a5 100644
--- a/resources/js/components/linkified-text.tsx
+++ b/resources/js/components/linkified-text.tsx
@@ -16,6 +16,7 @@ import { UserPreview } from '@/components/user-preview';
import { typedProse, withoutCode } from '@/lib/code';
import type { Color } from '@/lib/colors';
import { colorsIn } from '@/lib/colors';
+import { guildFor } from '@/lib/guilds';
import { hashtagPattern } from '@/lib/hashtags';
import { mentionPattern } from '@/lib/mentions';
import { pasteisParts } from '@/lib/pasteis';
@@ -635,10 +636,7 @@ export function Hashtag({
}) {
const { auth, guilds } = usePage().props;
const guild =
- postedGuild ??
- guilds?.find(
- (guild) => guild.handle === hashtag.slice(1).toLowerCase(),
- );
+ postedGuild ?? guildFor(guilds, hashtag.slice(1).toLowerCase());
if (guild) {
const canOpenGuild = !!auth.user && !!guilds;
diff --git a/resources/js/components/mention-textarea.tsx b/resources/js/components/mention-textarea.tsx
index aa6a06bfe..d3a9b0932 100644
--- a/resources/js/components/mention-textarea.tsx
+++ b/resources/js/components/mention-textarea.tsx
@@ -516,6 +516,9 @@ export function MentionTextarea({
.filter(
(guild) =>
guild.handle.includes(guildQuery) ||
+ guild.aliases.some((alias) =>
+ alias.includes(guildQuery),
+ ) ||
guild.name.toLowerCase().includes(guildQuery),
)
.toSorted(
diff --git a/resources/js/pages/guild/show.tsx b/resources/js/pages/guild/show.tsx
index cbadaf590..9339f6dfc 100644
--- a/resources/js/pages/guild/show.tsx
+++ b/resources/js/pages/guild/show.tsx
@@ -10,6 +10,7 @@ import { CommitComposer } from '@/components/commit-composer';
import { EmptyFeed } from '@/components/commit-feed';
import { GraphCanvas } from '@/components/graph-canvas';
import { RailSegment } from '@/components/graph-rail';
+import { GuildAliasesButton } from '@/components/guild-aliases';
import { GuildDialog } from '@/components/guild-dialog';
import { GuildIcon } from '@/components/guild-icon';
import {
@@ -175,6 +176,8 @@ export default function Show({
);
}
+ const aliases = guild.aliases.map((alias) => `#${alias}`).join(' ');
+
return (
<>
@@ -213,6 +216,15 @@ export default function Show({
#{handle}
+ {aliases && (
+
+ also {aliases}
+
+ )}
·
{guild.is_paused
@@ -227,6 +239,7 @@ export default function Show({