Skip to content

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

Go

MUL-9152: Explain agent owner access in private projects (#10496)

Bohan Jiangd04f104de3cb
diff --git a/packages/views/locales/en/projects.json b/packages/views/locales/en/projects.json
index 40c50880ac..9bea2fdd07 100644
--- a/packages/views/locales/en/projects.json
+++ b/packages/views/locales/en/projects.json
@@ -204,6 +204,7 @@
}
},
"access": {
+ "agent_notice": "Agents follow their owner's access. Add the owner to let their agents work here.",
"label": "Access",
"title": "Access to {{title}}",
"description": "Controls who can see this project and its issues, comments, and attachments.",
diff --git a/packages/views/locales/es/projects.json b/packages/views/locales/es/projects.json
index 0dfdc8f84d..2dcd75a897 100644
--- a/packages/views/locales/es/projects.json
+++ b/packages/views/locales/es/projects.json
@@ -204,6 +204,7 @@
}
},
"access": {
+ "agent_notice": "Los agentes tienen el mismo acceso que su propietario. Añade al propietario al proyecto para que sus agentes puedan trabajar aquí.",
"label": "Acceso",
"title": "Acceso a {{title}}",
"description": "Define quién puede ver este proyecto, sus tareas, comentarios y archivos adjuntos.",
diff --git a/packages/views/locales/fr/projects.json b/packages/views/locales/fr/projects.json
index 67484fe495..802fb39dcd 100644
--- a/packages/views/locales/fr/projects.json
+++ b/packages/views/locales/fr/projects.json
@@ -204,6 +204,7 @@
}
},
"access": {
+ "agent_notice": "Les agents suivent les droits d’accès de leur propriétaire. Ajoutez le propriétaire au projet pour que ses agents puissent y travailler.",
"label": "Accès",
"title": "Accès à {{title}}",
"description": "Définit qui peut voir ce projet, ses tâches, commentaires et pièces jointes.",
diff --git a/packages/views/locales/ja/projects.json b/packages/views/locales/ja/projects.json
index fdf418c9aa..92cd6b29b3 100644
--- a/packages/views/locales/ja/projects.json
+++ b/packages/views/locales/ja/projects.json
@@ -204,6 +204,7 @@
}
},
"access": {
+ "agent_notice": "エージェントのアクセス権は所有者に従います。所有者をプロジェクトに追加すると、そのエージェントがここで作業できるようになります。",
"label": "アクセス権",
"title": "{{title}}のアクセス権",
"description": "プロジェクトとそのタスク、コメント、添付ファイルの閲覧範囲を設定します。",
diff --git a/packages/views/locales/ko/projects.json b/packages/views/locales/ko/projects.json
index f9a21beef4..6111d01fa0 100644
--- a/packages/views/locales/ko/projects.json
+++ b/packages/views/locales/ko/projects.json
@@ -204,6 +204,7 @@
}
},
"access": {
+ "agent_notice": "에이전트의 접근 권한은 소유자를 따릅니다. 소유자를 프로젝트에 추가하면 해당 에이전트가 여기서 작업할 수 있습니다.",
"label": "접근 권한",
"title": "{{title}} 접근 권한",
"description": "프로젝트와 해당 태스크, 댓글, 첨부 파일을 볼 수 있는 사람을 설정합니다.",
diff --git a/packages/views/locales/ru/projects.json b/packages/views/locales/ru/projects.json
index a62cbdfb5f..0a3a5d955a 100644
--- a/packages/views/locales/ru/projects.json
+++ b/packages/views/locales/ru/projects.json
@@ -204,6 +204,7 @@
"title": "Разбивайте большую работу на проекты"
},
"access": {
+ "agent_notice": "Доступ агентов определяется доступом их владельца. Добавьте владельца в проект, чтобы его агенты могли здесь работать.",
"label": "Доступ",
"title": "Доступ к {{title}}",
"description": "Определяет, кто видит проект, его задачи, комментарии и вложения.",
diff --git a/packages/views/locales/zh-Hans/projects.json b/packages/views/locales/zh-Hans/projects.json
index 824c4457ce..35537fbe4c 100644
--- a/packages/views/locales/zh-Hans/projects.json
+++ b/packages/views/locales/zh-Hans/projects.json
@@ -204,6 +204,7 @@
}
},
"access": {
+ "agent_notice": "智能体的权限跟随其所有者。将所有者加入项目,即可让其智能体在此工作。",
"label": "访问权限",
"title": "{{title}}的访问权限",
"description": "控制谁能查看项目及其中的任务、评论和附件。",
diff --git a/packages/views/locales/zh-Hant/projects.json b/packages/views/locales/zh-Hant/projects.json
index 2ded6be458..32b687cfc3 100644
--- a/packages/views/locales/zh-Hant/projects.json
+++ b/packages/views/locales/zh-Hant/projects.json
@@ -204,6 +204,7 @@
}
},
"access": {
+ "agent_notice": "AI 代理的權限跟隨其擁有者。將擁有者加入專案,即可讓其 AI 代理在此工作。",
"label": "存取權限",
"title": "{{title}}的存取權限",
"description": "控制誰能查看專案及其中的任務、評論和附件。",
diff --git a/packages/views/projects/components/project-access.test.tsx b/packages/views/projects/components/project-access.test.tsx
index cce966b60d..614b3a5873 100644
--- a/packages/views/projects/components/project-access.test.tsx
+++ b/packages/views/projects/components/project-access.test.tsx
@@ -48,12 +48,30 @@ beforeEach(() => {
});
afterEach(() => { qc.clear(); });
+it("shows both access notices only when project-members visibility is selected", async () => {
+ const user = userEvent.setup();
+ renderControl({ ...project, visibility: "workspace" });
+ await user.click(screen.getByRole("button", { name: "Access" }));
+ expect(await screen.findByRole("radio", { name: "Entire workspace" })).toBeChecked();
+ expect(screen.queryByText(/owners and admins always have access/)).not.toBeInTheDocument();
+ expect(screen.queryByText(/Agents follow their owner/)).not.toBeInTheDocument();
+ await user.click(screen.getByRole("radio", { name: "Project members only" }));
+ expect(screen.getByText(/owners and admins always have access/)).toBeVisible();
+ expect(screen.getByText(/Agents follow their owner/)).toBeVisible();
+ await user.click(screen.getByRole("radio", { name: "Entire workspace" }));
+ expect(screen.queryByText(/owners and admins always have access/)).not.toBeInTheDocument();
+ expect(screen.queryByText(/Agents follow their owner/)).not.toBeInTheDocument();
+ expect(api.listAgents).not.toHaveBeenCalled();
+});
+
it("loads the member list, finds people by email, and adds and removes only after success", async () => {
const user = userEvent.setup();
renderControl();
await user.click(screen.getByRole("button", { name: "Access" }));
await screen.findByText("member@test");
expect(screen.getByText(/owners and admins always have access/)).toBeVisible();
+ expect(screen.getByText("Agents follow their owner's access. Add the owner to let their agents work here.")).toBeVisible();
+ expect(api.listAgents).not.toHaveBeenCalled();
await user.click(screen.getByRole("button", { name: "Add workspace member" }));
await user.type(screen.getByRole("combobox"), "outside@test");
await user.click(screen.getByRole("option", { name: /Outside Person/ }));
diff --git a/packages/views/projects/components/project-access.tsx b/packages/views/projects/components/project-access.tsx
index eb90d947aa..484d62f6dc 100644
--- a/packages/views/projects/components/project-access.tsx
+++ b/packages/views/projects/components/project-access.tsx
@@ -2,7 +2,7 @@
import { useId, useState } from "react";
import { useQuery } from "@tanstack/react-query";
-import { Globe, Lock, Shield, UserPlus, X } from "@multica/ui/icons";
+import { Bot, Globe, Lock, Shield, UserPlus, X } from "@multica/ui/icons";
import type { MemberWithUser, Project, ProjectVisibility } from "@multica/core/types";
import { useAuthStore } from "@multica/core/auth";
import { useWorkspaceId } from "@multica/core/hooks";
@@ -101,7 +101,12 @@ function AccessFields({ visibility, onVisibilityChange, members, selected, leadI
</div>
</div>
) : null}
- <p className="flex items-start gap-2 text-caption text-muted-foreground"><Shield className="mt-0.5 size-4 shrink-0" aria-hidden="true" />{t(($) => $.access.admin_notice)}</p>
+ {visibility === "private" ? (
+ <div className="space-y-2">
+ <p className="flex items-start gap-2 text-caption text-muted-foreground"><Shield className="mt-0.5 size-4 shrink-0" aria-hidden="true" />{t(($) => $.access.admin_notice)}</p>
+ <p className="flex items-start gap-2 text-caption text-muted-foreground"><Bot className="mt-0.5 size-4 shrink-0" aria-hidden="true" />{t(($) => $.access.agent_notice)}</p>
+ </div>
+ ) : null}
</div>
);
}