Conversation
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #68 #69