Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: show a retry in social agent tabs when loading fails (#12954)

[._.]/ Adam Eivy66e0233e7e87
diff --git a/client/src/components/agents/AgentList.jsx b/client/src/components/agents/AgentList.jsx
index b8efcdedb0..86b55248ff 100644
--- a/client/src/components/agents/AgentList.jsx
+++ b/client/src/components/agents/AgentList.jsx
@@ -6,6 +6,7 @@ import BrailleSpinner from '../BrailleSpinner';
import { FormField } from '../ui/FormField';
import ProviderModelSelector from '../ProviderModelSelector';
import EmptyState from '../EmptyState';
+import ListLoadError from '../ui/ListLoadError';
import * as api from '../../services/api';
import { PERSONALITY_STYLES, DEFAULT_PERSONALITY, DEFAULT_AVATAR } from './constants';
import { DEFAULT_AVATAR_COLOR } from '../../themes/portosThemes';
@@ -15,6 +16,7 @@ import { pluralize } from '../../lib/textUtils';
export default function AgentList() {
const [agents, setAgents] = useState([]);
const [loading, setLoading] = useState(true);
+ const [loadError, setLoadError] = useState(false);
const [stats, setStats] = useState({ agents: 0, accounts: 0, schedules: 0, totalRuns: 0 });
const [showForm, setShowForm] = useState(false);
const [formData, setFormData] = useState({
@@ -41,37 +43,43 @@ export default function AgentList() {
const [scheduleCounts, setScheduleCounts] = useState({});
const fetchData = useCallback(async () => {
- const [agentsData, accountsData, scheduleStats, providersData] = await Promise.all([
- api.getAgentPersonalities(),
- api.getPlatformAccounts(),
- api.getScheduleStats(),
- api.getProviders()
- ]);
- setAgents(agentsData);
- setProviders((providersData.providers || []).filter(p => p.enabled));
- setStats({
- agents: agentsData.length,
- accounts: accountsData.length,
- schedules: scheduleStats.total,
- totalRuns: scheduleStats.totalRuns || 0
+ setLoading(true);
+ setLoadError(false);
+ // silent: the inline error below owns the failure UI, so no toast per call.
+ await Promise.all([
+ api.getAgentPersonalities(null, { silent: true }),
+ api.getPlatformAccounts(null, null, { silent: true }),
+ api.getScheduleStats({ silent: true }),
+ api.getProviders({ silent: true }),
+ api.getAutomationSchedules(null, null, { silent: true })
+ ]).then(([agentsData, accountsData, scheduleStats, providersData, schedData]) => {
+ setAgents(agentsData);
+ setProviders((providersData.providers || []).filter(p => p.enabled));
+ setStats({
+ agents: agentsData.length,
+ accounts: accountsData.length,
+ schedules: scheduleStats.total,
+ totalRuns: scheduleStats.totalRuns || 0
+ });
+
+ // Count accounts per agent
+ const acctCounts = {};
+ accountsData.forEach(a => {
+ acctCounts[a.agentId] = (acctCounts[a.agentId] || 0) + 1;
+ });
+ setAccountCounts(acctCounts);
+
+ // Count schedules per agent from schedule list
+ const schedCounts = {};
+ schedData.forEach(s => {
+ schedCounts[s.agentId] = (schedCounts[s.agentId] || 0) + 1;
+ });
+ setScheduleCounts(schedCounts);
+ }).catch(() => {
+ setLoadError(true);
+ }).finally(() => {
+ setLoading(false);
});
-
- // Count accounts per agent
- const acctCounts = {};
- accountsData.forEach(a => {
- acctCounts[a.agentId] = (acctCounts[a.agentId] || 0) + 1;
- });
- setAccountCounts(acctCounts);
-
- // Count schedules per agent from schedule list
- const schedData = await api.getAutomationSchedules();
- const schedCounts = {};
- schedData.forEach(s => {
- schedCounts[s.agentId] = (schedCounts[s.agentId] || 0) + 1;
- });
- setScheduleCounts(schedCounts);
-
- setLoading(false);
}, []);
useEffect(() => {
@@ -165,6 +173,14 @@ export default function AgentList() {
return <div className="p-6"><BrailleSpinner text="Loading agents" /></div>;
}
+ if (loadError) {
+ return (
+ <div className="p-6">
+ <ListLoadError what="social agents" onRetry={fetchData} />
+ </div>
+ );
+ }
+
return (
<div className="flex flex-col h-full">
{/* Header */}
diff --git a/client/src/components/agents/AgentList.test.jsx b/client/src/components/agents/AgentList.test.jsx
new file mode 100644
index 0000000000..b83fb68410
--- /dev/null
+++ b/client/src/components/agents/AgentList.test.jsx
@@ -0,0 +1,43 @@
+import { act, fireEvent, render, screen } from '@testing-library/react';
+import { MemoryRouter } from 'react-router';
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+
+vi.mock('../../services/api', () => ({
+ getAgentPersonalities: vi.fn(),
+ getPlatformAccounts: vi.fn(),
+ getScheduleStats: vi.fn(),
+ getProviders: vi.fn(),
+ getAutomationSchedules: vi.fn(),
+}));
+
+import * as api from '../../services/api';
+import AgentList from './AgentList.jsx';
+
+describe('AgentList', () => {
+ beforeEach(() => {
+ vi.clearAllMocks();
+ api.getAgentPersonalities.mockResolvedValue([]);
+ api.getPlatformAccounts.mockResolvedValue([]);
+ api.getScheduleStats.mockResolvedValue({ total: 0, totalRuns: 0 });
+ api.getProviders.mockResolvedValue({ providers: [] });
+ api.getAutomationSchedules.mockResolvedValue([]);
+ });
+
+ it('shows a retryable error instead of an endless spinner when one load fails, and recovers on Retry', async () => {
+ api.getScheduleStats.mockRejectedValueOnce(new Error('stats unavailable'));
+
+ render(<MemoryRouter><AgentList /></MemoryRouter>);
+
+ expect(await screen.findByText(/Could not load social agents/)).toBeInTheDocument();
+ expect(screen.queryByText('Loading agents')).not.toBeInTheDocument();
+ expect(api.getAgentPersonalities).toHaveBeenLastCalledWith(null, { silent: true });
+ expect(api.getAutomationSchedules).toHaveBeenLastCalledWith(null, null, { silent: true });
+
+ await act(async () => {
+ fireEvent.click(screen.getByRole('button', { name: 'Retry' }));
+ });
+
+ expect(await screen.findByRole('heading', { name: 'Social Agents' })).toBeInTheDocument();
+ expect(api.getScheduleStats).toHaveBeenCalledTimes(2);
+ });
+});
diff --git a/client/src/components/agents/tabs/ActivityTab.jsx b/client/src/components/agents/tabs/ActivityTab.jsx
index 1c30014833..4a1cab4289 100644
--- a/client/src/components/agents/tabs/ActivityTab.jsx
+++ b/client/src/components/agents/tabs/ActivityTab.jsx
@@ -1,6 +1,7 @@
import { useState, useEffect, useCallback } from 'react';
import * as api from '../../../services/api';
import BrailleSpinner from '../../BrailleSpinner';
+import ListLoadError from '../../ui/ListLoadError';
import { ACTION_TYPES } from '../constants';
import { formatDateTime } from '../../../utils/formatters';
@@ -11,14 +12,18 @@ export default function ActivityTab({ agentId }) {
const [loading, setLoading] = useState(true);
const [actionFilter, setActionFilter] = useState('');
const [hasMore, setHasMore] = useState(true);
+ const [loadError, setLoadError] = useState(false);
const fetchData = useCallback(async () => {
- const activitiesData = await api.getAgentActivityTimeline(
- PAGE_SIZE, [agentId], null, actionFilter || null
- );
- setActivities(activitiesData);
- setHasMore(activitiesData.length >= PAGE_SIZE);
- setLoading(false);
+ setLoading(true);
+ setLoadError(false);
+ await api.getAgentActivityTimeline(PAGE_SIZE, [agentId], null, actionFilter || null, { silent: true })
+ .then((activitiesData) => {
+ setActivities(activitiesData);
+ setHasMore(activitiesData.length >= PAGE_SIZE);
+ })
+ .catch(() => setLoadError(true))
+ .finally(() => setLoading(false));
}, [agentId, actionFilter]);
useEffect(() => {
@@ -62,6 +67,14 @@ export default function ActivityTab({ agentId }) {
return <div className="p-4"><BrailleSpinner text="Loading activity" /></div>;
}
+ if (loadError) {
+ return (
+ <div className="p-4">
+ <ListLoadError what="activity log" onRetry={fetchData} />
+ </div>
+ );
+ }
+
return (
<div className="p-4">
<div className="flex justify-between items-center mb-4">
diff --git a/client/src/components/agents/tabs/ActivityTab.test.jsx b/client/src/components/agents/tabs/ActivityTab.test.jsx
index c0f01fdf1f..18f8a152c5 100644
--- a/client/src/components/agents/tabs/ActivityTab.test.jsx
+++ b/client/src/components/agents/tabs/ActivityTab.test.jsx
@@ -12,7 +12,7 @@ const page = (action, count, prefix = 'a') => Array.from({ length: count }, (_,
id: `${prefix}-${i}`, action, status: 'completed', timestamp: `2026-08-23T00:${String(59 - i).padStart(2, '0')}:00.000Z`,
}));
-describe('ActivityTab filter paging', () => {
+describe('ActivityTab', () => {
beforeEach(() => {
vi.clearAllMocks();
});
@@ -34,4 +34,23 @@ describe('ActivityTab filter paging', () => {
50, ['agent-1'], '2026-08-23T00:10:00.000Z', 'post'
);
});
+
+ it('shows a retryable error instead of an endless spinner when the activity load fails', async () => {
+ api.getAgentActivityTimeline
+ .mockRejectedValueOnce(new Error('network unavailable'))
+ .mockResolvedValueOnce([]);
+
+ render(<ActivityTab agentId="agent-1" />);
+
+ expect(await screen.findByText(/Could not load activity log/)).toBeInTheDocument();
+ expect(screen.queryByText('Loading activity')).not.toBeInTheDocument();
+ expect(api.getAgentActivityTimeline).toHaveBeenLastCalledWith(50, ['agent-1'], null, null, { silent: true });
+
+ await act(async () => {
+ fireEvent.click(screen.getByRole('button', { name: 'Retry' }));
+ });
+
+ expect(await screen.findByRole('heading', { name: 'Activity Log' })).toBeInTheDocument();
+ expect(api.getAgentActivityTimeline).toHaveBeenCalledTimes(2);
+ });
});
diff --git a/client/src/components/agents/tabs/OverviewTab.jsx b/client/src/components/agents/tabs/OverviewTab.jsx
index ebe67af783..df0e46c2a3 100644
--- a/client/src/components/agents/tabs/OverviewTab.jsx
+++ b/client/src/components/agents/tabs/OverviewTab.jsx
@@ -7,6 +7,7 @@ import { filterSelectableModels } from '../../../utils/providers';
import { providerModeSelectionPolicy } from '../../../utils/providerSelection';
import BrailleSpinner from '../../BrailleSpinner';
import { FormField } from '../../ui/FormField';
+import ListLoadError from '../../ui/ListLoadError';
import ProviderModelSelector from '../../ProviderModelSelector';
import { PERSONALITY_STYLES, DEFAULT_PERSONALITY, DEFAULT_AVATAR, PLATFORM_TYPES, ACCOUNT_STATUSES } from '../constants';
import { DEFAULT_AVATAR_COLOR } from '../../../themes/portosThemes';
@@ -24,10 +25,12 @@ export default function OverviewTab({ agentId, agent, onAgentUpdate }) {
// Providers state (for AI config section)
const [providers, setProviders] = useState([]);
+ const [providersError, setProvidersError] = useState(false);
// Accounts state
const [accounts, setAccounts] = useState([]);
const [accountsLoading, setAccountsLoading] = useState(true);
+ const [accountsError, setAccountsError] = useState(false);
const [showAccountForm, setShowAccountForm] = useState(false);
const [accountForm, setAccountForm] = useState({
platform: 'moltbook',
@@ -74,14 +77,19 @@ export default function OverviewTab({ agentId, agent, onAgentUpdate }) {
}, [topicsKey, quirksKey]);
const fetchAccounts = useCallback(async () => {
- const data = await api.getPlatformAccounts(agentId);
- setAccounts(data);
- setAccountsLoading(false);
+ setAccountsLoading(true);
+ setAccountsError(false);
+ await api.getPlatformAccounts(agentId, null, { silent: true })
+ .then((data) => setAccounts(data))
+ .catch(() => setAccountsError(true))
+ .finally(() => setAccountsLoading(false));
}, [agentId]);
const fetchProviders = useCallback(async () => {
- const data = await api.getProviders();
- setProviders((data.providers || []).filter(p => p.enabled));
+ setProvidersError(false);
+ await api.getProviders({ silent: true })
+ .then((data) => setProviders((data.providers || []).filter(p => p.enabled)))
+ .catch(() => setProvidersError(true));
}, []);
const fetchStats = useCallback(async () => {
@@ -537,6 +545,9 @@ export default function OverviewTab({ agentId, agent, onAgentUpdate }) {
<p className="text-xs text-gray-500 mb-3">
Content, engagement, and challenge solving read public Moltbook text and list text API providers only. A saved CLI or TUI stays listed, and that run skips instead of switching provider. System Default sends comments, replies, and verification challenges to an eligible Abuse Guard text API provider. Original posts use the globally active provider.
</p>
+ {providersError && (
+ <ListLoadError what="AI providers" onRetry={fetchProviders} className="mb-3" />
+ )}
<div className="space-y-3">
{[
{ key: 'content', label: 'Content Generation', desc: 'Posts, comments, replies', selectionPolicy: providerModeSelectionPolicy('direct-api') },
@@ -680,6 +691,8 @@ export default function OverviewTab({ agentId, agent, onAgentUpdate }) {
{accountsLoading ? (
<p className="text-sm text-gray-400">Loading accounts...</p>
+ ) : accountsError ? (
+ <ListLoadError what="platform accounts" onRetry={fetchAccounts} />
) : accounts.length === 0 ? (
<p className="text-sm text-gray-500 text-center py-4">No platform accounts linked to this agent</p>
) : (
diff --git a/client/src/components/agents/tabs/OverviewTab.test.jsx b/client/src/components/agents/tabs/OverviewTab.test.jsx
index 623f295e6b..d7097fc9e0 100644
--- a/client/src/components/agents/tabs/OverviewTab.test.jsx
+++ b/client/src/components/agents/tabs/OverviewTab.test.jsx
@@ -28,6 +28,42 @@ beforeEach(() => {
getAgentActivityStats.mockResolvedValue(null);
});
+describe('agent load failures', () => {
+ it('shows a retryable account error instead of an endless loading message, and recovers on Retry', async () => {
+ getPlatformAccounts
+ .mockRejectedValueOnce(new Error('network unavailable'))
+ .mockResolvedValue([]);
+
+ render(
+ <MemoryRouter>
+ <OverviewTab agentId="agent-1" agent={{ id: 'agent-1', enabled: true, aiConfig: {} }} />
+ </MemoryRouter>,
+ );
+
+ expect(await screen.findByText(/Could not load platform accounts/)).toBeInTheDocument();
+ expect(screen.queryByText('Loading accounts...')).not.toBeInTheDocument();
+ expect(getPlatformAccounts).toHaveBeenLastCalledWith('agent-1', null, { silent: true });
+
+ await act(async () => { fireEvent.click(screen.getByRole('button', { name: 'Retry' })); });
+
+ expect(await screen.findByText('No platform accounts linked to this agent')).toBeInTheDocument();
+ expect(getPlatformAccounts).toHaveBeenCalledTimes(2);
+ });
+
+ it('surfaces a failed provider read instead of an empty provider list', async () => {
+ getProviders.mockRejectedValueOnce(new Error('network unavailable'));
+
+ render(
+ <MemoryRouter>
+ <OverviewTab agentId="agent-1" agent={{ id: 'agent-1', enabled: true, aiConfig: {} }} />
+ </MemoryRouter>,
+ );
+
+ expect(await screen.findByText(/Could not load AI providers/)).toBeInTheDocument();
+ expect(getProviders).toHaveBeenLastCalledWith({ silent: true });
+ });
+});
+
describe('agent AI provider pickers', () => {
it('offers only text API providers for Moltbook content and engagement', async () => {
render(
diff --git a/client/src/components/agents/tabs/PublishedTab.jsx b/client/src/components/agents/tabs/PublishedTab.jsx
index bfedd3ce04..7ff4fbdb3b 100644
--- a/client/src/components/agents/tabs/PublishedTab.jsx
+++ b/client/src/components/agents/tabs/PublishedTab.jsx
@@ -2,6 +2,7 @@ import { useState, useEffect, useCallback } from 'react';
import * as api from '../../../services/api';
import BrailleSpinner from '../../BrailleSpinner';
import LoadFailedState from '../../ui/LoadFailedState';
+import ListLoadError from '../../ui/ListLoadError';
import { FormField } from '../../ui/FormField';
import { timeAgo, formatDateTime } from '../../../utils/formatters';
import useLatestRequest from '../../../hooks/useLatestRequest.js';
@@ -15,16 +16,22 @@ export default function PublishedTab({ agentId }) {
const [publishedDays, setPublishedDays] = useState(7);
const [loading, setLoading] = useState(true);
const beginPublishedLoad = useLatestRequest();
+ const [accountsError, setAccountsError] = useState(false);
const fetchAccounts = useCallback(async () => {
- const data = await api.getPlatformAccounts(agentId);
- const active = data.filter(a => a.status === 'active');
- setAccounts(active);
- // Auto-select first account
- if (active.length > 0) {
- setSelectedAccountId(prev => prev || active[0].id);
- }
- setLoading(false);
+ setLoading(true);
+ setAccountsError(false);
+ await api.getPlatformAccounts(agentId, null, { silent: true })
+ .then((data) => {
+ const active = data.filter(a => a.status === 'active');
+ setAccounts(active);
+ // Auto-select first account
+ if (active.length > 0) {
+ setSelectedAccountId(prev => prev || active[0].id);
+ }
+ })
+ .catch(() => setAccountsError(true))
+ .finally(() => setLoading(false));
}, [agentId]);
useEffect(() => {
@@ -59,6 +66,14 @@ export default function PublishedTab({ agentId }) {
return <div className="p-4"><BrailleSpinner text="Loading" /></div>;
}
+ if (accountsError) {
+ return (
+ <div className="p-4">
+ <ListLoadError what="platform accounts" onRetry={fetchAccounts} />
+ </div>
+ );
+ }
+
return (
<div className="p-4">
{/* Header */}
diff --git a/client/src/components/agents/tabs/PublishedTab.test.jsx b/client/src/components/agents/tabs/PublishedTab.test.jsx
index 28d9851e81..2f1598020d 100644
--- a/client/src/components/agents/tabs/PublishedTab.test.jsx
+++ b/client/src/components/agents/tabs/PublishedTab.test.jsx
@@ -10,6 +10,23 @@ import * as api from '../../../services/api';
import PublishedTab from './PublishedTab.jsx';
describe('PublishedTab', () => {
+ it('shows a retryable error instead of a spinner when the account load fails', async () => {
+ api.getPlatformAccounts
+ .mockRejectedValueOnce(new Error('network unavailable'))
+ .mockResolvedValue([{ id: 'account-1', status: 'active', credentials: { username: 'example-user' } }]);
+ api.getAgentPublished.mockResolvedValue({ posts: [], comments: [] });
+
+ render(<PublishedTab agentId="agent-1" />);
+
+ expect(await screen.findByText(/Could not load platform accounts/)).toBeInTheDocument();
+ expect(screen.queryByText('Loading')).not.toBeInTheDocument();
+
+ await act(async () => { fireEvent.click(screen.getByRole('button', { name: 'Retry' })); });
+
+ expect(await screen.findByRole('button', { name: 'Refresh' })).toBeEnabled();
+ expect(api.getPlatformAccounts).toHaveBeenLastCalledWith('agent-1', null, { silent: true });
+ });
+
beforeEach(() => {
vi.clearAllMocks();
api.getPlatformAccounts.mockResolvedValue([{
diff --git a/client/src/components/agents/tabs/ToolsTab.jsx b/client/src/components/agents/tabs/ToolsTab.jsx
index 88f375764b..7832734497 100644
--- a/client/src/components/agents/tabs/ToolsTab.jsx
+++ b/client/src/components/agents/tabs/ToolsTab.jsx
@@ -2,6 +2,7 @@ import { useState, useEffect, useCallback } from 'react';
import toast from '../../ui/Toast';
import * as api from '../../../services/api';
import BrailleSpinner from '../../BrailleSpinner';
+import ListLoadError from '../../ui/ListLoadError';
import { useCooldownTick } from '../../../hooks/useCooldownTick';
import { formatCooldown, formatDateTime } from '../../../utils/formatters';
import { clickableProps, onActivateKeyDown } from '../../../lib/a11yKeyboard.js';
@@ -43,6 +44,7 @@ export default function ToolsTab({ agentId, agent }) {
// Drafts state
const [drafts, setDrafts] = useState([]);
+ const [draftsError, setDraftsError] = useState(false);
const [activeDraftId, setActiveDraftId] = useState(null);
// Cooldown timer state
@@ -107,8 +109,10 @@ export default function ToolsTab({ agentId, agent }) {
const loadDrafts = useCallback(async () => {
if (!agentId) return;
- const data = await api.getAgentDrafts(agentId);
- setDrafts(data);
+ setDraftsError(false);
+ await api.getAgentDrafts(agentId, { silent: true })
+ .then((data) => setDrafts(data))
+ .catch(() => setDraftsError(true));
}, [agentId]);
// Load drafts on mount
@@ -650,6 +654,9 @@ export default function ToolsTab({ agentId, agent }) {
</div>
{/* Drafts */}
+ {draftsError && (
+ <ListLoadError what="drafts" onRetry={loadDrafts} className="mb-4" />
+ )}
{drafts.length > 0 && (
<div className="bg-port-card border border-port-border rounded-lg p-4">
<h3 className="font-semibold text-white mb-3">
diff --git a/client/src/components/agents/tabs/ToolsTab.test.jsx b/client/src/components/agents/tabs/ToolsTab.test.jsx
index b6a9e53b86..9cef62382a 100644
--- a/client/src/components/agents/tabs/ToolsTab.test.jsx
+++ b/client/src/components/agents/tabs/ToolsTab.test.jsx
@@ -14,6 +14,33 @@ vi.mock('../../../services/api', () => ({
import * as api from '../../../services/api';
import ToolsTab from './ToolsTab.jsx';
+describe('ToolsTab draft loading', () => {
+ beforeEach(() => {
+ vi.clearAllMocks();
+ api.getPlatformAccounts.mockResolvedValue([{
+ id: 'account-1', status: 'active', credentials: { username: 'example-user' },
+ }]);
+ api.getAgentRateLimits.mockResolvedValue({});
+ api.getAgentSubmolts.mockResolvedValue([]);
+ });
+
+ it('reports a failed drafts read as an error and recovers on Retry instead of showing no drafts', async () => {
+ api.getAgentDrafts
+ .mockRejectedValueOnce(new Error('network unavailable'))
+ .mockResolvedValue([]);
+
+ render(<ToolsTab agentId="agent-1" agent={{ id: 'agent-1', aiConfig: {} }} />);
+
+ expect(await screen.findByText(/Could not load drafts/)).toBeInTheDocument();
+ expect(api.getAgentDrafts).toHaveBeenLastCalledWith('agent-1', { silent: true });
+
+ await act(async () => { fireEvent.click(screen.getByRole('button', { name: 'Retry' })); });
+
+ expect(api.getAgentDrafts).toHaveBeenCalledTimes(2);
+ expect(screen.queryByText(/Could not load drafts/)).not.toBeInTheDocument();
+ });
+});
+
describe('ToolsTab action failures', () => {
beforeEach(() => {
vi.clearAllMocks();
diff --git a/client/src/services/apiAccounts.js b/client/src/services/apiAccounts.js
index 8bd7dc4154..cd086023cf 100644
--- a/client/src/services/apiAccounts.js
+++ b/client/src/services/apiAccounts.js
@@ -121,7 +121,7 @@ export const moltworldWsInteract = (to, payload) =>
});
// Agent Drafts
-export const getAgentDrafts = (agentId) => request(`/agents/tools/drafts?agentId=${agentId}`);
+export const getAgentDrafts = (agentId, options = {}) => request(`/agents/tools/drafts?agentId=${agentId}`, options);
export const createAgentDraft = (data) => request('/agents/tools/drafts', {
method: 'POST',
body: JSON.stringify(data)
diff --git a/client/src/services/apiAgents.js b/client/src/services/apiAgents.js
index 05ce97f5d7..630a3dca2b 100644
--- a/client/src/services/apiAgents.js
+++ b/client/src/services/apiAgents.js
@@ -9,13 +9,13 @@ export const killAgent = killRunningAgent;
// Agent Activity
// `action` is one action string or an array of them (sent comma-joined).
-export const getAgentActivityTimeline = (limit = 50, agentIds = null, before = null, action = null) => {
+export const getAgentActivityTimeline = (limit = 50, agentIds = null, before = null, action = null, options = {}) => {
const params = new URLSearchParams();
params.set('limit', limit);
if (agentIds) params.set('agentIds', agentIds.join(','));
if (action) params.set('action', [].concat(action).join(','));
if (before) params.set('before', before);
- return request(`/agents/activity/timeline?${params}`);
+ return request(`/agents/activity/timeline?${params}`, options);
};
export const getAgentActivityStats = (agentId, days = 7) =>
request(`/agents/activity/agent/${agentId}/stats?days=${days}`);
diff --git a/client/src/services/apiPersonalities.js b/client/src/services/apiPersonalities.js
index a268c4562e..8c32835014 100644
--- a/client/src/services/apiPersonalities.js
+++ b/client/src/services/apiPersonalities.js
@@ -1,9 +1,9 @@
import { request } from './apiCore.js';
// Agent Personalities
-export const getAgentPersonalities = (userId = null) => {
+export const getAgentPersonalities = (userId = null, options = {}) => {
const params = userId ? `?userId=${encodeURIComponent(userId)}` : '';
- return request(`/agents/personalities${params}`);
+ return request(`/agents/personalities${params}`, options);
};
export const getAgentPersonality = (id) => request(`/agents/personalities/${id}`);
export const createAgentPersonality = (data) => request('/agents/personalities', {