Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(editor): allow spaces in mention search (#5980)

Multica Evea1bd3ca9b2e8
diff --git a/packages/views/editor/extensions/mention-suggestion.test.tsx b/packages/views/editor/extensions/mention-suggestion.test.tsx
index 83ad7935a5..4e469303fb 100644
--- a/packages/views/editor/extensions/mention-suggestion.test.tsx
+++ b/packages/views/editor/extensions/mention-suggestion.test.tsx
@@ -136,6 +136,25 @@ describe("createMentionSuggestion", () => {
Element.prototype.scrollIntoView = vi.fn();
});
+ it("keeps the mention query active across spaces for multi-word search", () => {
+ const qc = fakeQc({
+ issues: [
+ {
+ id: "i-login",
+ identifier: "MUL-1",
+ title: "Login redirect bug",
+ status: "todo",
+ },
+ ],
+ });
+ const config = createMentionSuggestion(qc);
+
+ expect(config.allowSpaces).toBe(true);
+ expect(config.items!(itemArgs("login redirect"))).toEqual([
+ expect.objectContaining({ id: "i-login", type: "issue" }),
+ ]);
+ });
+
it("returns members and agents synchronously without waiting for the server search", () => {
const qc = fakeQc({
members: [{ user_id: "u1", name: "Alice", role: "member" }],
diff --git a/packages/views/editor/extensions/mention-suggestion.tsx b/packages/views/editor/extensions/mention-suggestion.tsx
index 0edcfa45fa..4bf8d24a9d 100644
--- a/packages/views/editor/extensions/mention-suggestion.tsx
+++ b/packages/views/editor/extensions/mention-suggestion.tsx
@@ -616,6 +616,7 @@ export function createMentionSuggestion(
return {
pluginKey,
+ allowSpaces: true,
items: ({ query }) => {
if (options.mode === "context") {
const normalizedQuery = query.trim();