diff --git a/frontend/src/app/(dashboard)/agents/page.tsx b/frontend/src/app/(dashboard)/agents/page.tsx index 79b985bf..6a6a8f45 100644 --- a/frontend/src/app/(dashboard)/agents/page.tsx +++ b/frontend/src/app/(dashboard)/agents/page.tsx @@ -505,7 +505,8 @@ export default function AgentsPage() {
-
+ {/* Fixed height container to prevent layout shifts on tab change */} +
{activeTab === "my-agents" && ( { return ( -
+
- {marketplaceLoading ? ( -
- {Array.from({ length: 8 }).map((_, i) => ( -
- -
- -
- - +
+ {marketplaceLoading ? ( +
+ {Array.from({ length: 8 }).map((_, i) => ( +
+ +
+ +
+ + +
+
-
-
- ))} -
- ) : allMarketplaceItems.length === 0 ? ( -
-

- {marketplaceSearchQuery - ? "No templates found matching your criteria. Try adjusting your search or filters." - : "No agent templates are currently available in the marketplace."} -

-
- ) : ( -
- {marketplaceFilter === 'all' ? ( - <> - {kortixTeamItems.length > 0 && ( -
- + ) : allMarketplaceItems.length === 0 ? ( +
+

+ {marketplaceSearchQuery + ? "No templates found matching your criteria. Try adjusting your search or filters." + : "No agent templates are currently available in the marketplace."} +

+
+ ) : ( +
+ {marketplaceFilter === 'all' ? ( + <> + {kortixTeamItems.length > 0 && ( +
+ +
+ {kortixTeamItems.map((item) => ( + onInstallClick(item)} + /> + ))} +
+
+ )} + {communityItems.length > 0 && ( +
+
+ {communityItems.map((item) => ( + onInstallClick(item)} + /> + ))} +
+
+ )} + + ) : ( +
+ {allMarketplaceItems.map((item) => ( + onInstallClick(item)} /> -
- {kortixTeamItems.map((item) => ( - onInstallClick(item)} - /> - ))} -
-
- )} - {communityItems.length > 0 && ( -
-
- {communityItems.map((item) => ( - onInstallClick(item)} - /> - ))} -
-
- )} - - ) : ( -
- {allMarketplaceItems.map((item) => ( - onInstallClick(item)} - /> - ))} -
- )} -
- )} + ))} +
+ )} +
+ )} +
); }; \ No newline at end of file diff --git a/frontend/src/components/agents/custom-agents-page/my-agents-tab.tsx b/frontend/src/components/agents/custom-agents-page/my-agents-tab.tsx index 689aded5..88f4db6b 100644 --- a/frontend/src/components/agents/custom-agents-page/my-agents-tab.tsx +++ b/frontend/src/components/agents/custom-agents-page/my-agents-tab.tsx @@ -155,7 +155,7 @@ export const MyAgentsTab = ({ }; return ( -
+
- {agentFilter === 'templates' ? ( - renderTemplates() - ) : ( - <> - {agentsLoading ? ( - - ) : filteredAgents.length === 0 ? ( - 0} - onCreateAgent={onCreateAgent} - onClearFilters={handleClearFilters} - /> - ) : ( - - )} +
+ {agentFilter === 'templates' ? ( + renderTemplates() + ) : ( + <> + {agentsLoading ? ( + + ) : filteredAgents.length === 0 ? ( + 0} + onCreateAgent={onCreateAgent} + onClearFilters={handleClearFilters} + /> + ) : ( + + )} - {agentsPagination && agentsPagination.pages > 1 && ( - - )} - - )} + {agentsPagination && agentsPagination.pages > 1 && ( + + )} + + )} +
); }; \ No newline at end of file diff --git a/frontend/src/components/ui/fancy-tabs.tsx b/frontend/src/components/ui/fancy-tabs.tsx index 438359d5..1e800c52 100644 --- a/frontend/src/components/ui/fancy-tabs.tsx +++ b/frontend/src/components/ui/fancy-tabs.tsx @@ -34,11 +34,12 @@ const TabButton = ({ value, isActive, onClick, children }: TabButtonProps) => {