feat(similarweb): add page views tool, fix paid referrals field mismatch#5354
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Fixes website overview For non-overview operations, start date, end date, and main domain only are moved to advanced mode in the block UI. Reviewed by Cursor Bugbot for commit 88c83f4. Configure here. |
Greptile SummaryThis PR adds a new
Confidence Score: 5/5Purely additive change — new tool and a narrow bug fix with no removed or renamed fields. The paidReferrals fix is a correctly ordered lookup chain that adds a new key without touching the existing ones. The new page_views tool faithfully mirrors the sibling tool structure, handles the documented API key inconsistency defensively, and is wired into the registry and block in all the right places. No existing behavior is altered. No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "fix(similarweb): accept both page_views ..." | Re-trigger Greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 641b39a. Configure here.
- Add similarweb_page_views tool (Total Page Views, Desktop & Mobile) - Fix paidReferrals in website overview: API Lite response key is literally "paid _referrals" (space before underscore), not caught by the existing fallback chain, so it always resolved to null - Move startDate/endDate/mainDomainOnly to advanced mode
…esponse Cursor Bugbot and Greptile both flagged the response field as page_views by convention, but SimilarWeb's own docs example response uses pages_views for this specific endpoint. Accept both spellings defensively so the tool works regardless of which is actually returned.
641b39a to
88c83f4
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 88c83f4. Configure here.
Summary
similarweb_page_viewstool (Total Page Views, Desktop & Mobile) — the one clearly-missing endpoint matching the existing "one clean Total operation per metric" patternpaidReferralsin the website overview tool: the API Lite response key is literallypaid _referrals(space before underscore), which the fallback chain wasn't checking, so this field always resolved tonullstartDate,endDate,mainDomainOnly) to advanced mode per block-authoring conventionsType of Change
Testing
Validated all 6 tools against live Similarweb API docs (URL paths, params, response field mapping) via independent parallel audits; confirmed 100% backwards compatible (purely additive diff, no removed/renamed fields);
biome checkandtsc --noEmitclean.Checklist