From 0e84cd5460012028694db77ff936f7130e94ed06 Mon Sep 17 00:00:00 2001 From: AshAnand34 Date: Sat, 13 Sep 2025 13:46:24 -0700 Subject: [PATCH] style: Enhance UI components in Agents feature for improved layout and aesthetics --- .../features/agents/components/agent-card.tsx | 73 +++++++++++++------ .../components/agent-dashboard/index.tsx | 31 +++++--- .../agents/components/page-header.tsx | 17 +++-- .../components/templates-list/agent-list.tsx | 19 +++-- .../components/templates-list/index.tsx | 20 ++--- .../templates-list/templates-card.tsx | 30 +++++--- apps/web/src/features/agents/index.tsx | 40 +++++++--- 7 files changed, 154 insertions(+), 76 deletions(-) diff --git a/apps/web/src/features/agents/components/agent-card.tsx b/apps/web/src/features/agents/components/agent-card.tsx index f4c04f31..79a914bd 100644 --- a/apps/web/src/features/agents/components/agent-card.tsx +++ b/apps/web/src/features/agents/components/agent-card.tsx @@ -36,20 +36,29 @@ function SupportedConfigBadge({ {type === "rag" && ( - - + + RAG )} {type === "tools" && ( - - + + MCP Tools )} {type === "supervisor" && ( - - + + Supervisor )} @@ -78,19 +87,24 @@ export function AgentCard({ agent, showDeployment }: AgentCardProps) { <> - +
-

{agent.name}

+

+ {agent.name} +

{showDeployment && selectedDeployment && ( -
+
- - + + {selectedDeployment.name} @@ -101,8 +115,11 @@ export function AgentCard({ agent, showDeployment }: AgentCardProps) { - - + + {agent.graph_id} @@ -115,27 +132,32 @@ export function AgentCard({ agent, showDeployment }: AgentCardProps) { )}
-
+
{agent.metadata?.description && typeof agent.metadata.description === "string" ? ( -

+

{agent.metadata.description}

) : null} - {agent.supportedConfigs?.map((config) => ( - - ))} + {agent.supportedConfigs && agent.supportedConfigs.length > 0 && ( +
+ {agent.supportedConfigs.map((config) => ( + + ))} +
+ )}
- + {!isDefaultAgent && ( diff --git a/apps/web/src/features/agents/components/agent-dashboard/index.tsx b/apps/web/src/features/agents/components/agent-dashboard/index.tsx index b0f77df1..22d80dda 100644 --- a/apps/web/src/features/agents/components/agent-dashboard/index.tsx +++ b/apps/web/src/features/agents/components/agent-dashboard/index.tsx @@ -84,11 +84,11 @@ export function AgentDashboard() {
-
- +
+ setSearchQuery(e.target.value)} /> @@ -98,14 +98,16 @@ export function AgentDashboard() {
- Filters: + + Filters: +
setSearchQuery(e.target.value)} /> @@ -44,6 +44,7 @@ export function AgentList({ agents, deploymentId }: AgentListProps) {
{filteredAgents.length === 0 ? ( -
-

No agents found

-

+

+

+ No agents found +

+

Create a new agent or try a different search.

) : ( -
+
{filteredAgents.map((agent) => ( +
-
- +
+ setSearchQueryState(e.target.value)} /> @@ -84,12 +84,14 @@ export function TemplatesList() {
{filteredGraphGroupsState.length === 0 ? ( -
-
- +
+
+
-

No graphs found

-

+

+ No graphs found +

+

{searchQueryState ? "We couldn't find any graphs matching your search." : "There are no agent graphs configured yet."} diff --git a/apps/web/src/features/agents/components/templates-list/templates-card.tsx b/apps/web/src/features/agents/components/templates-list/templates-card.tsx index 25983061..eb775190 100644 --- a/apps/web/src/features/agents/components/templates-list/templates-card.tsx +++ b/apps/web/src/features/agents/components/templates-list/templates-card.tsx @@ -36,8 +36,10 @@ export function TemplateCard({ return ( { // Don't allow toggling via clicking the card if it's already open @@ -49,14 +51,14 @@ export function TemplateCard({ open={isOpen} onOpenChange={() => toggleGraph(graphDeploymentId)} > - +

- -

{_.startCase(graphId)}

+ +

+ {_.startCase(graphId)} +

- {deployment.name} + + {deployment.name} + The deployment the graph belongs to. Deployments typically @@ -88,13 +97,16 @@ export function TemplateCard({
- + {agentsCount} Agent{agentsCount === 1 ? "" : "s"}
- + +
- - Templates - All Agents + + + Templates + + + All Agents + - Loading...

}> + +
+
+ } + > - Loading...

}> + +
+
+ } + >