Skip to content

🀯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

πŸ’„ style(sidebar): show personal pins above Pinned for team (#23116)

Rdmclin252d674e70d55
diff --git a/src/features/HomeSidebar/Body/Agent/List/WorkspaceAgentListContent.tsx b/src/features/HomeSidebar/Body/Agent/List/WorkspaceAgentListContent.tsx
index 8239c80af3b..7a77ff58719 100644
--- a/src/features/HomeSidebar/Body/Agent/List/WorkspaceAgentListContent.tsx
+++ b/src/features/HomeSidebar/Body/Agent/List/WorkspaceAgentListContent.tsx
@@ -59,8 +59,10 @@ SubHeader.displayName = 'WorkspaceAgentSubHeader';
/**
* The merged workspace "Agents" section body (replacing the former separate
- * "Workspace" and "Private" accordions): Inbox β†’ team pins (fixed, set by
- * owners/admins for everyone) β†’ my pins β†’ folders β†’ the rest. Private rows
+ * "Workspace" and "Private" accordions): Inbox β†’ my pins β†’ team pins (fixed,
+ * set by owners/admins for everyone) β†’ folders β†’ the rest. Personal pins come
+ * first so the agents a member chose stay at the top instead of being pushed
+ * down by the (possibly long) team list. Private rows
* carry a lock icon wherever they appear. Personal mode keeps rendering
* `AgentListContent`.
*/
@@ -126,6 +128,16 @@ const WorkspaceAgentListContent = memo<{ hideInbox?: boolean }>(({ hideInbox })
return (
<>
{!hideInbox && <InboxItem style={{ minHeight: 36 }} />}
+ {myPinned.length > 0 && (
+ <Flexbox data-testid={'sidebar-my-pinned'} gap={1}>
+ <SubHeader
+ icon={PinIcon}
+ testId={'sidebar-my-pinned-header'}
+ title={t('navPanel.myPinned')}
+ />
+ <SortableList dataSource={myPinned} onReorder={reorderMyPinned} />
+ </Flexbox>
+ )}
{teamPinned.length > 0 && (
<Flexbox data-testid={'sidebar-team-pinned'} gap={1}>
<SubHeader
@@ -161,16 +173,6 @@ const WorkspaceAgentListContent = memo<{ hideInbox?: boolean }>(({ hideInbox })
)}
</Flexbox>
)}
- {myPinned.length > 0 && (
- <Flexbox data-testid={'sidebar-my-pinned'} gap={1}>
- <SubHeader
- icon={PinIcon}
- testId={'sidebar-my-pinned-header'}
- title={t('navPanel.myPinned')}
- />
- <SortableList dataSource={myPinned} onReorder={reorderMyPinned} />
- </Flexbox>
- )}
{folders.length > 0 && <Group dataSource={folders} />}
{rest.length > 0 && (
<Flexbox data-testid={'sidebar-agents-rest'} gap={1}>