feat: add check activity column to provider tables#213
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adds a "Check Activity" column to provider tables that links to PDP Scan explorer for viewing provider activity. The implementation introduces a utility function to construct PDP Scan URLs and enriches provider data during the fetch process.
Changes:
- Added
getCheckActivityUrlutility function to construct PDP Scan URLs for providers - Made
checkActivityUrla required field in the provider schema - Updated provider enrichment logic to populate the
checkActivityUrlfield - Enabled the "Check Activity" column in both warm storage and service provider tables
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/provider-urls.ts | New utility function to construct PDP Scan activity URLs |
| src/services/providers/types.ts | Renamed type and updated to exclude both softwareVersion and checkActivityUrl from base data |
| src/services/providers/processor.ts | Updated type reference from ProviderWithoutSoftwareVersion to BaseProviderData |
| src/services/providers/index.ts | Renamed enrichment function and added checkActivityUrl population logic |
| src/services/providers/contract.ts | Updated type references to use BaseProviderData |
| src/schemas/provider-schema.ts | Changed checkActivityUrl from optional to required field |
| src/app/warm-storage-service/data/column-definition.tsx | Uncommented and enabled Check Activity column |
| src/app/service-providers/data/column-definition.tsx | Uncommented and enabled Check Activity column |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const checkActivityUrl = getCheckActivityUrl( | ||
| network, | ||
| provider.payeeAddress, | ||
| ) |
There was a problem hiding this comment.
The checkActivityUrl is computed for every provider in a batch, but this is a synchronous operation that doesn't need to be inside the async map. Consider moving it outside the Promise.all to improve clarity and potentially performance, or compute it in a separate pass before the async operations.
There was a problem hiding this comment.
I agree that this is synchronous operation but separation would require two iterations without meaningful benefit
barbaraperic
left a comment
There was a problem hiding this comment.
Left a few tiny comment, looks good to me ☀️
|
@barbaraperic Can this PR be merged now, given that your comments has been addressed? |
Looks good to me 👍 |
📝 Description
This PR adds a "Check Activity" column to both the warm storage service and service providers table, allowing users to view provider activity on pdp scan directly from the providers table.
🛠️ Key Changes
checkActivityUrlfield to provider schema - Made it a required fieldgetCheckActivityUrlutility function - Url construction logiccheckActivityUrlduring provider fetchingCheck Activitycolumn in warm storage and service providers table📸 Screenshots
Closes #131