Skip to content

Force refresh button#206

Open
shambavi2007 wants to merge 7 commits into
JhaSourav07:mainfrom
shambavi2007:force-refresh-button
Open

Force refresh button#206
shambavi2007 wants to merge 7 commits into
JhaSourav07:mainfrom
shambavi2007:force-refresh-button

Conversation

@shambavi2007
Copy link
Copy Markdown

Description

Fixes #153

Added a Force Refresh Data button to the dashboard UI.

###Changes Made:

  • Added RefreshCw icon using lucide-react
  • Added dashboard refresh functionality using refresh=true
  • Added loading spinner animation while refreshing
  • Added success toast notification using Sonner after fresh data loads
  • Refetched dashboard data bypassing cache

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

Before

Screenshot 2026-05-19 114636

After

Screenshot 2026-05-19 143359

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally.
  • I have run npm run format and npm run lint locally and resolved all errors.
  • My commits follow the Conventional Commits format.
  • I have updated README.md if I added a new theme or URL parameter.
  • I have starred the repo.
  • I have made sure that i have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard.
  • I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 19, 2026

@shambavi2007 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

👋 Hey @shambavi2007, welcome to CommitPulse! 🎉

Thanks for opening your first pull request — this is a big deal and we appreciate the effort!

While you wait for a review, please double-check:

  • ✅ You've read the CONTRIBUTING.md checklist
  • npm run lint, npm run format, and npm run test all pass locally
  • ✅ Your PR has a visual preview if it touches any SVG output
  • 💬 You've joined our Discord for faster PR feedback

A maintainer will review your PR shortly. Hang tight! 🚀

@Aamod007
Copy link
Copy Markdown

Two things to fix before we merge:

  1. The spinner won't actually show You're setting the loading state and then immediately doing a full page redirect with window.location.href. The browser unloads the page before React can re-render, so the spinner just flashes and disappears.
    If you want the spinner to be visible, swap window.location.href for router.push() from next/navigation. That keeps the React tree alive long enough for the loading state to render before the server component re-fetches.
  2. The test is breaking typecheck The dashboard page now expects a searchParams prop, but the test only passes params. Just add searchParams: Promise.resolve({}) to the test call on line 86 and the error goes away.

Better to have: Add disabled={loading} to the button. If someone double-clicks it fast, it fires two navigations.

@Aamod007
Copy link
Copy Markdown

@shambavi2007 nice work on this. The refresh button looks great and the latest fixes are solid. Everything is passing locally and ready to go. Thanks for the quick updates!

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.

Add "Force Refresh Data" Button to the Dashboard

2 participants