From 5be8160c15fff542641510f9f325d16fe5464a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Thu, 21 May 2026 17:31:50 -0400 Subject: [PATCH] Add org chart SVG connector and work page view toggle - TeamPage: add SVG connector lines between CEO and subordinate agent cards - WorkPage: add Board/List view toggle and Filter button matching design topbar - List view shows all tasks in table format with status/priority/assignee columns --- .../src/renderer/src/pages/TeamPage.tsx | 23 ++++- .../src/renderer/src/pages/WorkPage.tsx | 96 ++++++++++++++----- 2 files changed, 92 insertions(+), 27 deletions(-) diff --git a/AgentCompany-New/src/renderer/src/pages/TeamPage.tsx b/AgentCompany-New/src/renderer/src/pages/TeamPage.tsx index 858ab321..a88220e1 100644 --- a/AgentCompany-New/src/renderer/src/pages/TeamPage.tsx +++ b/AgentCompany-New/src/renderer/src/pages/TeamPage.tsx @@ -43,10 +43,11 @@ export function TeamPage({ snapshot, actions }: PageProps) {
Org
-
+
{employees[0] && }
-
+ {agents.length > 0 && } +
{agents.map((agent) => ( ))} @@ -88,6 +89,24 @@ export function TeamPage({ snapshot, actions }: PageProps) { ); } +function OrgConnector({ count }: { count: number }) { + const positions = Array.from({ length: count }, (_, i) => { + const left = count === 1 ? 50 : ((i / (count - 1)) * 100); + return left; + }); + return ( + + + {count > 1 && ( + + )} + {positions.map((pos, i) => ( + + ))} + + ); +} + function OrgCard({ name, role, human = false }: { name: string; role: string; human?: boolean }) { return (
diff --git a/AgentCompany-New/src/renderer/src/pages/WorkPage.tsx b/AgentCompany-New/src/renderer/src/pages/WorkPage.tsx index 769415cc..e21bc519 100644 --- a/AgentCompany-New/src/renderer/src/pages/WorkPage.tsx +++ b/AgentCompany-New/src/renderer/src/pages/WorkPage.tsx @@ -32,9 +32,12 @@ function optionalValue(form: FormData, key: string): string | null { return text ? text : null; } +type ViewMode = "board" | "list"; + export function WorkPage({ snapshot, actions }: PageProps) { const orgId = activeOrgId(snapshot); const [open, setOpen] = useState(false); + const [view, setView] = useState("board"); const tasks = snapshot.tasks.filter((item) => item.orgId === orgId); const agents = snapshot.agents.filter((item) => item.orgId === orgId); const projects = snapshot.projects.filter((item) => item.orgId === orgId); @@ -66,35 +69,78 @@ export function WorkPage({ snapshot, actions }: PageProps) {

Work

{tasks.length} tasks · {agents.length} assignees

-
+
+
+ + +
+
-
- {columns.map((column) => { - const columnTasks = tasks.filter((task) => task.status === column.id); - return ( -
-
- - {column.label} - {columnTasks.length} + {view === "board" ? ( +
+ {columns.map((column) => { + const columnTasks = tasks.filter((task) => task.status === column.id); + return ( +
+
+ + {column.label} + {columnTasks.length} +
+ {columnTasks.map((task) => ( + agent.name, "Agent")} + project={optionalRecordName(task.projectId, projects, (project) => project.name, "Project")} + goal={optionalRecordName(task.goalId, goals, (goal) => goal.title, "Goal")} + workspace={optionalRecordName(task.workspaceId, workspaces, (workspace) => workspace.name, "Workspace")} + onMove={(status) => void actions.run(() => window.agentCompany.updateTaskStatus({ orgId, taskId: task.id, status }))} + /> + ))}
- {columnTasks.map((task) => ( - agent.name, "Agent")} - project={optionalRecordName(task.projectId, projects, (project) => project.name, "Project")} - goal={optionalRecordName(task.goalId, goals, (goal) => goal.title, "Goal")} - workspace={optionalRecordName(task.workspaceId, workspaces, (workspace) => workspace.name, "Workspace")} - onMove={(status) => void actions.run(() => window.agentCompany.updateTaskStatus({ orgId, taskId: task.id, status }))} - /> - ))} -
- ); - })} -
+ ); + })} +
+ ) : ( +
+
+
Title
Status
Priority
Assignee
+
+ {tasks.length === 0 ? ( +
No tasks
+ ) : tasks.map((task) => { + const assigneeName = optionalRecordName(task.assigneeAgentId, agents, (a) => a.name, "Agent"); + return ( +
+
+ {task.risk === "high" && } + {task.title} +
+ {task.status.replaceAll("_", " ")} + {task.priority} +
{assigneeName ?
{assigneeName}
: —}
+
+ ); + })} +
+ )} setOpen(false)} onSubmit={submit}>