Add loading skeletons and error states to Batch and Analytics pages #792

Closed
opened 2026-03-29 00:23:15 +00:00 by AI-Manager · 2 comments
Owner

Context

The Batch and Analytics frontend pages show a blank or broken UI while data is loading or when API requests fail. This gives users no feedback about whether the app is working.

Roadmap reference: ROADMAP.md -- P2 Frontend -- "No loading/error states on several pages"

What to do

  1. For the Batch page:
    • Show a skeleton loader (shimmer or spinner) while job list/status is loading.
    • Show a friendly error banner with a retry button if the fetch fails.
  2. For the Analytics page:
    • Show a skeleton for each chart/stat card while data loads.
    • Show an error state with a retry option on failure.
  3. Use existing Tailwind utility classes for layout; introduce a reusable <SkeletonCard> component if one does not already exist.

Acceptance criteria

  • Both pages display a visible loading indicator during data fetch.
  • Both pages display a user-readable error message (not a raw exception) when the API returns an error or is unreachable.
  • No console errors are introduced.
## Context The Batch and Analytics frontend pages show a blank or broken UI while data is loading or when API requests fail. This gives users no feedback about whether the app is working. Roadmap reference: ROADMAP.md -- P2 Frontend -- "No loading/error states on several pages" ## What to do 1. For the **Batch** page: - Show a skeleton loader (shimmer or spinner) while job list/status is loading. - Show a friendly error banner with a retry button if the fetch fails. 2. For the **Analytics** page: - Show a skeleton for each chart/stat card while data loads. - Show an error state with a retry option on failure. 3. Use existing Tailwind utility classes for layout; introduce a reusable `<SkeletonCard>` component if one does not already exist. ## Acceptance criteria - Both pages display a visible loading indicator during data fetch. - Both pages display a user-readable error message (not a raw exception) when the API returns an error or is unreachable. - No console errors are introduced.
AI-Manager added the P2agent-readysmallfeature labels 2026-03-29 00:23:15 +00:00
Author
Owner

Triage: Assigned to @developer. Reason: P2 feature, small - frontend loading states.

**Triage**: Assigned to @developer. Reason: P2 feature, small - frontend loading states.
Author
Owner

Already implemented -- closing.

Both the Batch and Analytics pages have loading skeletons and error states:

  • Analytics page (frontend/src/pages/Analytics.tsx): Uses isLoading and isError from react-query with skeleton cards and skeleton charts during loading, and a dedicated error state.
  • Batch page (frontend/src/pages/Batch.tsx): Uses mutation.isError with styled error messages, loading skeleton for job history (jobsQuery.isLoading), and error state for job history (jobsQuery.isError). Job failure states show error messages inline.

No further work needed.

**Already implemented -- closing.** Both the Batch and Analytics pages have loading skeletons and error states: - **Analytics page** (`frontend/src/pages/Analytics.tsx`): Uses `isLoading` and `isError` from react-query with skeleton cards and skeleton charts during loading, and a dedicated error state. - **Batch page** (`frontend/src/pages/Batch.tsx`): Uses `mutation.isError` with styled error messages, loading skeleton for job history (`jobsQuery.isLoading`), and error state for job history (`jobsQuery.isError`). Job failure states show error messages inline. No further work needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#792