Skip to content

UI: Add a modern dashboard loading spinner during API fetch requests#1402

Open
knoxiboy wants to merge 2 commits into
aryandas2911:mainfrom
knoxiboy:feature/issue-1300-loading-spinner
Open

UI: Add a modern dashboard loading spinner during API fetch requests#1402
knoxiboy wants to merge 2 commits into
aryandas2911:mainfrom
knoxiboy:feature/issue-1300-loading-spinner

Conversation

@knoxiboy
Copy link
Copy Markdown

@knoxiboy knoxiboy commented Jun 1, 2026

🐞 Description

Resolves #1300.
Adds a loading state to task fetching and surfaces it in the Dashboard, displaying a modern animated spinner instead of an empty screen while data is retrieved.

💻 Expected Behavior

  • Extracts loading state from useTasks hook.
  • Conditionally renders a reusable LoadingSpinner component while loading is true.
  • Integrated role=status and aria-live=polite tags for optimal accessibility.

🖼️ Screenshots / Logs (if applicable)

N/A

✅ Checklist

  • Added generic LoadingSpinner component
  • Implemented loading state toggle during API fetch operations
  • Added ARIA accessibility tags to the spinner
  • Tested locally

Copilot AI review requested due to automatic review settings June 1, 2026 08:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a loading state to task fetching and surfaces it in the Dashboard to display a spinner while tasks are being loaded.

Changes:

  • Extend useTasks to expose a loading boolean and manage it around getTasks().
  • Update Dashboard to render a LoadingSpinner while tasks are loading.
  • Introduce a reusable LoadingSpinner component.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
frontend/src/pages/Dashboard.jsx Uses useTasks().loading to conditionally render a spinner vs. the stats content
frontend/src/hooks/useTasks.js Adds and returns loading state, toggled around task fetch lifecycle
frontend/src/components/common/LoadingSpinner.jsx New shared spinner component for loading UI

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/pages/Dashboard.jsx
Comment thread frontend/src/components/common/LoadingSpinner.jsx Outdated
Comment thread frontend/src/components/common/LoadingSpinner.jsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI/UX] Add a modern dashboard loading spinner during API fetch requests

2 participants