Skip to content

Add Data Loading States to Management Tables #81

Description

@Lakes41

Difficulty: Advanced

Type: Refactor

Summary

Add consistent loading, empty, error, and retry states to dashboard management tables so failed or slow requests do not silently fall back to stale mock data.

Current Behaviour

Pages such as passes and members initialise from mock data, then fetch API data inside useEffect. If a fetch fails, the page logs a warning and continues showing the initial mock records. This makes it difficult for users to know whether they are viewing current data, fallback data, or failed live data.

Expected Behaviour

Management pages should clearly communicate data loading state. Users should see loading skeletons, empty states, explicit errors, and retry actions where appropriate. Mock fallback should be labelled when used intentionally.

Suggested Implementation

Create reusable table state components for loading, empty, error, and fallback notices. Update passes, members, guilds, activity, and dashboard summary sections to use these states. Track whether data came from the API, mock fallback, or local initial state. Add retry handlers for failed requests.

Files or Areas Likely Affected

  • apps/dashboard/app/dashboard/page.tsx
  • apps/dashboard/app/passes/page.tsx
  • apps/dashboard/app/members/page.tsx
  • apps/dashboard/app/guilds/page.tsx
  • apps/dashboard/app/activity/page.tsx
  • apps/dashboard/components/
  • apps/dashboard/test/

Acceptance Criteria

  • Passes table shows a loading state before API data resolves.
  • Members table shows a loading state before API data resolves.
  • Empty API responses show intentional empty states.
  • Failed API requests show visible error states with retry actions.
  • Mock fallback is clearly labelled when used.
  • Tests cover loading, empty, error, retry, and fallback states.

Additional Notes

This issue should not change the backend data model. It only improves client state clarity and user trust.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions