Skip to content

Commit b1fabce

Browse files
feat(composer): index Jira, GitHub issues, and Figma mentions
Restore MCP-backed Jira/Figma syncers, GitHub issue indexing, @figma: browse/settings, and the matching composer triggers so mentions cover designs and trackers alongside PRs and threads. Co-authored-by: Cursor <[email protected]>
1 parent 9dc8702 commit b1fabce

58 files changed

Lines changed: 4891 additions & 152 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/mobile/src/features/threads/ComposerCommandPopover.tsx‎

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,37 @@ export type ComposerCommandItem =
4343
readonly label: string;
4444
readonly description: string;
4545
}
46+
| {
47+
readonly id: string;
48+
readonly type: "jira";
49+
readonly key: string;
50+
readonly url: string;
51+
readonly summary: string;
52+
readonly label: string;
53+
readonly description: string;
54+
}
55+
| {
56+
readonly id: string;
57+
readonly type: "figma";
58+
readonly fileKey: string;
59+
readonly url: string;
60+
readonly name: string;
61+
readonly hasThumbnail: boolean;
62+
readonly label: string;
63+
readonly description: string;
64+
readonly thumbnailUri?: string;
65+
}
66+
| {
67+
readonly id: string;
68+
readonly type: "issue";
69+
readonly number: number;
70+
readonly title: string;
71+
readonly url: string;
72+
readonly repository: string;
73+
readonly state: "open" | "closed";
74+
readonly label: string;
75+
readonly description: string;
76+
}
4677
| {
4778
readonly id: string;
4879
readonly type: "environment";
@@ -121,6 +152,12 @@ function itemIcon(item: ComposerCommandItem): AppSymbolName | null {
121152
return null;
122153
case "thread":
123154
return "text.bubble";
155+
case "jira":
156+
return "tag";
157+
case "figma":
158+
return "photo";
159+
case "issue":
160+
return "exclamationmark.circle";
124161
case "environment":
125162
return ENVIRONMENT_MACHINE_SYMBOLS[item.machine];
126163
}
@@ -130,6 +167,16 @@ function groupLabel(triggerKind: ComposerTriggerKind | null): string | null {
130167
switch (triggerKind) {
131168
case "pull-request":
132169
return "Pull requests";
170+
case "hash":
171+
return "Pull requests and issues";
172+
case "jira":
173+
return "Jira issues";
174+
case "figma":
175+
return "Figma designs";
176+
case "issue":
177+
return "GitHub issues";
178+
case "thread":
179+
return "Threads";
133180
case "slash-command":
134181
return "Commands";
135182
case "skill":
@@ -143,11 +190,33 @@ function groupLabel(triggerKind: ComposerTriggerKind | null): string | null {
143190

144191
function emptyText(triggerKind: ComposerTriggerKind | null, isLoading: boolean): string {
145192
if (isLoading) {
146-
return triggerKind === "path" ? "Searching files…" : "Loading…";
193+
return triggerKind === "path"
194+
? "Searching files…"
195+
: triggerKind === "hash"
196+
? "Finding pull requests and issues…"
197+
: triggerKind === "jira"
198+
? "Finding Jira issues…"
199+
: triggerKind === "figma"
200+
? "Finding Figma designs…"
201+
: triggerKind === "issue"
202+
? "Finding GitHub issues…"
203+
: triggerKind === "thread"
204+
? "Finding threads…"
205+
: "Loading…";
147206
}
148207
switch (triggerKind) {
149208
case "pull-request":
150209
return "No matching pull requests.";
210+
case "hash":
211+
return "No matching pull requests or issues.";
212+
case "jira":
213+
return "No matching Jira issues.";
214+
case "figma":
215+
return "No matching Figma designs.";
216+
case "issue":
217+
return "No matching GitHub issues.";
218+
case "thread":
219+
return "No matching threads.";
151220
case "path":
152221
return "No matching files or folders.";
153222
case "skill":

‎apps/mobile/src/features/threads/ThreadComposer.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,12 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps
832832
{props.draftControls}
833833
{!isSubmissionLocked &&
834834
composerMenu.trigger &&
835-
(composerMenu.items.length > 0 || composerMenu.trigger.kind === "pull-request") ? (
835+
(composerMenu.items.length > 0 ||
836+
composerMenu.trigger.kind === "pull-request" ||
837+
composerMenu.trigger.kind === "hash" ||
838+
composerMenu.trigger.kind === "jira" ||
839+
composerMenu.trigger.kind === "issue" ||
840+
composerMenu.trigger.kind === "thread") ? (
836841
<ComposerPopoverAnchor>
837842
<ComposerCommandPopover
838843
items={composerMenu.items}

‎apps/mobile/src/features/threads/use-composer-command-menu.test.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ vi.mock("react-native", () => ({ Alert: { alert: vi.fn() } }));
66
vi.mock("../../state/queries", () => ({
77
useComposerPathSearch: () => ({ entries: [], isPending: false }),
88
useComposerPullRequestSearch: () => ({ entries: [], isPending: false, error: null }),
9+
useDebouncedValue: <A>(value: A) => value,
10+
}));
11+
vi.mock("../../state/query", () => ({
12+
useEnvironmentQuery: () => ({ data: null, error: null, isPending: false }),
13+
}));
14+
vi.mock("../../state/pull-requests", () => ({
15+
mentionIndexEnvironment: { search: () => null },
916
}));
1017
vi.mock("../../state/use-composer-drafts", () => ({
1118
getComposerDraftSnapshot: vi.fn(),

0 commit comments

Comments
 (0)