From 3266a662996636521e1f436ff46cc0dd3eacbe8f Mon Sep 17 00:00:00 2001 From: viettranx Date: Thu, 2 Apr 2026 08:23:19 +0700 Subject: [PATCH] feat(workspace): split sharing UI - separate Memory & KG from Workspace Reorganize workspace sharing section to distinguish shared workspace from memory/knowledge graph sharing controls. --- .../workspace-sharing-section.tsx | 179 +++++++++--------- .../agent-detail/heartbeat-config-dialog.tsx | 2 +- 2 files changed, 95 insertions(+), 86 deletions(-) diff --git a/ui/web/src/pages/agents/agent-detail/config-sections/workspace-sharing-section.tsx b/ui/web/src/pages/agents/agent-detail/config-sections/workspace-sharing-section.tsx index 0caed084..a999440e 100644 --- a/ui/web/src/pages/agents/agent-detail/config-sections/workspace-sharing-section.tsx +++ b/ui/web/src/pages/agents/agent-detail/config-sections/workspace-sharing-section.tsx @@ -37,38 +37,24 @@ export function WorkspaceSharingSection({ value, onChange }: WorkspaceSharingSec onChange({ ...value, shared_users: updated.length > 0 ? updated : undefined }); }; - const isActive = !!value.shared_dm || !!value.shared_group || existingUsers.length > 0; + const isWorkspaceActive = !!value.shared_dm || !!value.shared_group || existingUsers.length > 0; return ( -
- {/* Header */} -
-
- -
-
-

{t(`${s}.title`)}

-

{t(`${s}.description`)}

-
-
- - {/* Content card */} -
- {/* Security warning */} - - - - {t(`${s}.warning`)} - - - - {/* Memory & Knowledge Graph — independent section */} -
-
- - {t(`${s}.memoryGroupLabel`)} +
+ {/* ── Section 1: Memory & Knowledge Graph ── */} +
+
+
+
-
+
+

{t(`${s}.memoryGroupLabel`)}

+

{t(`${s}.shareMemoryTip`)}

+
+
+ +
+
{t(`${s}.shareMemory`)}
{value.share_memory && ( -

+

{t(`${s}.shareMemoryNote`)}

)}
+
- {/* Workspace Folders — DM / Group sharing toggles */} -
-

{t(`${s}.folderGroupLabel`)}

-
-
- {t(`${s}.sharedDm`)} - onChange({ ...value, shared_dm: v })} - /> -
-
- {t(`${s}.sharedGroup`)} - onChange({ ...value, shared_group: v })} - /> -
+ {/* ── Section 2: Workspace File Sharing ── */} +
+
+
+ +
+
+

{t(`${s}.title`)}

+

{t(`${s}.description`)}

- {/* Shared users allowlist with contact search */} -
- {t(`${s}.sharedUsers`)} - {existingUsers.length > 0 && ( -
- {existingUsers.map((u, i) => ( - - {u} - - - ))} +
+ {/* Security warning */} + + + + {t(`${s}.warning`)} + + + + {/* DM / Group sharing toggles */} +
+

{t(`${s}.folderGroupLabel`)}

+
+
+ {t(`${s}.sharedDm`)} + onChange({ ...value, shared_dm: v })} + /> +
+
+ {t(`${s}.sharedGroup`)} + onChange({ ...value, shared_group: v })} + /> +
+
+
+ + {/* Shared users allowlist */} +
+ {t(`${s}.sharedUsers`)} + {existingUsers.length > 0 && ( +
+ {existingUsers.map((u, i) => ( + + {u} + + + ))} +
+ )} +
+ setContactSearch(val)} + placeholder={t(`${s}.userIdPlaceholder`)} + className="flex-1" + /> +
- )} -
- setContactSearch(val)} - placeholder={t(`${s}.userIdPlaceholder`)} - className="flex-1" - /> -
-
-
+
+ ); } diff --git a/ui/web/src/pages/agents/agent-detail/heartbeat-config-dialog.tsx b/ui/web/src/pages/agents/agent-detail/heartbeat-config-dialog.tsx index aabb2ab9..df680cd9 100644 --- a/ui/web/src/pages/agents/agent-detail/heartbeat-config-dialog.tsx +++ b/ui/web/src/pages/agents/agent-detail/heartbeat-config-dialog.tsx @@ -228,7 +228,7 @@ export function HeartbeatConfigDialog({ {t("heartbeat.sectionDelivery")} -
+
{channelNames.length > 0 ? (