Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

feat(community): remove @here mention, keep @everyone

Gus0ca56af7f538
diff --git a/src/shared/src/db/community-schema.ts b/src/shared/src/db/community-schema.ts
index 6c6f5b9fe..5092bdf18 100644
--- a/src/shared/src/db/community-schema.ts
+++ b/src/shared/src/db/community-schema.ts
@@ -468,7 +468,7 @@ export const communityPin = sqliteTable(
// 16. community_mention
// `kind` distinguishes how the mention was created:
-// - "mention" — explicit @user / @everyone / @here in the message body
+// - "mention" — explicit @user / @everyone in the message body
// - "reply" — message replies to one of the user's earlier messages
// The Mentions tab only surfaces kind="mention"; the For You tab uses both.
export const communityMention = sqliteTable(
diff --git a/src/shared/src/utils/community-mentions.ts b/src/shared/src/utils/community-mentions.ts
index 04bc4b48c..f79ae3dad 100644
--- a/src/shared/src/utils/community-mentions.ts
+++ b/src/shared/src/utils/community-mentions.ts
@@ -26,14 +26,17 @@ export interface MentionCandidate {
}
/**
- * The roster-wide mention triggers. Order matters — when both `@everyone` and
- * `@here` appear in the same message, `everyone` wins (broader scope wins).
+ * The roster-wide mention triggers. `@here` (notify-online) was removed
+ * entirely — `@everyone` is the sole broadcast trigger now. Kept as an array
+ * (not a bare literal) because `VIRTUAL_ITEMS` and `detectMentionType`
+ * (mention-extension.ts) derive from it, and `MentionType` stays a named type
+ * used across the send path.
*/
-export const MENTION_TYPES = ["everyone", "here"] as const;
+export const MENTION_TYPES = ["everyone"] as const;
export type MentionType = (typeof MENTION_TYPES)[number];
export function isMentionType(value: unknown): value is MentionType {
- return value === "everyone" || value === "here";
+ return value === "everyone";
}
const ID_CHAR_RE = /[\p{L}\p{N}_-]/u;
diff --git a/src/shared/test/utils/community-mentions.test.ts b/src/shared/test/utils/community-mentions.test.ts
index 8bd829a21..99739dbb7 100644
--- a/src/shared/test/utils/community-mentions.test.ts
+++ b/src/shared/test/utils/community-mentions.test.ts
@@ -70,7 +70,7 @@ describe("extractMentionedUserIds", () => {
expect(extractMentionedUserIds("早 @李雷 好", ROSTER)).toEqual([]);
});
- it("does not match @everyone / @here", () => {
+ it("does not match @everyone (broadcast trigger, not a member handle)", () => {
expect(extractMentionedUserIds("@everyone hi", ROSTER)).toEqual([]);
});
diff --git a/src/web/src/components/community/composer.tsx b/src/web/src/components/community/composer.tsx
index 31db56b99..62a7e4e36 100644
--- a/src/web/src/components/community/composer.tsx
+++ b/src/web/src/components/community/composer.tsx
@@ -2,7 +2,7 @@
import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react"
import { createPortal } from "react-dom"
-import { AtSign, FileIcon, ImageIcon, PlusCircle, Smile, Upload, Users, X } from "lucide-react"
+import { FileIcon, ImageIcon, PlusCircle, Smile, Upload, Users, X } from "lucide-react"
import { useEditor, EditorContent, type JSONContent } from "@tiptap/react"
import StarterKit from "@tiptap/starter-kit"
import Placeholder from "@tiptap/extension-placeholder"
@@ -114,8 +114,8 @@ export type ComposerProps = {
// `mode="forumPostBody"` the mapping is inverted (Enter = newline,
// Shift+Enter = submit) to match /w's issue-sheet convention. While the
// mention popover is open Enter/Tab/Arrow keys drive selection instead.
-// @everyone / @here are virtual candidates in channel + thread contexts
-// (hidden in DM).
+// @everyone is a virtual candidate in channel + thread contexts
+// (hidden in DM). (@here was removed — plans/remove-here-mention.md.)
export const Composer = forwardRef<ComposerHandle, ComposerProps>(function Composer({
channel,
context,
@@ -771,8 +771,10 @@ function MentionRow({ item, selected, showMembersHeader, onSelect }: {
{item.kind === "member" ? (
<Avatar label={item.avatar} seed={item.userId} size={24} presence={item.status} ringColor="var(--popover)" />
) : (
+ // Only `@everyone` remains as a virtual (non-member) item — `@here`
+ // was removed (plans/remove-here-mention.md).
<span className="grid size-6 place-items-center rounded-full bg-primary/15 text-primary">
- {item.kind === "everyone" ? <Users className="size-3.5" /> : <AtSign className="size-3.5" />}
+ <Users className="size-3.5" />
</span>
)}
<span className="font-medium">
@@ -788,9 +790,7 @@ function MentionRow({ item, selected, showMembersHeader, onSelect }: {
)}
</span>
{item.kind !== "member" && (
- <span className="ml-auto text-xs text-muted-foreground">
- {item.kind === "everyone" ? "Notify everyone" : "Notify online"}
- </span>
+ <span className="ml-auto text-xs text-muted-foreground">Notify everyone</span>
)}
</button>
</>
diff --git a/src/web/src/components/community/inline-marks.tsx b/src/web/src/components/community/inline-marks.tsx
index fc6312ba8..7d2b9e1d2 100644
--- a/src/web/src/components/community/inline-marks.tsx
+++ b/src/web/src/components/community/inline-marks.tsx
@@ -22,8 +22,8 @@ export function Spoiler({ children }: { children?: React.ReactNode }) {
)
}
-// @mention pill. `everyone` styles @everyone/@here distinctly. `onClick` is
-// only wired for resolvable member mentions — @everyone/@here have no
+// @mention pill. `everyone` styles @everyone distinctly. `onClick` is
+// only wired for resolvable member mentions — @everyone has no
// profile to open, so message-markdown.tsx never passes it for those.
export function MentionPill({
children,
diff --git a/src/web/src/components/community/message-body.tsx b/src/web/src/components/community/message-body.tsx
index 03e1159f9..87fcb1185 100644
--- a/src/web/src/components/community/message-body.tsx
+++ b/src/web/src/components/community/message-body.tsx
@@ -75,7 +75,7 @@ const REHYPE_PLUGINS: PluggableList = [
// is rendered natively by streamdown (GFM, matching agent-chat). The shared
// mermaid/math/cjk plugins give parity with the agent bubble (diagrams, KaTeX
// math, CJK spacing) and operate on different constructs than the chat-only
-// syntax (spoilers, @mentions, @everyone/@here, #channels) that `chatSyntaxPlugin`
+// syntax (spoilers, @mentions, @everyone, #channels) that `chatSyntaxPlugin`
// parses directly into mdast nodes and maps to pill components — no custom
// markdown parser, no HTML-string splicing.
//
diff --git a/src/web/src/components/community/message-markdown.test.ts b/src/web/src/components/community/message-markdown.test.ts
index 4720d3d89..e4dedabed 100644
--- a/src/web/src/components/community/message-markdown.test.ts
+++ b/src/web/src/components/community/message-markdown.test.ts
@@ -25,9 +25,8 @@ describe("mentionNameFromText", () => {
expect(mentionNameFromText("@Gus#00423")).toBe("Gus#00423")
})
- it("leaves @everyone / @here as-is (no discriminator to strip)", () => {
+ it("leaves @everyone as-is (no discriminator to strip)", () => {
expect(mentionNameFromText("@everyone")).toBe("everyone")
- expect(mentionNameFromText("@here")).toBe("here")
})
})
@@ -50,7 +49,7 @@ describe("buildMdComponents — mention pill onClick wiring", () => {
expect(onOpenProfile).toHaveBeenCalledWith("Gus", fakeEvent, "0042")
})
- it("does not wire onClick for @everyone / @here", () => {
+ it("does not wire onClick for @everyone", () => {
const onOpenProfile = vi.fn()
const components = buildMdComponents(onOpenProfile)
const el = components.mention({ children: "@everyone", "data-everyone": "1" }) as unknown as MentionElement
diff --git a/src/web/src/components/community/message-markdown.tsx b/src/web/src/components/community/message-markdown.tsx
index e28228512..9f437a276 100644
--- a/src/web/src/components/community/message-markdown.tsx
+++ b/src/web/src/components/community/message-markdown.tsx
@@ -39,7 +39,7 @@ export function extractInviteTokens(text: string): string[] {
// chat-syntax-plugin.ts — `hast-util-sanitize` matches its allowlist against
// the property key, and kebab-case (`data-tag`) silently drops both, so the
// mention pill would lose its discriminator (same-name pills all resolve to
-// the first match) and @everyone/@here lose their styling flag.
+// the first match) and @everyone loses its styling flag.
export const MD_ALLOWED_TAGS = {
spoiler: [],
mention: ["dataEveryone", "dataTag"],
@@ -80,7 +80,7 @@ export const MD_COMPONENTS = {
} as Record<string, React.ComponentType<Record<string, unknown> & { children?: React.ReactNode }>>
// Same as `MD_COMPONENTS`, but the `mention` pill opens the profile card on
-// click (skipped for @everyone/@here — there's no user behind those), and
+// click (skipped for @everyone — there's no user behind it), and
// `messageref` receives `onJumpToSeq` for click-time navigation. Built
// per-render (memoized by the caller) rather than statically, since it closes
// over callbacks.
diff --git a/src/web/src/hooks/community/mutations/forum.ts b/src/web/src/hooks/community/mutations/forum.ts
index 318ac6568..320d5daa0 100644
--- a/src/web/src/hooks/community/mutations/forum.ts
+++ b/src/web/src/hooks/community/mutations/forum.ts
@@ -16,7 +16,7 @@ export type CreateForumPostArgs = {
// `useUploadFile` before firing this mutation, and the server persists them
// as `community_message_attachment` rows on the post's first message.
attachments?: UploadedAttachment[]
- // Propagated to the first message so `@everyone`/`@here` audience broadcast
+ // Propagated to the first message so `@everyone` audience broadcast
// fires end-to-end.
mentionType?: MentionType
}
diff --git a/src/web/src/lib/community/chat-syntax-plugin.test.ts b/src/web/src/lib/community/chat-syntax-plugin.test.ts
index d5528affc..001ac4203 100644
--- a/src/web/src/lib/community/chat-syntax-plugin.test.ts
+++ b/src/web/src/lib/community/chat-syntax-plugin.test.ts
@@ -67,9 +67,14 @@ describe("chatSyntaxPlugin — mention", () => {
expect(children[1]).toMatchObject({ type: "mention", value: "@everyone", everyone: true })
})
- it("flags @here", () => {
+ it("does NOT treat @here as a mention — it was removed, renders as plain text", () => {
+ // @here was removed as a broadcast trigger (plans/remove-here-mention.md,
+ // option b). A literal @here is no longer a mention node; it stays text
+ // (incl. historical messages — no legacy rendering).
const children = paragraphChildren(parse("@here ping"))
- expect(children[0]).toMatchObject({ type: "mention", value: "@here", everyone: true })
+ expect(children.some((c) => c.type === "mention")).toBe(false)
+ expect(children).toHaveLength(1)
+ expect(children[0]).toMatchObject({ type: "text", value: "@here ping" })
})
it("does NOT match @everyone inside a longer identifier (trailing boundary guard)", () => {
diff --git a/src/web/src/lib/community/chat-syntax-plugin.ts b/src/web/src/lib/community/chat-syntax-plugin.ts
index 1f370e3a6..2732c3633 100644
--- a/src/web/src/lib/community/chat-syntax-plugin.ts
+++ b/src/web/src/lib/community/chat-syntax-plugin.ts
@@ -105,10 +105,13 @@ const MESSAGE_REF_RE = new RegExp(`#\\d{1,6}(?=\\s|$|[${REF_TERM}])`, "gu")
// Two-branch mention grammar (see plans/mandatory-mention-discriminator.md):
//
-// 1. The literal `@everyone`/`@here` tokens, with a trailing
-// `(?![\p{L}\p{N}_-])` boundary guard so `@everyoneee` is NOT matched as
-// `@everyone` — this MUST agree with `detectMentionType`'s boundary check
-// (mention-extension.ts) and `community-mentions.ts`'s `ID_CHAR_RE`.
+// 1. The literal `@everyone` token, with a trailing `(?![\p{L}\p{N}_-])`
+// boundary guard so `@everyoneee` is NOT matched as `@everyone` — this MUST
+// agree with `detectMentionType`'s boundary check (mention-extension.ts)
+// and `community-mentions.ts`'s `ID_CHAR_RE`. (`@here` was removed as a
+// broadcast trigger — see plans/remove-here-mention.md; a literal `@here`
+// now falls through as ordinary text, matching option b: no legacy
+// rendering for historical `@here`.)
//
// 2. A member mention `@<name>#dddd` where the trailing `#dddd` is REQUIRED
// and acts as an unambiguous terminator. Because member names are validated
@@ -120,15 +123,15 @@ const MESSAGE_REF_RE = new RegExp(`#\\d{1,6}(?=\\s|$|[${REF_TERM}])`, "gu")
// a 5+-digit run from matching a 4-digit tag (`@Gus#00423`). A hand-typed
// bare `@Alice` (no tag) is intentionally NOT a mention — it stays text.
const MENTION_RE =
- /@(?:everyone|here)(?![\p{L}\p{N}_-])|@[^@#\n\r]*[^@#\n\r\s]#\d{4}(?!\d)/gu
+ /@everyone(?![\p{L}\p{N}_-])|@[^@#\n\r]*[^@#\n\r\s]#\d{4}(?!\d)/gu
-/** mdast node produced by `@name`/`@name#0042`/`@everyone`/`@here`. */
+/** mdast node produced by `@name`/`@name#0042`/`@everyone`. */
export interface MentionNode {
type: "mention"
/** Display name — `#dddd` discriminator, if present, is stripped from here (matches the old `<mention>` tag's content). */
value: string
everyone: boolean
- /** The 4-digit discriminator, if the mention carried one (never set for `@everyone`/`@here`). */
+ /** The 4-digit discriminator, if the mention carried one (never set for `@everyone`). */
discriminator?: string
}
@@ -175,7 +178,7 @@ declare module "mdast" {
const IGNORE_NODE_TYPES = ["code", "inlineCode", "link", "linkReference"]
function mentionReplacer(value: string): MentionNode {
- const everyone = value === "@everyone" || value === "@here"
+ const everyone = value === "@everyone"
if (everyone) return { type: "mention", value, everyone: true }
const tag = /#(\d{4})$/.exec(value)
const bare = value.replace(/#\d{4}$/, "")
diff --git a/src/web/src/lib/community/mention-extension.test.ts b/src/web/src/lib/community/mention-extension.test.ts
index 2a004d06e..2ae4a64bf 100644
--- a/src/web/src/lib/community/mention-extension.test.ts
+++ b/src/web/src/lib/community/mention-extension.test.ts
@@ -30,15 +30,18 @@ describe("rankMentionItems", () => {
member("u4", "Heath"),
]
- it("puts everyone/here at the top in channel context with empty query", () => {
+ it("puts everyone at the top in channel context with empty query", () => {
+ // @here was removed (plans/remove-here-mention.md) — @everyone is the only
+ // virtual mention item now.
const items = rankMentionItems(roster, "channel", "")
- expect(items.slice(0, 2).map((i) => i.id)).toEqual(["everyone", "here"])
+ expect(items[0].id).toBe("everyone")
+ expect(items.some((i) => i.id === "here")).toBe(false)
})
- it("includes everyone/here in thread context", () => {
+ it("includes everyone (not here) in thread context", () => {
const items = rankMentionItems(roster, "thread", "")
expect(items.some((i) => i.id === "everyone")).toBe(true)
- expect(items.some((i) => i.id === "here")).toBe(true)
+ expect(items.some((i) => i.id === "here")).toBe(false)
})
it("returns no items in DM context — popover is disabled entirely", () => {
@@ -46,20 +49,19 @@ describe("rankMentionItems", () => {
expect(rankMentionItems(roster, "dm", "al")).toEqual([])
})
- it("filters everyone in by prefix, drops here", () => {
+ it("filters everyone in by prefix", () => {
const ids = rankMentionItems(roster, "channel", "ev").map((i) => i.id)
expect(ids).toContain("everyone")
expect(ids).not.toContain("here")
})
- it("filters here in by prefix, drops everyone — and beats a member 'Heath' on prefix", () => {
+ it("no longer surfaces a 'here' virtual row for the 'he' prefix — only member 'Heath' matches", () => {
const items = rankMentionItems(roster, "channel", "he")
const ids = items.map((i) => i.id)
- expect(ids).toContain("here")
+ // @here is gone — the only "he" match is member Heath.
+ expect(ids).not.toContain("here")
expect(ids).not.toContain("everyone")
- // Heath also starts with "he" — should still appear, after the virtual row.
expect(ids).toContain("u4")
- expect(ids.indexOf("here")).toBeLessThan(ids.indexOf("u4"))
})
it("ranks member prefix matches before substring matches", () => {
@@ -85,9 +87,8 @@ describe("rankMentionItems", () => {
{ id: "m_alba", userId: "u_alba", name: "Alba", discriminator: "0003", avatar: "A", status: "online", sub: "", role: "owner" },
]
const items = rankMentionItems(memberRoster, "channel", "al")
- // Virtual items are gated by prefix on the query — "al" filters both out.
+ // The @everyone virtual item is gated by prefix on the query — "al" filters it out.
expect(items.some((i) => i.id === "everyone")).toBe(false)
- expect(items.some((i) => i.id === "here")).toBe(false)
const memberIds = items.filter((i) => i.kind === "member").map((i) => i.id)
expect(memberIds).toEqual(["m_alice", "m_alba"])
})
@@ -98,12 +99,11 @@ describe("rankMentionItems", () => {
{ id: "m_mal", userId: "u_mal", name: "Mallory", discriminator: "0002", avatar: "M", status: "online", sub: "", role: "member" },
]
const items = rankMentionItems(memberRoster, "channel", "")
- // Empty query — @everyone / @here lead, then all members (starts-with
- // branch fires for empty query too).
+ // Empty query — @everyone leads (the sole virtual item; @here removed),
+ // then all members (starts-with branch fires for empty query too).
expect(items[0].id).toBe("everyone")
- expect(items[1].id).toBe("here")
- expect(items[2].id).toBe("m_al")
- expect(items[3].id).toBe("m_mal")
+ expect(items[1].id).toBe("m_al")
+ expect(items[2].id).toBe("m_mal")
})
it("carries the stable userId separately from the membership row id — so the popover avatar seed matches every other surface", () => {
@@ -337,11 +337,12 @@ describe("detectMentionType", () => {
expect(detectMentionType("hi @everyone")).toBe("everyone")
})
- it("finds @here as a standalone token", () => {
- expect(detectMentionType("ping @here please")).toBe("here")
+ it("does NOT detect @here — it was removed as a broadcast trigger", () => {
+ // plans/remove-here-mention.md: @here is no longer a mention type.
+ expect(detectMentionType("ping @here please")).toBe(undefined)
})
- it("returns everyone when both occur (precedence)", () => {
+ it("still detects @everyone when @here also appears (here is inert now)", () => {
expect(detectMentionType("yo @here and @everyone")).toBe("everyone")
expect(detectMentionType("yo @everyone and @here")).toBe("everyone")
})
@@ -356,13 +357,12 @@ describe("detectMentionType", () => {
expect(detectMentionType("")).toBe(undefined)
})
- it("matches at start of string", () => {
+ it("matches @everyone at start of string", () => {
expect(detectMentionType("@everyone hello")).toBe("everyone")
- expect(detectMentionType("@here hello")).toBe("here")
})
- it("matches at end of string", () => {
- expect(detectMentionType("hello @here")).toBe("here")
+ it("matches @everyone at end of string", () => {
+ expect(detectMentionType("hello @everyone")).toBe("everyone")
})
it("respects punctuation as a boundary", () => {
@@ -372,8 +372,8 @@ describe("detectMentionType", () => {
it("does not treat a Unicode letter immediately after the token as a boundary — the #4 charset fix", () => {
// Before the fix, `ID` was ASCII-only (`[A-Za-z0-9_]`), so `ä` in
- // `@hereäx` was wrongly treated as a non-identifier boundary character,
- // making `@hereäx` look like a genuine standalone `@here` token.
- expect(detectMentionType("cc @hereäx")).toBe(undefined)
+ // `@everyoneäx` was wrongly treated as a non-identifier boundary character,
+ // making `@everyoneäx` look like a genuine standalone `@everyone` token.
+ expect(detectMentionType("cc @everyoneäx")).toBe(undefined)
})
})
diff --git a/src/web/src/lib/community/mention-extension.ts b/src/web/src/lib/community/mention-extension.ts
index 244e81474..aaa9dcd39 100644
--- a/src/web/src/lib/community/mention-extension.ts
+++ b/src/web/src/lib/community/mention-extension.ts
@@ -213,16 +213,17 @@ export function buildCommunityMentionExtension(opts: {
}
/**
- * Standalone-token scan for `@everyone` / `@here`. Used at send time to set
+ * Standalone-token scan for `@everyone`. Used at send time to set
* `mentionType` on the outgoing POST body so the server fans out to all
- * members. Precedence follows MENTION_TYPES order (everyone wins over here).
+ * members. Iterates `MENTION_TYPES` (now just `everyone`; `@here` was removed —
+ * see plans/remove-here-mention.md).
*/
export function detectMentionType(text: string): MentionType | undefined {
if (!text) return undefined
// Unicode-aware (`\p{L}\p{N}_-`) — must agree with the display-side regex
// in `chat-syntax-plugin.ts` and the server-side boundary check in
- // `community-mentions.ts`'s `ID_CHAR_RE`, or a name like `@hereäx` would
- // disagree across surfaces on whether the literal `@here` token is a
+ // `community-mentions.ts`'s `ID_CHAR_RE`, or a name like `@everyoneäx` would
+ // disagree across surfaces on whether the literal `@everyone` token is a
// genuine standalone mention vs. part of a longer word.
const ID = /[\p{L}\p{N}_-]/u
for (const name of MENTION_TYPES) {
diff --git a/src/web/src/lib/community/message-handler.test.ts b/src/web/src/lib/community/message-handler.test.ts
index 3231637f0..855bf323a 100644
--- a/src/web/src/lib/community/message-handler.test.ts
+++ b/src/web/src/lib/community/message-handler.test.ts
@@ -452,7 +452,7 @@ describe("createCommunityMessage — private-channel mention scoping (no auto-ad
})
})
- it("@everyone/@here is clamped to the audience (author excluded → only Cara)", async () => {
+ it("@everyone is clamped to the audience (author excluded → only Cara)", async () => {
mockGetMessage.mockResolvedValue(messageRow({ content: "@everyone hi", mentionType: "everyone" }))
await createCommunityMessage({
diff --git a/src/web/src/lib/community/message-handler.ts b/src/web/src/lib/community/message-handler.ts
index 194e611ff..4cdda7f46 100644
--- a/src/web/src/lib/community/message-handler.ts
+++ b/src/web/src/lib/community/message-handler.ts
@@ -475,13 +475,13 @@ export async function createCommunityMessage(params: {
// Candidate scoping: a message can only mention/notify users in the unit's
// OWN audience. For a private channel/post/thread that's the (climb-based)
// audience — a channel/post can only mention its own members; a thread climbs
- // to its parent channel's audience. `@everyone`/`@here` and reply targets are
+ // to its parent channel's audience. `@everyone` and reply targets are
// likewise clamped to that audience. There is NO invite-by-mention at the
// channel level (roster changes only via owner-add). Public/uncategorized
// channels are unchanged (whole-server candidates).
const mentionTargets = new Set<string>()
// Subset of `mentionTargets` that came from an EXPLICIT `@user` (not a mass
- // `@everyone`/`@here`). Only explicit mentions enroll someone as a permanent
+ // `@everyone`). Only explicit mentions enroll someone as a permanent
// thread participant — a broadcast `@everyone` notifies once but must not
// subscribe the whole channel/server to every future reply (that would defeat
// the notification dimension). See the thread-participation block below.
@@ -504,7 +504,7 @@ export async function createCommunityMessage(params: {
const members = audienceIds
? allMembers.filter((m) => audienceIds.has(m.userId))
: allMembers
- if (mentionType === "everyone" || mentionType === "here") {
+ if (mentionType === "everyone") {
for (const m of members) {
if (m.userId !== authorId) mentionTargets.add(m.userId)
}
@@ -518,7 +518,7 @@ export async function createCommunityMessage(params: {
explicitMentionTargets.add(id)
}
}
- } else if (mentionType === "everyone" || mentionType === "here") {
+ } else if (mentionType === "everyone") {
const userIds = audienceIds
? [...audienceIds]
: await queries.communityMember.listMemberUserIds(db, target.serverId)
@@ -559,7 +559,7 @@ export async function createCommunityMessage(params: {
{ userId: authorId, source: "spoke" },
]
// Only EXPLICIT `@user` mentions + reply targets enroll as participants. A
- // mass `@everyone`/`@here` is in `mentionTargets` (so everyone is notified
+ // mass `@everyone` is in `mentionTargets` (so everyone is notified
// once) but NOT in `explicitMentionTargets`, so it doesn't permanently
// subscribe the whole channel/server to the thread. `replyParticipants` is
// the pre-dedup snapshot so a reply still enrolls even under `@everyone`.
diff --git a/src/web/src/test/e2e-ui/15-mention-scope.spec.ts b/src/web/src/test/e2e-ui/15-mention-scope.spec.ts
index 3054a2fce..372d8121d 100644
--- a/src/web/src/test/e2e-ui/15-mention-scope.spec.ts
+++ b/src/web/src/test/e2e-ui/15-mention-scope.spec.ts
@@ -73,9 +73,11 @@ test.describe.serial("mentions — candidate scope", () => {
})
// Open the @-popup in the current composer and return the option locators. The
- // popup keys each row (members AND @everyone/@here) off its item id — a member
+ // popup keys each row (members AND @everyone) off its item id — a member
// row id is the server-member row id (identical in server + channel lists), a
- // virtual row id is the literal "everyone"/"here".
+ // virtual row id is the literal "everyone". (@here was removed —
+ // plans/remove-here-mention.md; `here` is exposed here only to assert its
+ // ABSENCE.)
async function openMentionPopup(page: import("@playwright/test").Page) {
const editable = composerEditable(page)
await editable.click()
@@ -108,7 +110,8 @@ test.describe.serial("mentions — candidate scope", () => {
await expect(opt.bob).toBeVisible({ timeout: 15_000 })
await expect(opt.carol).toBeVisible({ timeout: 15_000 })
await expect(opt.everyone).toBeVisible()
- await expect(opt.here).toBeVisible()
+ // @here was removed — its popup row must not appear (plans/remove-here-mention.md).
+ await expect(opt.here).toHaveCount(0)
// Self (alice) is filtered out of the popup at the composer — keyed by her
// server-member row id (the same id the popup options use), not her userId.
await expect(page.getByTestId(tid.mentionOption(alice.id))).toHaveCount(0)
@@ -135,7 +138,8 @@ test.describe.serial("mentions — candidate scope", () => {
const opt = await openMentionPopup(page)
await expect(opt.bob).toBeVisible({ timeout: 15_000 })
await expect(opt.everyone).toBeVisible()
- await expect(opt.here).toBeVisible()
+ // @here was removed — its popup row must not appear (plans/remove-here-mention.md).
+ await expect(opt.here).toHaveCount(0)
// Carol is a server member but NOT in this private channel's audience.
await expect(opt.carol).toHaveCount(0)
})