Skip to content

feat: add refresh control, fallback cache, and last updated indicator to Market Intelligence#133

Merged
AshutoshDash1999 merged 9 commits into
AshutoshDash1999:masterfrom
SAYALI8106:feature/tech-news-refresh-fallback
Jun 9, 2026
Merged

feat: add refresh control, fallback cache, and last updated indicator to Market Intelligence#133
AshutoshDash1999 merged 9 commits into
AshutoshDash1999:masterfrom
SAYALI8106:feature/tech-news-refresh-fallback

Conversation

@SAYALI8106

@SAYALI8106 SAYALI8106 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR enhances the Market Intelligence (Tech News) section by implementing the requested improvements from Issue #129.

Changes Made

  • Added a manual refresh button using the existing RefreshCw icon.
  • Added a fallback mechanism that displays cached news when the API request fails.
  • Added a "Last Updated" indicator to show when news was last successfully fetched.
  • Added support for force-refreshing news while bypassing cache validation.
  • Improved the error state message to guide users toward refreshing.

Closes #129

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor (no behavior change)
  • Chore / tooling
  • UI polish

Screenshots / Screen Recording

image

How to Test

  1. Run the project locally.
  2. Open the dashboard.
  3. Navigate to the Market Intelligence section.
  4. Verify that a refresh button appears in the header.
  5. Click the refresh button and confirm fresh news is fetched.
  6. Verify that the "Updated" timestamp changes after a successful fetch.
  7. Simulate an API failure by disabling the network.
  8. Confirm cached news is displayed instead of an empty state.
  9. Clear local storage and simulate API failure again.
  10. Confirm the error message is displayed correctly.

Checklist

  • I linked the related issue, if one exists.
  • I assigned myself before opening the PR, if required.
  • npm run lint passes.
  • npm run typecheck passes.
  • npm run build succeeds.
  • I reviewed my own changes before requesting review.
  • I did not change unrelated files.
  • I updated documentation if needed.

@SAYALI8106

Copy link
Copy Markdown
Contributor Author

@AshutoshDash1999 Please review the PR.

Comment thread src/data/dashboard-mock.ts Outdated
Comment thread src/hooks/use-tech-news.ts Outdated
Comment thread public/manifest.json
@AshutoshDash1999 AshutoshDash1999 merged commit 64f063c into AshutoshDash1999:master Jun 9, 2026
5 checks passed
@AshutoshDash1999 AshutoshDash1999 added enhancement New feature or request level:advanced For advanced level PR gssoc:approved labels Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request gssoc:approved level:advanced For advanced level PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Enhance Market Intelligence Section with Category Filters, Refresh Control, and Improved News Sources

2 participants