Skip to content

Manual refresh button#70

Merged
DavidASix merged 9 commits into
mainfrom
staging
Oct 6, 2025
Merged

Manual refresh button#70
DavidASix merged 9 commits into
mainfrom
staging

Conversation

@DavidASix

Copy link
Copy Markdown
Owner

PR #68 #69

Copilot AI review requested due to automatic review settings October 6, 2025 20:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a manual refresh button functionality for business details pages, allowing users to manually update Google business data including reviews and statistics. The implementation consolidates existing update endpoints into a unified refresh mechanism while adding UI improvements with tooltips and better data display.

  • Adds a new unified refresh endpoint that updates both business stats and reviews
  • Removes separate update endpoints for reviews and business stats
  • Adds tooltip component and enhanced UI with refresh button and additional business metrics
  • Updates the update functions to accept configurable review fetch counts

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/lib/server/google/update.ts Modified updateBusinessReviews to accept optional reviewsToFetch parameter
src/components/ui/tooltip.tsx New tooltip component using Radix UI primitives
src/app/api/google/update-reviews/route.ts Removed old update reviews endpoint
src/app/api/google/update-business-stats/schema.ts Removed old update business stats schema
src/app/api/google/update-business-stats/route.ts Removed old update business stats endpoint
src/app/api/google/refresh-business-details/schema.ts New schema for unified refresh endpoint
src/app/api/google/refresh-business-details/route.ts New unified refresh endpoint implementation
src/app/api/google/insert-new-business/route.ts Updated to use new reviewsToFetch parameter
src/app/api/google/get-business-details/schema.ts Added available_reviews and last_refreshed fields
src/app/api/google/get-business-details/route.ts Enhanced to return additional business metrics
src/app/(product)/google-reviews/[id]/page.tsx Added refresh button, tooltips, and additional business metrics display
package.json Added @radix-ui/react-tooltip dependency

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/app/api/google/refresh-business-details/route.ts
@DavidASix
DavidASix merged commit 9f6b233 into main Oct 6, 2025
3 checks passed
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.

2 participants