Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/buzz-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ mention anyone. Explicit agent watches on that room can still receive them.
with no **Join Community** confirmation. Other Builderlab deployments do not
offer it during setup. Later, **Create community** in **Settings → Plugins →
Builderlab → Communities** opens the join for the new community at once; after its profile
step it opens and is listed in the community picker. When the owner of a community with no channels yet
opens Messages, Buzz creates one open **#general**, marked as the starter
channel for new members, and opens it.
step it opens and is listed in the community picker.
The picker's **Create community** opens that form directly. If Builderlab is
signed out, sign in remains available in both management sections; a picker
creation resumes after sign-in.
Expand Down
16 changes: 0 additions & 16 deletions docs/communities.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,6 @@ claim: there the relay adds each person, though not agents, to the starter
channels they have never been in each time they connect, so those channels
appear a moment later. See [local-first launch](channels.md#local-first-launch).

A brand-new community has no channels. When its owner opens Messages there,
having joined no channel, the client reads at most 20 stream or forum metadata
events (`anyChannel`). Solo chats, DMs and system channels don't count, since
the Bestie tab can open one first. Only when none of the rest come back, so the
community has no stream or forum at all, open, private or archived, does it
create one open `general` and make it a starter channel. A full batch of 20
Solo chats counts as not empty, so it creates nothing and stops checking. It
does this at most
once per community on each device (a view-state marker) and once per app run,
and the relay's unique open channel names refuse a second `general` from
another device. Admins and members never create it, and it joins no one and
posts nothing: Messages then opens it as the first channel. The relay is
expected to take this over (block/buzz#9108).



Profile editing preserves existing fields that this editor does not expose.
After a confirmed Settings save, the profile also becomes the device-local
default used in Personal space and new-community setup; other existing community
Expand Down
2 changes: 0 additions & 2 deletions src/bundled/channels/ChannelsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import {
} from "../../features/solo/chat-workspace";
import type { ChannelLifecycleAction } from "../../features/relay/channel-lifecycle-protocol";
import type { CommunityMembership } from "../moderation/membership";
import { useFirstChannel } from "./first-channel";
import { SoloHeading, SoloToolbar, useSoloMoveRecovery } from "./SoloHeading";
import { NewMessage } from "../../features/direct-messages/NewMessage";
import { ForwardMessageProvider } from "../../features/messages/ForwardMessage";
Expand Down Expand Up @@ -404,7 +403,6 @@ function ChannelWorkspace({
);
const list = useChannelRoster(queries.channels);
const initialList = useRef(list);
useFirstChannel({ scope, cached, queries, list, membership });
const preferences = useSidebarPreferences(queries.sidebarPreferences);
useEffect(() => {
// Initial channel discovery cancels in-flight reads as it settles access.
Expand Down
175 changes: 0 additions & 175 deletions src/bundled/channels/first-channel.test.tsx

This file was deleted.

104 changes: 0 additions & 104 deletions src/bundled/channels/first-channel.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/features/relay/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,6 @@ export interface ChannelQueries {
readDirectory?(options?: {
signal?: AbortSignal | undefined;
}): Promise<{ partial: boolean }>;
/** Whether the relay holds any stream or forum channel this viewer can
* see, open, private or archived; DMs, Solo chats and system channels do
* not count, though a full batch of only Solo chats counts as not empty.
* One read of a few events. Names no channel, never grants access. */
anyChannel?(options?: { signal?: AbortSignal | undefined }): Promise<boolean>;
/** Member counts for browsing, from a joined channel's roster or an open
* channel's relay-signed one, kept a few minutes. A channel without a
* roster is left out of `counts`; `failed` names the ids whose read
Expand Down
46 changes: 0 additions & 46 deletions src/features/relay/store-discovery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1405,52 +1405,6 @@ it("orders public matches by the shared ranks, best first", async () => {
expect(h.pending).toHaveLength(0);
});

it("checks for any stream or forum in one capped read, skipping Solo chats", async () => {
const h = setup();
h.channels.ensureList();
await h.rosters(0);
await h.settled();
const id = (n: number) =>
`13200000-0000-4000-8000-${String(n).padStart(12, "0")}`;
const solo = (n: number) =>
metadata(relay, id(n), `solo-${n}`, 1_700_000_000, [
["t", "stream"],
["t", "buzz.solo"],
]);
const check = async (events: RelayEvent[]) => {
const answer = h.channels.anyChannel?.();
const request = await h.next(39000);
expect(request.filters).toEqual([
{
kinds: [39000],
authors: [relay.pubkey],
"#t": ["forum", "stream"],
limit: 20,
},
]);
request.respond(events);
return answer;
};
// Nothing, or only the owner's Solo chats: a new community.
expect(await check([])).toBe(false);
expect(await check([solo(0)])).toBe(false);
// Any stream or forum, archived included, means it is not new.
expect(
await check([
solo(1),
metadata(relay, id(2), "old", 1_700_000_000, [
["t", "stream"],
["archived", "true"],
]),
]),
).toBe(true);
// A full batch of Solo chats is not an empty community either.
expect(await check(Array.from({ length: 20 }, (_, n) => solo(10 + n)))).toBe(
true,
);
expect(h.pending).toHaveLength(0);
});

it("reads the open directory for browsing with descriptions, sharing the search read", async () => {
const h = setup();
h.channels.ensureList();
Expand Down
Loading
Loading