Skip to content

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

Go

refactor(core): remove 13 ApiClient methods with no callers (MUL-9907) (#11237)

Jiayuan Zhang0353406b1402
diff --git a/packages/core/api/client.test.ts b/packages/core/api/client.test.ts
index 5ceca6dc2e..c103da0ce6 100644
--- a/packages/core/api/client.test.ts
+++ b/packages/core/api/client.test.ts
@@ -3601,16 +3601,6 @@ describe("created-by filter compatibility", () => {
});
-describe("grouped created-by compatibility", () => {
- it("retries a legacy server with literal creator_id", async () => {
- const fetchMock = vi.fn(async (_url: string) => Response.json({ groups: [] }));
- vi.stubGlobal("fetch", fetchMock);
- await new ApiClient("https://api.example.test").listGroupedIssues({ group_by: "assignee", created_by_user_id: "me" });
- expect(fetchMock).toHaveBeenCalledTimes(2);
- expect(new URL(fetchMock.mock.calls[1]![0]).searchParams.get("creator_id")).toBe("me");
- });
-});
-
describe("ApiClient request observer", () => {
afterEach(() => setApiRequestObserver(null));
diff --git a/packages/core/api/client.ts b/packages/core/api/client.ts
index ebdbe99bf6..cb6a3bd4d2 100644
--- a/packages/core/api/client.ts
+++ b/packages/core/api/client.ts
@@ -45,7 +45,6 @@ import type {
BatchIssuePropertyOps,
BatchUpdateIssuesResponse,
IssueDuplicates,
- GroupedIssuesResponse,
ListIssuesResponse,
SearchIssuesResponse,
SearchProjectsResponse,
@@ -56,7 +55,6 @@ import type {
CreateMemberRequest,
UpdateMemberRequest,
ListIssuesParams,
- ListGroupedIssuesParams,
IssueTableFacetsRequest,
IssueTableFacetsResponse,
IssueTableGroupsRequest,
@@ -112,7 +110,6 @@ import type {
CreatePersonalAccessTokenResponse,
RuntimeUsage,
IssueUsageSummary,
- RuntimeHourlyActivity,
RuntimeUsageByAgent,
RuntimeUsageByHour,
DashboardUsageDaily,
@@ -245,7 +242,6 @@ import type {
AppsOverview,
AppCatalogResponse,
AppRule,
- AppTool,
AppToolCall,
IssueAppCall,
AppRequestList,
@@ -379,7 +375,6 @@ import {
EMPTY_CLOUD_RUNTIME_NODE,
EMPTY_CLOUD_RUNTIME_NODE_LIST,
EMPTY_AGENT_BUILDER_SESSION,
- EMPTY_GROUPED_ISSUES_RESPONSE,
EMPTY_ISSUE_TABLE_FACETS_RESPONSE,
EMPTY_ISSUE_TABLE_GROUPS_RESPONSE,
EMPTY_ISSUE_TABLE_ROWS_RESPONSE,
@@ -402,7 +397,6 @@ import {
type RefreshSessionResponse,
RefreshSessionResponseSchema,
EMPTY_REFRESH_SESSION_RESPONSE,
- GroupedIssuesResponseSchema,
IssueTableFacetsResponseSchema,
IssueTableGroupsResponseSchema,
IssueTableRowsResponseSchema,
@@ -420,7 +414,6 @@ import {
SourceContextPreviewSchema,
CommentSubIssueTaskResponseSchema,
ListWebhookDeliveriesResponseSchema,
- RuntimeHourlyActivityListSchema,
RuntimeUsageByAgentListSchema,
RuntimeUsageByHourListSchema,
RuntimeUsageListSchema,
@@ -527,7 +520,6 @@ import {
AppRequestSchema,
AppRulesResponseSchema,
AppSettingsResponseSchema,
- AppToolsResponseSchema,
AppsOverviewSchema,
EMPTY_APP_CATALOG,
EMPTY_APPS_OVERVIEW,
@@ -566,7 +558,6 @@ import {
IssuePropertiesResponseSchema,
QuickActionSchema,
ListQuickActionsResponseSchema,
- QuickActionRenderSchema,
EMPTY_QUICK_ACTION,
EMPTY_LIST_QUICK_ACTIONS_RESPONSE,
CommentSchema,
@@ -1629,52 +1620,6 @@ export class ApiClient {
});
}
- async listGroupedIssues(params: ListGroupedIssuesParams): Promise<GroupedIssuesResponse> {
- const search = new URLSearchParams({ group_by: params.group_by });
- if (params.limit) search.set("limit", String(params.limit));
- if (params.offset) search.set("offset", String(params.offset));
- if (params.workspace_id) search.set("workspace_id", params.workspace_id);
- if (params.statuses?.length) search.set("statuses", params.statuses.join(","));
- if (params.priorities?.length) search.set("priorities", params.priorities.join(","));
- if (params.assignee_types?.length) search.set("assignee_types", params.assignee_types.join(","));
- if (params.assignee_id) search.set("assignee_id", params.assignee_id);
- if (params.assignee_ids?.length) search.set("assignee_ids", params.assignee_ids.join(","));
- if (params.creator_id) search.set("creator_id", params.creator_id);
- if (params.created_by_user_id) search.set("created_by_user_id", params.created_by_user_id);
- if (params.project_id) search.set("project_id", params.project_id);
- if (params.involves_user_id) search.set("involves_user_id", params.involves_user_id);
- if (params.metadata && Object.keys(params.metadata).length > 0) {
- search.set("metadata", JSON.stringify(params.metadata));
- }
- if (params.properties && Object.keys(params.properties).length > 0) {
- search.set("properties", JSON.stringify(params.properties));
- }
- if (params.assignee_filters?.length) {
- search.set("assignee_filters", params.assignee_filters.map((f) => `${f.type}:${f.id}`).join(","));
- }
- if (params.include_no_assignee) search.set("include_no_assignee", "true");
- if (params.creator_filters?.length) {
- search.set("creator_filters", params.creator_filters.map((f) => `${f.type}:${f.id}`).join(","));
- }
- if (params.project_ids?.length) search.set("project_ids", params.project_ids.join(","));
- if (params.include_no_project) search.set("include_no_project", "true");
- if (params.label_ids?.length) search.set("label_ids", params.label_ids.join(","));
- if (params.group_assignee_type) search.set("group_assignee_type", params.group_assignee_type);
- if (params.group_assignee_id) search.set("group_assignee_id", params.group_assignee_id);
- if (params.date_field) search.set("date_field", params.date_field);
- if (params.date_start) search.set("date_start", params.date_start);
- if (params.date_end) search.set("date_end", params.date_end);
- if (params.sort_by) search.set("sort", params.sort_by);
- if (params.sort_direction) search.set("direction", params.sort_direction);
- const raw = await this.fetch<unknown>(`/api/issues/grouped?${search}`);
- if (params.created_by_user_id && (!raw || typeof raw !== "object" || !("created_by_user_id" in raw) || raw.created_by_user_id !== params.created_by_user_id)) {
- return this.listGroupedIssues({ ...params, created_by_user_id: undefined, creator_id: params.creator_id ?? params.created_by_user_id });
- }
- return parseWithFallback(raw, GroupedIssuesResponseSchema, EMPTY_GROUPED_ISSUES_RESPONSE, {
- endpoint: "GET /api/issues/grouped",
- });
- }
-
async listIssueTableGroups(params: IssueTableGroupsRequest): Promise<IssueTableGroupsResponse> {
const raw = await this.fetch<unknown>("/api/issues/table/groups", {
method: "POST",
@@ -3084,18 +3029,6 @@ export class ApiClient {
);
}
- async getRuntimeProfile(
- workspaceId: string,
- profileId: string,
- ): Promise<RuntimeProfile> {
- const result = await this.fetch<RuntimeProfile>(
- `/api/workspaces/${workspaceId}/runtime-profiles/${profileId}`,
- );
- return parseWithFallback(result, RuntimeProfileSchema, result, {
- endpoint: "runtimeProfile",
- });
- }
-
async createRuntimeProfile(
workspaceId: string,
body: CreateRuntimeProfileRequest,
@@ -3167,25 +3100,6 @@ export class ApiClient {
});
}
- async getRuntimeTaskActivity(
- runtimeId: string,
- params?: { tz?: string },
- ): Promise<RuntimeHourlyActivity[]> {
- // Hour-of-day heatmap follows the viewer's tz, like the other reports on
- // this page. Pass the viewer's IANA zone so the server buckets correctly.
- const search = new URLSearchParams();
- if (params?.tz) search.set("tz", params.tz);
- const raw = await this.fetch<unknown>(
- `/api/runtimes/${runtimeId}/activity?${search}`,
- );
- return parseWithFallback<RuntimeHourlyActivity[]>(
- raw,
- RuntimeHourlyActivityListSchema,
- [],
- { endpoint: "GET /api/runtimes/:id/activity" },
- );
- }
-
async getRuntimeUsageByAgent(
runtimeId: string,
params?: { days?: number; tz?: string },
@@ -3488,10 +3402,6 @@ export class ApiClient {
return this.fetch(`/api/agent-run-counts`);
}
- async getActiveTasksForIssue(issueId: string): Promise<{ tasks: AgentTask[] }> {
- return this.fetch(`/api/issues/${issueId}/active-task`);
- }
-
async listTaskMessages(taskId: string): Promise<TaskMessagePayload[]> {
const raw = await this.fetch<unknown>(`/api/tasks/${taskId}/messages`);
return parseWithFallback<TaskMessagePayload[]>(raw, TaskMessageListSchema, [], {
@@ -3821,10 +3731,6 @@ export class ApiClient {
return parseWithFallback(raw, WorkspacePinnedSchema, { pinned_at: null }, { endpoint: "PUT /api/workspaces/{id}/pin" });
}
- async getWorkspace(id: string): Promise<Workspace> {
- return this.fetch(`/api/workspaces/${id}`);
- }
-
async createWorkspace(data: { name: string; slug: string; description?: string; context?: string; issue_prefix?: string }): Promise<Workspace> {
return this.fetch("/api/workspaces", {
method: "POST",
@@ -4425,10 +4331,6 @@ export class ApiClient {
});
}
- async listAgentSkills(agentId: string): Promise<SkillSummary[]> {
- return this.fetch(`/api/agents/${agentId}/skills`);
- }
-
async setAgentSkills(agentId: string, data: SetAgentSkillsRequest): Promise<void> {
await this.fetch(`/api/agents/${agentId}/skills`, {
method: "PUT",
@@ -4887,10 +4789,6 @@ export class ApiClient {
});
}
- async deleteAttachment(id: string): Promise<void> {
- await this.fetch(`/api/attachments/${id}`, { method: "DELETE" });
- }
-
// Fetches the raw bytes of a text-previewable attachment.
//
// The endpoint sidesteps CloudFront CORS (not configured on the CDN) and
@@ -5185,7 +5083,7 @@ export class ApiClient {
* Saves a workflow edit. When the edit removes statuses that issues of the
* workflow's projects still use, the server answers 409
* `workflow_status_mapping_required` with a plan; resend with
- * `status_mapping`. `dryRunIssueWorkflowUpdate` fetches that plan up front.
+ * `status_mapping`.
*/
async updateIssueWorkflow(id: string, data: IssueWorkflowWriteRequest): Promise<IssueWorkflow> {
const raw = await this.fetch<unknown>(`/api/issue-workflows/${id}`, {
@@ -5197,16 +5095,6 @@ export class ApiClient {
});
}
- async dryRunIssueWorkflowUpdate(id: string, data: IssueWorkflowWriteRequest): Promise<IssueWorkflowDryRunResponse> {
- const raw = await this.fetch<unknown>(`/api/issue-workflows/${id}`, {
- method: "PATCH",
- body: JSON.stringify({ ...data, dry_run: true }),
- });
- return parseWithFallback(raw, IssueWorkflowDryRunResponseSchema, EMPTY_ISSUE_WORKFLOW_DRY_RUN, {
- endpoint: "PATCH /api/issue-workflows/{id} (dry run)",
- });
- }
-
async deleteIssueWorkflow(id: string): Promise<void> {
await this.fetch(`/api/issue-workflows/${id}`, { method: "DELETE" });
}
@@ -5450,23 +5338,6 @@ export class ApiClient {
});
}
- /**
- * What a quick action WOULD post, with server-side validation but no send.
- * Retained for callers that resolve drafts over HTTP; the comment composer
- * builds its draft synchronously from the quick-action catalog.
- * Returns "" when the response cannot be read — callers must treat an empty
- * string as "insert nothing" rather than clearing the composer.
- */
- async renderQuickAction(issueId: string, quickActionId: string): Promise<string> {
- const raw = await this.fetch<unknown>(`/api/issues/${issueId}/quick-actions/${quickActionId}/render`, {
- method: "POST",
- });
- const parsed = parseWithFallback(raw, QuickActionRenderSchema, { content: "" }, {
- endpoint: "POST /api/issues/{id}/quick-actions/{quickActionId}/render",
- });
- return parsed.content;
- }
-
async createProperty(data: CreatePropertyRequest): Promise<IssueProperty> {
const raw = await this.fetch<unknown>(`/api/properties`, {
method: "POST",
@@ -6213,15 +6084,6 @@ export class ApiClient {
return this.fetch(`/api/integrations/composio/connections`);
}
- /** Starts a hosted Composio connect flow for a toolkit and returns the
- * redirect URL the browser should be sent to. */
- async beginComposioConnect(toolkitSlug: string): Promise<ComposioConnectInitResponse> {
- return this.fetch(`/api/integrations/composio/connect/init`, {
- method: "POST",
- body: JSON.stringify({ toolkit_slug: toolkitSlug }),
- });
- }
-
/** Disconnects a Composio connection the caller owns. */
async deleteComposioConnection(connectionId: string): Promise<void> {
await this.fetch(`/api/integrations/composio/connections/${connectionId}`, {
@@ -6303,29 +6165,11 @@ export class ApiClient {
return parseWithFallback(raw, AppSettingsResponseSchema, null, { endpoint: "PUT /api/apps/settings" });
}
- async listAppTools(toolkitSlug: string): Promise<{ tools: AppTool[] }> {
- const raw = await this.fetch<unknown>(`/api/apps/tools?toolkit_slug=${encodeURIComponent(toolkitSlug)}`);
- return parseWithFallback(raw, AppToolsResponseSchema, { tools: [] }, { endpoint: "GET /api/apps/tools" });
- }
-
- /** Corrects one tool's class; `null` restores the automatic class. */
- async updateAppToolClass(toolkitSlug: string, toolSlug: string, actionClass: AppActionClass | null): Promise<void> {
- await this.fetch(`/api/apps/tools/class`, {
- method: "PUT",
- body: JSON.stringify({ toolkit_slug: toolkitSlug, tool_slug: toolSlug, action_class: actionClass ?? "" }),
- });
- }
-
async listIssueAppCalls(issueId: string): Promise<{ calls: IssueAppCall[] }> {
const raw = await this.fetch<unknown>(`/api/app-calls?issue_id=${encodeURIComponent(issueId)}`);
return parseWithFallback(raw, IssueAppCallsResponseSchema, { calls: [] }, { endpoint: "GET /api/app-calls" });
}
- async getAppRules(toolkitSlug: string, scope: AppAccountScope): Promise<{ rules: AppRule[] }> {
- const raw = await this.fetch<unknown>(`/api/apps/rules?toolkit_slug=${encodeURIComponent(toolkitSlug)}&scope=${scope}`);
- return parseWithFallback(raw, AppRulesResponseSchema, { rules: [] }, { endpoint: "GET /api/apps/rules" });
- }
-
async updateAppRules(
toolkitSlug: string,
scope: AppAccountScope,
diff --git a/packages/core/api/connected-apps.test.ts b/packages/core/api/connected-apps.test.ts
index 9136e3d697..957b97a6dc 100644
--- a/packages/core/api/connected-apps.test.ts
+++ b/packages/core/api/connected-apps.test.ts
@@ -116,20 +116,13 @@ describe("Connected Apps API parsing", () => {
expect(JSON.parse(String(ok.fetchMock.mock.calls[0]?.[1]?.body))).toEqual({ toolkit_slug: "gmail", return_to: "/ws/issues/1" });
});
- it("parses tools and issue calls, dropping malformed pages", async () => {
+ it("parses issue calls, dropping malformed pages", async () => {
let { client } = respondWith({
- tools: [{ slug: "GMAIL_SEND_EMAIL", name: "Send", auto_class: "send", class: "unknown", overridden: true }],
- });
- expect((await client.listAppTools("gmail")).tools[0]).toMatchObject({ class: "send", description: "" });
- ({ client } = respondWith({ tools: null }));
- expect(await client.listAppTools("gmail")).toEqual({ tools: [] });
-
- ({ client } = respondWith({
calls: [{
id: "c1", agent_id: "a1", account_scope: "team", toolkit_slug: "gmail", tool_slug: "GMAIL_SEND_EMAIL",
action_class: "send", outcome: "rate_limited", created_at: "t",
}],
- }));
+ });
expect((await client.listIssueAppCalls("i1")).calls[0]).toMatchObject({ task_id: null, error: null, outcome: "rate_limited" });
({ client } = respondWith("oops"));
expect(await client.listIssueAppCalls("i1")).toEqual({ calls: [] });
diff --git a/packages/core/api/schema.test.ts b/packages/core/api/schema.test.ts
index b6942ed102..d50ad02154 100644
--- a/packages/core/api/schema.test.ts
+++ b/packages/core/api/schema.test.ts
@@ -1067,15 +1067,6 @@ describe("ApiClient schema fallback", () => {
});
});
- describe("listGroupedIssues", () => {
- it("falls back to empty groups when the response is malformed", async () => {
- stubFetchJson({ groups: "not-an-array" });
- const client = new ApiClient("https://api.example.test");
- const res = await client.listGroupedIssues({ group_by: "assignee" });
- expect(res).toEqual({ groups: [] });
- });
- });
-
describe("listComments", () => {
it("returns [] when the response is not an array", async () => {
stubFetchJson({ wrong: "shape" });
diff --git a/packages/core/api/schemas.test.ts b/packages/core/api/schemas.test.ts
index eb913b219e..264b31b1c3 100644
--- a/packages/core/api/schemas.test.ts
+++ b/packages/core/api/schemas.test.ts
@@ -54,7 +54,6 @@ import {
MALFORMED_RUNTIME_MODEL_LIST_REQUEST,
RuntimeModelListRequestSchema,
SearchProjectsResponseSchema,
- RuntimeHourlyActivityListSchema,
RuntimeUsageByAgentListSchema,
RuntimeUsageByHourListSchema,
RuntimeUsageListSchema,
@@ -1288,7 +1287,6 @@ describe("dashboard + runtime usage schema drift", () => {
it("coerces missing fields on every runtime usage schema", () => {
expect(RuntimeUsageListSchema.parse([{ date: "2026-05-19" }])[0]?.input_tokens).toBe(0);
- expect(RuntimeHourlyActivityListSchema.parse([{ hour: 9 }])[0]?.count).toBe(0);
expect(RuntimeUsageByAgentListSchema.parse([{ model: "x" }])[0]?.agent_id).toBe("");
expect(RuntimeUsageByHourListSchema.parse([{ hour: 9 }])[0]?.model).toBe("");
});
diff --git a/packages/core/api/schemas.ts b/packages/core/api/schemas.ts
index b41683072a..a098fcc35f 100644
--- a/packages/core/api/schemas.ts
+++ b/packages/core/api/schemas.ts
@@ -69,7 +69,6 @@ import type {
TelegramInstallation,
ListTelegramInstallationsResponse,
RedeemTelegramBindingTokenResponse,
- GroupedIssuesResponse,
GitHubConnectResponse,
IssuePullRequestsResponse,
IssueEnvironmentsResponse,
@@ -1002,10 +1001,6 @@ export const EMPTY_LIST_QUICK_ACTIONS_RESPONSE: ListQuickActionsResponse = {
quick_actions: [],
};
-export const QuickActionRenderSchema = z.object({
- content: z.string().default(""),
-}).loose();
-
export const ListPropertiesResponseSchema = z.object({
properties: z.array(IssuePropertySchema).default([]),
total: z.number().default(0),
@@ -2032,22 +2027,6 @@ export const SearchIndexChangesSchema = z.object({
has_more: z.boolean(),
}).loose();
-const IssueAssigneeGroupSchema = z.object({
- id: z.string(),
- assignee_type: z.string().nullable(),
- assignee_id: z.string().nullable(),
- issues: z.array(IssueSchema).default([]),
- total: z.number().default(0),
-}).loose();
-
-export const GroupedIssuesResponseSchema = z.object({
- groups: z.array(IssueAssigneeGroupSchema).default([]),
-}).loose();
-
-export const EMPTY_GROUPED_ISSUES_RESPONSE: GroupedIssuesResponse = {
- groups: [],
-};
-
const IssueTableActorRefSchema = z.object({
// Server-driven enums stay open so installed desktop clients survive a
// backend that introduces another actor kind.
@@ -2359,13 +2338,6 @@ const RuntimeUsageSchema = z.object({
export const RuntimeUsageListSchema = z.array(RuntimeUsageSchema);
-const RuntimeHourlyActivitySchema = z.object({
- hour: z.number().default(0),
- count: z.number().default(0),
-}).loose();
-
-export const RuntimeHourlyActivityListSchema = z.array(RuntimeHourlyActivitySchema);
-
const RuntimeUsageByAgentSchema = z.object({
agent_id: z.string().default(""),
provider: z.string().default(""),
@@ -5161,17 +5133,6 @@ export const AppRequestListSchema = z.object({
next_before: appNullableString,
}).loose();
-export const AppToolsResponseSchema = z.object({
- tools: z.array(z.object({
- slug: z.string(),
- name: z.string().default(""),
- description: z.string().default(""),
- auto_class: AppActionClassSchema,
- class: AppActionClassSchema,
- overridden: z.boolean().default(false).catch(false),
- }).loose()).default([]),
-}).loose();
-
export const IssueAppCallsResponseSchema = z.object({
calls: z.array(z.object({
id: z.string(),
diff --git a/packages/core/types/agent.ts b/packages/core/types/agent.ts
index 0fa36cbea9..d496babc8d 100644
--- a/packages/core/types/agent.ts
+++ b/packages/core/types/agent.ts
@@ -1066,11 +1066,6 @@ export interface RuntimeUsage {
uncosted_cache_write_tokens?: number;
}
-export interface RuntimeHourlyActivity {
- hour: number;
- count: number;
-}
-
// Subscription rate limits of the account a runtime's agent CLI runs under
// (`GET /api/runtimes/:id/rate-limits`, MUL-9427), as the CLI last reported
// them during a task. Window kinds and statuses fall back to "other" / ""
diff --git a/packages/core/types/api.ts b/packages/core/types/api.ts
index a92f9b6960..9eb476127d 100644
--- a/packages/core/types/api.ts
+++ b/packages/core/types/api.ts
@@ -337,11 +337,6 @@ export interface IssueAssigneeGroup {
total: number;
}
-/** Raw backend response shape for `GET /api/issues/grouped?group_by=assignee`. */
-export interface GroupedIssuesResponse {
- groups: IssueAssigneeGroup[];
-}
-
// Server-authoritative Table query contract. Membership, grouping and counts
// are evaluated against the complete result set; the browser only owns view
// state such as collapsed groups/parents.
diff --git a/packages/core/types/connected-apps.ts b/packages/core/types/connected-apps.ts
index 222230205f..fbbc776002 100644
--- a/packages/core/types/connected-apps.ts
+++ b/packages/core/types/connected-apps.ts
@@ -86,16 +86,6 @@ export interface AppCatalogEntry {
allowed?: boolean;
}
-/** One tool of an app and how this workspace classifies it. */
-export interface AppTool {
- slug: string;
- name: string;
- description: string;
- auto_class: AppActionClass;
- class: AppActionClass;
- overridden: boolean;
-}
-
export type AppCallOutcome =
| "ok"
| "error"
diff --git a/packages/core/types/index.ts b/packages/core/types/index.ts
index 72d59db195..81a2cc46f1 100644
--- a/packages/core/types/index.ts
+++ b/packages/core/types/index.ts
@@ -84,7 +84,6 @@ export type {
UpdateSkillRequest,
SetAgentSkillsRequest,
RuntimeUsage,
- RuntimeHourlyActivity,
RuntimeRateLimitWindowKind,
RuntimeRateLimitStatus,
RuntimeRateLimitWindow,
@@ -304,7 +303,6 @@ export type {
AppCatalogEntry,
AppCatalogResponse,
AppRule,
- AppTool,
AppToolCall,
AppCallOutcome,
IssueAppCall,
diff --git a/packages/views/apps/components/app-account-dialog.test.tsx b/packages/views/apps/components/app-account-dialog.test.tsx
index 2a9dbb5f2e..592cd1e6e2 100644
--- a/packages/views/apps/components/app-account-dialog.test.tsx
+++ b/packages/views/apps/components/app-account-dialog.test.tsx
@@ -8,7 +8,7 @@ import enSettings from "../../locales/en/settings.json";
import { AppAccountDialog } from "./app-account-dialog";
vi.mock("@multica/core/api", () => ({ api: {
- getAppRules: vi.fn(), listAppTools: vi.fn(), listAppActivity: vi.fn(),
+ listAppActivity: vi.fn(),
} }));
vi.mock("@multica/core/hooks", () => ({ useWorkspaceId: () => "ws-1" }));
@@ -17,9 +17,7 @@ afterEach(() => {
vi.clearAllMocks();
});
-it("opens account activity directly without fetching or showing permission settings", async () => {
- vi.mocked(api.getAppRules).mockResolvedValue({ rules: [] });
- vi.mocked(api.listAppTools).mockResolvedValue({ tools: [] });
+it("opens account activity directly without showing permission settings", async () => {
vi.mocked(api.listAppActivity).mockResolvedValue({ calls: [{
id: "call-1", agent_id: "a1", issue_id: null, chat_session_id: null, triggered_by: null,
tool_slug: "GMAIL_SEND_EMAIL", action_class: "send", outcome: "ok", error: null,
@@ -35,8 +33,6 @@ it("opens account activity directly without fetching or showing permission setti
);
expect(await screen.findByText("GMAIL_SEND_EMAIL")).toBeVisible();
expect(api.listAppActivity).toHaveBeenCalledWith("gmail", "personal");
- expect(api.getAppRules).not.toHaveBeenCalled();
- expect(api.listAppTools).not.toHaveBeenCalled();
expect(screen.queryByRole("tab")).not.toBeInTheDocument();
expect(screen.queryByRole("combobox")).not.toBeInTheDocument();
});
diff --git a/packages/views/editor/content-editor-quick-actions.test.tsx b/packages/views/editor/content-editor-quick-actions.test.tsx
index 2543c8f978..72b2190578 100644
--- a/packages/views/editor/content-editor-quick-actions.test.tsx
+++ b/packages/views/editor/content-editor-quick-actions.test.tsx
@@ -16,7 +16,6 @@ import { CommentInput } from "../issues/components/comment-input";
import { ReplyInput } from "../issues/components/reply-input";
const listQuickActions = vi.hoisted(() => vi.fn());
-const renderQuickAction = vi.hoisted(() => vi.fn());
const getIssue = vi.hoisted(() => vi.fn());
const listAgents = vi.hoisted(() => vi.fn());
const listSquads = vi.hoisted(() => vi.fn());
@@ -35,7 +34,7 @@ vi.mock("@multica/core/auth", () => ({
vi.mock("@multica/core/api", async (importOriginal) => {
const actual = await importOriginal<typeof import("@multica/core/api")>();
- return { ...actual, api: { ...actual.api, getBaseUrl: () => "https://api.example.test", listQuickActions, renderQuickAction, getIssue, listAgents, listSquads, listMembers, previewCommentTriggers } };
+ return { ...actual, api: { ...actual.api, getBaseUrl: () => "https://api.example.test", listQuickActions, getIssue, listAgents, listSquads, listMembers, previewCommentTriggers } };
});
vi.mock("@multica/core/paths", async (importOriginal) => ({
...(await importOriginal<typeof import("@multica/core/paths")>()),
@@ -77,7 +76,6 @@ function makeAgent(id: string, skills: Agent["skills"]): Agent {
beforeEach(() => {
listQuickActions.mockReset().mockResolvedValue({ quick_actions: [] });
- renderQuickAction.mockReset().mockResolvedValue("Rendered feedback");
getIssue.mockReset().mockResolvedValue(makeIssue());
listAgents.mockReset().mockResolvedValue([]);
listSquads.mockReset().mockResolvedValue([]);
@@ -253,7 +251,6 @@ describe("comment quick-action catalog updates in the real editor", () => {
target_name: targetType ? "Review Team" : undefined,
};
listQuickActions.mockResolvedValue({ quick_actions: [configured] });
- renderQuickAction.mockReturnValue(new Promise(() => {}));
const { editor, dom } = await mount([configured]);
await type(editor, "/delayed");
await waitFor(() => expect(menuItem()).toBeVisible());
@@ -261,7 +258,6 @@ describe("comment quick-action catalog updates in the real editor", () => {
fireEvent.keyDown(dom, { key: "Enter" });
expect(editor.getText()).toBe(targetType ? "@Review Team\n\nRendered feedback" : "Rendered feedback");
- expect(renderQuickAction).not.toHaveBeenCalled();
const mentions: { type: string; id: string }[] = [];
editor.state.doc.descendants((node) => {
if (node.type.name === "mention") mentions.push({ type: node.attrs.type, id: node.attrs.id });
@@ -273,7 +269,6 @@ describe("comment quick-action catalog updates in the real editor", () => {
it("keeps the draft and reports an unavailable target without a render request", async () => {
const unavailable = { ...action, assignee_type: "agent", assignee_id: "target-id", target_missing: true };
listQuickActions.mockResolvedValue({ quick_actions: [unavailable] });
- renderQuickAction.mockReturnValue(new Promise(() => {}));
const { editor, dom } = await mount([unavailable]);
await type(editor, "/delayed");
await waitFor(() => expect(menuItem()).toBeVisible());
@@ -284,7 +279,6 @@ describe("comment quick-action catalog updates in the real editor", () => {
expect(toastError).toHaveBeenCalledWith(
"This agent or squad can't be found — refresh the page and try again.",
);
- expect(renderQuickAction).not.toHaveBeenCalled();
});
it("uses a refreshed body and target while preserving the surrounding draft and undo", async () => {
@@ -307,7 +301,6 @@ describe("comment quick-action catalog updates in the real editor", () => {
fireEvent.keyDown(dom, { key: "Enter" });
expect(editor.getText()).toBe("Keep this \n\n@Current Team\n\nUpdated feedback");
- expect(renderQuickAction).not.toHaveBeenCalled();
act(() => { editor.commands.undo(); });
expect(editor.getText()).toBe("Keep this /delayed");
});
@@ -330,7 +323,6 @@ describe("comment quick-action catalog updates in the real editor", () => {
fireEvent.click(menuItem()!);
await waitFor(() => expect(editor.getText()).toBe("Rendered feedback"));
- expect(renderQuickAction).not.toHaveBeenCalled();
},
);
@@ -352,7 +344,6 @@ describe("comment quick-action catalog updates in the real editor", () => {
await act(async () => client.setQueryData(quickActionKeys.list("ws"), { quick_actions: [] }));
await waitFor(() => expect(menuItem()).not.toBeInTheDocument());
expect(editor.getText()).toBe("/delayed");
- expect(renderQuickAction).not.toHaveBeenCalled();
});
it("does not reopen an escaped menu when the pending catalog arrives", async () => {
diff --git a/packages/views/issues/components/comment-composers.test.tsx b/packages/views/issues/components/comment-composers.test.tsx
index e45f73be10..0f415bc41a 100644
--- a/packages/views/issues/components/comment-composers.test.tsx
+++ b/packages/views/issues/components/comment-composers.test.tsx
@@ -30,7 +30,6 @@ vi.mock("@multica/core/auth", () => ({
const apiUploadFile = vi.hoisted(() => vi.fn());
const apiListWorkspaces = vi.hoisted(() => vi.fn());
const apiListQuickActions = vi.hoisted(() => vi.fn());
-const apiRenderQuickAction = vi.hoisted(() => vi.fn());
const apiGetIssue = vi.hoisted(() => vi.fn());
const apiListAgents = vi.hoisted(() => vi.fn());
const apiListSquads = vi.hoisted(() => vi.fn());
@@ -77,7 +76,6 @@ vi.mock("@multica/core/api", () => ({
uploadFile: apiUploadFile,
listWorkspaces: apiListWorkspaces,
listQuickActions: apiListQuickActions,
- renderQuickAction: apiRenderQuickAction,
getIssue: apiGetIssue,
listAgents: apiListAgents,
listSquads: apiListSquads,
@@ -319,7 +317,6 @@ beforeEach(() => {
apiUploadFile.mockReset();
apiListWorkspaces.mockReset();
apiListQuickActions.mockReset();
- apiRenderQuickAction.mockReset();
apiGetIssue.mockReset().mockResolvedValue({ id: "issue-1", assignee_type: null, assignee_id: null });
apiListAgents.mockReset().mockResolvedValue([]);
apiListSquads.mockReset().mockResolvedValue([]);
@@ -472,7 +469,6 @@ describe("quick action `/` menu", () => {
await waitFor(() => {
expect(editorQuickActionMenu.last?.getQuickActionContent?.("qa-1")).toBe("Review this issue");
});
- expect(apiRenderQuickAction).not.toHaveBeenCalled();
});
it(`resolves Issue assignee skills in the ${composer.name}`, async () => {
diff --git a/packages/views/issues/components/issue-detail.test.tsx b/packages/views/issues/components/issue-detail.test.tsx
index 3180e65541..f005db6b0c 100644
--- a/packages/views/issues/components/issue-detail.test.tsx
+++ b/packages/views/issues/components/issue-detail.test.tsx
@@ -344,7 +344,6 @@ const mockApiObj = vi.hoisted(() => ({
subscribeToIssue: vi.fn().mockResolvedValue(undefined),
unsubscribeFromIssue: vi.fn().mockResolvedValue(undefined),
unsubscribeFromIssueSubtree: vi.fn().mockResolvedValue(undefined),
- getActiveTasksForIssue: vi.fn().mockResolvedValue({ tasks: [] }),
listTasksByIssue: vi.fn().mockResolvedValue([]),
rerunIssue: vi.fn(),
listTaskMessages: vi.fn().mockResolvedValue([]),
@@ -848,7 +847,6 @@ describe("IssueDetail (shared)", () => {
mockApiObj.getWorkspaceWorkingAgents.mockResolvedValue([]);
mockApiObj.listProperties.mockResolvedValue({ properties: [], total: 0 });
mockApiObj.listIssues.mockResolvedValue({ issues: [], total: 0 });
- mockApiObj.getActiveTasksForIssue.mockResolvedValue({ tasks: [] });
mockApiObj.listTasksByIssue.mockResolvedValue([]);
mockApiObj.listTaskMessages.mockResolvedValue([]);
mockApiObj.rerunIssue.mockResolvedValue({ id: "task-rerun" });
diff --git a/packages/views/issues/components/issues-page.test.tsx b/packages/views/issues/components/issues-page.test.tsx
index 07807791a9..57da554b3c 100644
--- a/packages/views/issues/components/issues-page.test.tsx
+++ b/packages/views/issues/components/issues-page.test.tsx
@@ -265,7 +265,6 @@ vi.mock("@multica/core/api", () => ({
api: {
getBaseUrl: () => "http://127.0.0.1:8080",
listIssues: (...args: any[]) => mockListIssues(...args),
- listGroupedIssues: (...args: any[]) => mockListGroupedIssues(...args),
listIssueTableGroups: (request: any) => mockListIssueTableGroups(request),
listIssueTableRows: (request: any) => mockListIssueTableRows(request),
listIssueTableFacets: (request: any) => mockListIssueTableFacets(request),
@@ -277,7 +276,6 @@ vi.mock("@multica/core/api", () => ({
},
getApi: () => ({
listIssues: (...args: any[]) => mockListIssues(...args),
- listGroupedIssues: (...args: any[]) => mockListGroupedIssues(...args),
listIssueTableGroups: (request: any) => mockListIssueTableGroups(request),
listIssueTableRows: (request: any) => mockListIssueTableRows(request),
listIssueTableFacets: (request: any) => mockListIssueTableFacets(request),
diff --git a/packages/views/issues/surface/issue-surface.test.tsx b/packages/views/issues/surface/issue-surface.test.tsx
index 510080b08e..45d3cfc0b9 100644
--- a/packages/views/issues/surface/issue-surface.test.tsx
+++ b/packages/views/issues/surface/issue-surface.test.tsx
@@ -177,7 +177,6 @@ describe("IssueSurface — scope switch loading semantics", () => {
listIssueStatuses: async () => ({ statuses: [], categories: [], total: 0 }),
listIssues,
...statusTableMethodsFromLegacy(listIssues),
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
getAgentTaskSnapshot: vi.fn(() => never<AgentTask[]>()),
getChildIssueProgress: vi.fn(() => never()),
@@ -286,7 +285,6 @@ describe("IssueSurface — scope switch loading semantics", () => {
listIssueStatuses: async () => ({ statuses: [], categories: [], total: 0 }),
listIssues,
...statusTableMethodsFromLegacy(listIssues),
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
getAgentTaskSnapshot: vi.fn(() => never<AgentTask[]>()),
getChildIssueProgress: vi.fn(() => never()),
@@ -378,7 +376,6 @@ describe("IssueSurface — table pagination ownership", () => {
listIssues,
listIssueTableRows,
listIssueTableFacets: vi.fn(() => never()),
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
getAgentTaskSnapshot: vi.fn(() =>
Promise.resolve(
@@ -475,7 +472,6 @@ describe("IssueSurface — table pagination ownership", () => {
listIssues,
listIssueTableRows,
listIssueTableFacets: vi.fn(() => never()),
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => Promise.resolve([])),
getAgentTaskSnapshot: vi.fn(() => Promise.resolve([])),
getChildIssueProgress: vi.fn(() => Promise.resolve([])),
@@ -557,7 +553,6 @@ describe("IssueSurface — table pagination ownership", () => {
}),
),
listIssueTableFacets: vi.fn(() => never()),
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => Promise.resolve([])),
getAgentTaskSnapshot: vi.fn(() => Promise.resolve([])),
getChildIssueProgress: vi.fn(() => Promise.resolve([])),
@@ -619,7 +614,6 @@ describe("IssueSurface — table pagination ownership", () => {
listIssues,
listIssueTableRows,
listIssueTableFacets: vi.fn(() => never()),
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => Promise.resolve([])),
getAgentTaskSnapshot: vi.fn(() => Promise.resolve([])),
getChildIssueProgress: vi.fn(() => Promise.resolve([])),
@@ -715,7 +709,6 @@ describe("IssueSurface — table pagination ownership", () => {
}),
),
listIssueTableFacets: vi.fn(() => never()),
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => Promise.resolve([])),
getAgentTaskSnapshot: vi.fn(() => Promise.resolve([])),
getChildIssueProgress: vi.fn(() => Promise.resolve([])),
@@ -783,7 +776,6 @@ describe("IssueSurface — filtered empty state", () => {
listIssueStatuses: async () => ({ statuses: [], categories: [], total: 0 }),
listIssues,
...statusTableMethodsFromLegacy(listIssues),
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
getAgentTaskSnapshot: vi.fn(() => never<AgentTask[]>()),
getWorkspaceWorkingAgents: vi.fn(() => Promise.resolve([])),
@@ -1023,7 +1015,6 @@ describe("IssueSurface — status catalog failure", () => {
rowRequests.push(request);
return tableMethods.listIssueTableRows(request);
}),
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
getAgentTaskSnapshot: vi.fn(() => never<AgentTask[]>()),
getChildIssueProgress: vi.fn(() => never()),
@@ -1176,7 +1167,6 @@ describe("IssueSurface — guest create affordances (MUL-9420)", () => {
listIssueStatuses: async () => ({ statuses: [], categories: [], total: 0 }),
listIssues,
...statusTableMethodsFromLegacy(listIssues),
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
listMembers: vi.fn(() => never()),
getAgentTaskSnapshot: vi.fn(() => never<AgentTask[]>()),
diff --git a/packages/views/issues/surface/use-issue-surface-controller.test.tsx b/packages/views/issues/surface/use-issue-surface-controller.test.tsx
index 2d6e19bbe6..1e2b297e8a 100644
--- a/packages/views/issues/surface/use-issue-surface-controller.test.tsx
+++ b/packages/views/issues/surface/use-issue-surface-controller.test.tsx
@@ -204,7 +204,6 @@ describe("useIssueSurfaceController", () => {
...tableMethods,
listIssueTableRows,
listIssueTableFacets,
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
getAgentTaskSnapshot,
getWorkspaceWorkingAgents,
@@ -378,7 +377,6 @@ describe("useIssueSurfaceController", () => {
listIssues,
listIssueTableRows,
listIssueTableFacets,
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
getAgentTaskSnapshot,
getChildIssueProgress: vi.fn(() => never()),
@@ -464,7 +462,6 @@ describe("useIssueSurfaceController", () => {
listIssues: legacyListIssues,
listIssueTableRows: tableRows,
listIssueTableFacets: tableFacets,
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
getAgentTaskSnapshot,
getChildIssueProgress: vi.fn(() => never()),
@@ -754,7 +751,6 @@ describe("useIssueSurfaceController", () => {
listIssueStatuses: async () => ({ statuses: [], categories: [], total: 0 }),
listIssues,
listIssueTableFacets,
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
listProperties: vi.fn(() => Promise.resolve({ properties: [] })),
getAgentTaskSnapshot: vi.fn(() => Promise.resolve([])),
@@ -844,7 +840,6 @@ describe("useIssueSurfaceController", () => {
listIssues,
...tableMethods,
listIssueTableFacets,
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
listProperties: vi.fn(() =>
Promise.resolve({ properties, total: properties.length }),
@@ -906,7 +901,6 @@ describe("useIssueSurfaceController", () => {
listIssues,
...tableMethods,
listIssueTableGroups,
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => Promise.resolve({ projects: [], total: 0 })),
getAgentTaskSnapshot: vi.fn(() => Promise.resolve([])),
getChildIssueProgress: vi.fn(() => Promise.resolve([])),
@@ -950,7 +944,6 @@ describe("useIssueSurfaceController", () => {
listIssues,
listIssueTableRows,
listIssueTableFacets: vi.fn(() => never()),
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
listProperties: vi.fn(() => Promise.resolve({ properties: [] })),
getAgentTaskSnapshot: vi.fn(() => Promise.resolve([])),
@@ -1004,7 +997,6 @@ describe("useIssueSurfaceController", () => {
listIssues,
listIssueTableRows,
listIssueTableFacets: vi.fn(() => never()),
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
listProperties: vi.fn(() => Promise.resolve({ properties: [] })),
getAgentTaskSnapshot: vi.fn(() => Promise.resolve([])),
@@ -1059,7 +1051,6 @@ describe("useIssueSurfaceController", () => {
// a built-in key IS its own category. (MUL-6243)
listIssueStatuses: async () => ({ statuses: [], categories: [], total: 0 }),
listIssues,
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
getAgentTaskSnapshot: vi.fn(() =>
Promise.resolve([
@@ -1104,7 +1095,6 @@ describe("useIssueSurfaceController", () => {
// a built-in key IS its own category. (MUL-6243)
listIssueStatuses: async () => ({ statuses: [], categories: [], total: 0 }),
listIssues,
- listGroupedIssues: vi.fn(() => never()),
listProjects: vi.fn(() => never()),
getAgentTaskSnapshot: vi.fn(() => Promise.resolve([])),
getWorkspaceWorkingAgents,