Repository navigation
feat(web): add full date range picker to AI Traffic Analytics - #509
Conversation
There was a problem hiding this comment.
Welcome to Ansvisor, and thank you for your first PR! A maintainer will be by soon to review.
In the meantime, two things that make review faster:
- A short description of why the change matters, not just what it does — most of our PRs link a
Fixes #...to the issue that explains the why. - A quick local test note if there's anything worth eyeballing in the browser.
If you'd like to keep an eye on where Ansvisor goes next, a ⭐ on the repo helps others discover it (and Watch sends you a ping when related issues land). Either way — looking forward to your next one.
gkhngyk
left a comment
There was a problem hiding this comment.
Verified against #505's acceptance criteria and re-checked locally — all three surfaces share one resolved window, the pager resets on every range change, the labels are range-aware, and the missing-previous-window case is handled cleanly (delta falls back to the range label instead of a bogus percentage). The key={brand.id} remount is a nice simplification too. Thanks for the thorough work!
Summary
7d / 30d / 90dpicker with the full Insights-style bar:24h / 7d / 30d / 90d / All / Custom(with From/To inputs), defaulting to7d.getTrafficSummary,getTrafficTrend, andgetTrafficLogsto accept{ dateFrom?, dateTo? }instead ofdays, usingexpandDateToEndOfDayso custom To dates match Insights.Screenshots
Related issue
Closes #505
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsChecklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)