Make /profiles and /tools like server side /logs
The /profiles and /tools pages had a suboptimal loading experience:
/profiles showed a spinner at the top on hard refresh/tools showed a spinner in the middle on hard refresh/logs/llm-proxy already had SSR and loaded without spinnersApplied the same SSR pattern used in /logs/llm-proxy to both pages:
getServerApiHeaders() and archestraApiSdkinitialData to avoid client-side fetching on first render/profiles page:initialData prop, passes to hooksinitialData support to useProfilesPaginated/tools page:initialData propinitialData in hooks/fixes #1427 /claim #1427
[!NOTE] Server-render /profiles and /tools and pass initial data to client/hooks to eliminate first-load spinners, with policy transform utilities and default page sizes extracted.
- Frontend
- Profiles (
/profiles):
- Server fetch for
agentsandteamsinapp/profiles/page.tsx; passinitialDatato client.page.client.tsx: consumeinitialData; useDEFAULT_AGENTS_PAGE_SIZE; types tightened.useProfilesPaginatednow supportsinitialData(first page, default sort/filter) to avoid client refetch.- Tools (
/tools):
- Server fetch for
agentTools,agents,mcpServers,internalMcpCatalog, and policies inapp/tools/page.tsx; passinitialData.page.client.tsxandassigned-tools-table.tsx: accept/propagateinitialDatato hooks; conditionally seed queries only for first-page default state; useDEFAULT_TOOLS_PAGE_SIZE.- Lib
lib/agent.query.ts:useProfilesPaginatedaddsinitialDatagating.lib/policy.query.ts: hooks acceptinitialDataand use shared transforms.lib/policy.utils.ts: newtransformToolInvocationPoliciesandtransformToolResultPolicieshelpers.lib/utils.ts: addDEFAULT_AGENTS_PAGE_SIZEandDEFAULT_TOOLS_PAGE_SIZE.- UX
- First-render spinners removed for
/profilesand/toolsvia SSR initial data.Written by Cursor Bugbot for commit 0dfe34d2acbf197c04083ed1552244c47da29374. This will update automatically on new commits. Configure here.
Excellencedev
@Excellencedev
Archestra
@archestra-ai