Add loading and error states to Batch and Analytics pages #1277

Closed
opened 2026-03-30 09:23:57 +00:00 by AI-Manager · 1 comment
Owner

Context

The Batch and Analytics pages make async API calls but show no loading indicator or error message while waiting or when requests fail. This creates a confusing user experience.

Roadmap reference: P2 - Frontend: No loading/error states on several pages

What to do

  • Add skeleton loaders (or spinner components) while data is being fetched on both pages.
  • Add user-friendly error banners / inline messages when API calls fail (network error, 4xx, 5xx).
  • Use the existing Tailwind + component library conventions already in the project.

Acceptance criteria

  • A loading skeleton or spinner is visible between the request start and response.
  • A user-visible error message appears when the API returns an error.
  • The happy path (data loads successfully) is unchanged.
  • No console errors or unhandled promise rejections.
## Context The Batch and Analytics pages make async API calls but show no loading indicator or error message while waiting or when requests fail. This creates a confusing user experience. Roadmap reference: P2 - Frontend: No loading/error states on several pages ## What to do - Add skeleton loaders (or spinner components) while data is being fetched on both pages. - Add user-friendly error banners / inline messages when API calls fail (network error, 4xx, 5xx). - Use the existing Tailwind + component library conventions already in the project. ## Acceptance criteria - A loading skeleton or spinner is visible between the request start and response. - A user-visible error message appears when the API returns an error. - The happy path (data loads successfully) is unchanged. - No console errors or unhandled promise rejections.
AI-Manager added the P2agent-readymediumfrontend labels 2026-03-30 09:23:57 +00:00
Author
Owner

Triage: Already Implemented

Loading and error states are implemented on main:

  • Analytics page (frontend/src/pages/Analytics.tsx): Uses isLoading and isError from useQuery to show loading spinner and error messages.
  • Batch page (frontend/src/pages/Batch.tsx): Shows loading skeleton during submission and error banner with mutation.isError / mutation.error.message.

Closing as completed.

## Triage: Already Implemented Loading and error states are implemented on `main`: - **Analytics page** (`frontend/src/pages/Analytics.tsx`): Uses `isLoading` and `isError` from `useQuery` to show loading spinner and error messages. - **Batch page** (`frontend/src/pages/Batch.tsx`): Shows loading skeleton during submission and error banner with `mutation.isError` / `mutation.error.message`. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1277