diff --git a/frontend/src/agents/AgentLogs.tsx b/frontend/src/agents/AgentLogs.tsx
index 9fbe165e..4651f15e 100644
--- a/frontend/src/agents/AgentLogs.tsx
+++ b/frontend/src/agents/AgentLogs.tsx
@@ -4,7 +4,6 @@ import { useSelector } from 'react-redux';
import { useParams } from 'react-router-dom';
import userService from '../api/services/userService';
-import Spinner from '../components/Spinner';
import { selectToken } from '../preferences/preferenceSlice';
import Analytics from '../settings/Analytics';
import Logs from '../settings/Logs';
@@ -67,22 +66,12 @@ export default function AgentLogs() {
)}
- {loadingAgent ? (
-
-
-
- ) : (
- agent &&
- )}
- {!loadingAgent && agent && }
- {loadingAgent ? (
-
-
-
- ) : (
- agent && (
-
- )
+ {agentId && (loadingAgent || agent) && (
+ <>
+
+
+
+ >
)}
);
diff --git a/frontend/src/agents/AgentsList.tsx b/frontend/src/agents/AgentsList.tsx
index 446e8295..d5d99f80 100644
--- a/frontend/src/agents/AgentsList.tsx
+++ b/frontend/src/agents/AgentsList.tsx
@@ -5,7 +5,7 @@ import { useDispatch, useSelector } from 'react-redux';
import { useNavigate, useSearchParams } from 'react-router-dom';
import userService from '../api/services/userService';
-import Spinner from '../components/Spinner';
+import SkeletonLoader from '../components/SkeletonLoader';
import { Button } from '../components/ui/button';
import { Input } from '../components/ui/input';
import {
@@ -155,7 +155,14 @@ export default function AgentsList() {
return hasAgentsInSection;
});
+ const showPageLoader =
+ activeFilter === 'all' &&
+ agentSectionsConfig.some(
+ (config) => !isDataLoaded[config.id as AgentSectionId],
+ );
+
const showSearchEmptyState =
+ !showPageLoader &&
searchQuery &&
hasAnyAgents &&
!hasFilteredResults &&
@@ -207,29 +214,46 @@ export default function AgentsList() {
- {visibleSections.map((sectionConfig) => (
-
- ))}
+ {showPageLoader ? (
+
+ ) : (
+ visibleSections.map((sectionConfig) => (
+
+ ))
+ )}
{showSearchEmptyState && (
@@ -574,8 +598,8 @@ function AgentSection({
{isLoading ? (
-
-
+
+
) : (
<>
diff --git a/frontend/src/components/SkeletonLoader.tsx b/frontend/src/components/SkeletonLoader.tsx
index 00f23249..26a1fe2b 100644
--- a/frontend/src/components/SkeletonLoader.tsx
+++ b/frontend/src/components/SkeletonLoader.tsx
@@ -13,6 +13,7 @@ interface SkeletonLoaderProps {
| 'sourceCards'
| 'toolCards'
| 'addToolCards'
+ | 'agentCards'
| 'connectedState'
| 'filesSection';
}
@@ -264,6 +265,26 @@ const SkeletonLoader: React.FC
= ({
>
);
+ const renderAgentCards = () => (
+ <>
+ {Array.from({ length: count }).map((_, idx) => (
+
+ ))}
+ >
+ );
+
const renderToolCards = () => (
<>
{Array.from({ length: count }).map((_, idx) => (
@@ -325,6 +346,7 @@ const SkeletonLoader: React.FC = ({
sourceCards: renderSourceCards,
toolCards: renderToolCards,
addToolCards: renderAddToolCards,
+ agentCards: renderAgentCards,
connectedState: renderConnectedState,
filesSection: renderFilesSection,
};