René's URL Explorer Experiment


Title: feat(site): add DateRangePicker to analytics page by DanielleMaywood · Pull Request #23992 · coder/coder · GitHub

Open Graph Title: feat(site): add DateRangePicker to analytics page by DanielleMaywood · Pull Request #23992 · coder/coder

X Title: feat(site): add DateRangePicker to analytics page by DanielleMaywood · Pull Request #23992 · coder/coder

Description: 🤖 This PR was written by Coder Agent on behalf of Danielle Maywood 🤖 PR 3/4 in a stack to unify agent settings pages. What Replaces the fixed 30-day date range on the analytics page with a URL search param–driven DateRangePicker, and extracts a shared date utility. Why The analytics page previously hardcoded a 30-day lookback with no way to change it. Adding the same DateRangePicker component already used on the Spend page (PR 4) lets users select custom date ranges. Persisting the selection in URL search params (startDate/endDate) means the range survives page refreshes and can be shared via URL. The date utility extraction addresses a duplication issue: both the analytics and spend pages need to detect exclusive-midnight end dates (the date picker uses midnight of the following day as the exclusive upper bound) and adjust the display by −1 ms. This logic was duplicated inline in both view components. utils/dateRange.ts provides isMidnight and toInclusiveDateRange as a single source of truth. Changes AgentAnalyticsPage — parses startDate/endDate from URL search params, validates them, falls back to the default 30-day range. Passes onDateRangeChange that updates the URL params and resets to page 1. AgentAnalyticsPageView — uses toInclusiveDateRange() from the new utility instead of inline midnight detection. Adds SectionHeader for consistent page headings. utils/dateRange.ts — isMidnight(date) predicate and toInclusiveDateRange(dateRange, hasExplicitDateRange) helper. formatUsageDateRange will be added in PR 4 when it gains its first consumer. Layout standardization — ChatModelAdminPanel and MCPServerAdminPanel changed from space-y-3 to space-y-6 to match the vertical rhythm used across the other settings pages. PRInsightsView gains a SectionHeader with AdminBadge for consistency. Stack CollapsibleSection + shared fixes (#23990) Behavior page CollapsibleSection cards (#23991) ➡️ This PR — Analytics DateRangePicker Unified Spend page (#24093)

Open Graph Description: 🤖 This PR was written by Coder Agent on behalf of Danielle Maywood 🤖 PR 3/4 in a stack to unify agent settings pages. What Replaces the fixed 30-day date range on the analytics page with a URL sea...

X Description: 🤖 This PR was written by Coder Agent on behalf of Danielle Maywood 🤖 PR 3/4 in a stack to unify agent settings pages. What Replaces the fixed 30-day date range on the analytics page with a URL sea...

Opengraph URL: https://github.com/coder/coder/pull/23992

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:1dc7f3e8-c95e-10e4-ea7a-f2c63cd5062b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id972C:240CD1:238425E:2D1F7E8:6B0183B1
html-safe-nonce399a661bcd8f05a702982fdbe88ed1ce13230817e0366d4565aefb9ee3d90fc1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzJDOjI0MENEMToyMzg0MjVFOjJEMUY3RTg6NkIwMTgzQjEiLCJ2aXNpdG9yX2lkIjoiMzAzNjQ0ODgzODE5MDcyODExMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac356adc6d595b87b1d594a7945b2aceb786e39673e3eca633ffca703d20022548
hovercard-subject-tagpull_request:3483368531
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/coder/coder/pull/23992/files
twitter:imagehttps://avatars.githubusercontent.com/u/40153966?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40153966?s=400&v=4
og:image:alt🤖 This PR was written by Coder Agent on behalf of Danielle Maywood 🤖 PR 3/4 in a stack to unify agent settings pages. What Replaces the fixed 30-day date range on the analytics page with a URL sea...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/coder/coder/pull/23992/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fpull%2F23992%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fpull%2F23992%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/pull/23992/files
Reloadhttps://github.com/coder/coder/pull/23992/files
Reloadhttps://github.com/coder/coder/pull/23992/files
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fcoder%2Fcoder%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcoder%2Fcoder%2Fissues%2Fnew%2Fchoose
DanielleMaywoodhttps://github.com/DanielleMaywood
danielle/behavior-collapsiblehttps://github.com/coder/coder/tree/danielle/behavior-collapsible
danielle/analytics-datepickerhttps://github.com/coder/coder/tree/danielle/analytics-datepicker
Conversation 0 https://github.com/coder/coder/pull/23992
Commits 1 https://github.com/coder/coder/pull/23992/commits
Checks 48 https://github.com/coder/coder/pull/23992/checks
Files changed https://github.com/coder/coder/pull/23992/files
Please reload this pagehttps://github.com/coder/coder/pull/23992/files
feat(site): add DateRangePicker to analytics page https://github.com/coder/coder/pull/23992/files#top
Show all changes 1 commit https://github.com/coder/coder/pull/23992/files
37b0cbb feat(site): add DateRangePicker to analytics page DanielleMaywood Apr 2, 2026 https://github.com/coder/coder/pull/23992/commits/37b0cbbcb778e178248b2117b76773744e5ca6c6
Clear filters https://github.com/coder/coder/pull/23992/files
Please reload this pagehttps://github.com/coder/coder/pull/23992/files
Please reload this pagehttps://github.com/coder/coder/pull/23992/files
AgentAnalyticsPage.tsx https://github.com/coder/coder/pull/23992/files#diff-0ab916637ed670a595cdd050c5800de906c179fc3b90ee21adfb7cff737078c3
AgentAnalyticsPageView.tsx https://github.com/coder/coder/pull/23992/files#diff-d0dcd86e20ece5188a1aae8261025895380806cd4ee6be9caff3427dea0dc16c
ChatModelAdminPanel.tsx https://github.com/coder/coder/pull/23992/files#diff-9a6c0b6a25a2c15f93b4a21aa9ad9786d64964f36f9b823ee2cef0c7f94f416b
MCPServerAdminPanel.tsx https://github.com/coder/coder/pull/23992/files#diff-4bafcdd8498d77e6c004d2be17d29e1224927fa0c0937fe4164bd546bf72c1a9
PRInsightsView.tsx https://github.com/coder/coder/pull/23992/files#diff-c546c62599c5ce15fe1834f3ebbf50bb5b2154bccf60099f5ac872d67cefb6bc
dateRange.ts https://github.com/coder/coder/pull/23992/files#diff-10c9974b7eca9b1544822f4f68ca0d74531bbfa797ad3be8f33ee239c3f9f31b
site/src/pages/AgentsPage/AgentAnalyticsPage.tsxhttps://github.com/coder/coder/pull/23992/files#diff-0ab916637ed670a595cdd050c5800de906c179fc3b90ee21adfb7cff737078c3
View file https://github.com/coder/coder/blob/37b0cbbcb778e178248b2117b76773744e5ca6c6/site/src/pages/AgentsPage/AgentAnalyticsPage.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/23992/{{ revealButtonHref }}
https://github.com/coder/coder/pull/23992/files#diff-0ab916637ed670a595cdd050c5800de906c179fc3b90ee21adfb7cff737078c3
https://github.com/coder/coder/pull/23992/files#diff-0ab916637ed670a595cdd050c5800de906c179fc3b90ee21adfb7cff737078c3
https://github.com/coder/coder/pull/23992/files#diff-0ab916637ed670a595cdd050c5800de906c179fc3b90ee21adfb7cff737078c3
site/src/pages/AgentsPage/AgentAnalyticsPageView.tsxhttps://github.com/coder/coder/pull/23992/files#diff-d0dcd86e20ece5188a1aae8261025895380806cd4ee6be9caff3427dea0dc16c
View file https://github.com/coder/coder/blob/37b0cbbcb778e178248b2117b76773744e5ca6c6/site/src/pages/AgentsPage/AgentAnalyticsPageView.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/23992/{{ revealButtonHref }}
https://github.com/coder/coder/pull/23992/files#diff-d0dcd86e20ece5188a1aae8261025895380806cd4ee6be9caff3427dea0dc16c
site/src/pages/AgentsPage/components/ChatModelAdminPanel/ChatModelAdminPanel.tsxhttps://github.com/coder/coder/pull/23992/files#diff-9a6c0b6a25a2c15f93b4a21aa9ad9786d64964f36f9b823ee2cef0c7f94f416b
View file https://github.com/coder/coder/blob/37b0cbbcb778e178248b2117b76773744e5ca6c6/site/src/pages/AgentsPage/components/ChatModelAdminPanel/ChatModelAdminPanel.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/23992/{{ revealButtonHref }}
https://github.com/coder/coder/pull/23992/files#diff-9a6c0b6a25a2c15f93b4a21aa9ad9786d64964f36f9b823ee2cef0c7f94f416b
https://github.com/coder/coder/pull/23992/files#diff-9a6c0b6a25a2c15f93b4a21aa9ad9786d64964f36f9b823ee2cef0c7f94f416b
site/src/pages/AgentsPage/components/MCPServerAdminPanel.tsxhttps://github.com/coder/coder/pull/23992/files#diff-4bafcdd8498d77e6c004d2be17d29e1224927fa0c0937fe4164bd546bf72c1a9
View file https://github.com/coder/coder/blob/37b0cbbcb778e178248b2117b76773744e5ca6c6/site/src/pages/AgentsPage/components/MCPServerAdminPanel.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/23992/{{ revealButtonHref }}
https://github.com/coder/coder/pull/23992/files#diff-4bafcdd8498d77e6c004d2be17d29e1224927fa0c0937fe4164bd546bf72c1a9
https://github.com/coder/coder/pull/23992/files#diff-4bafcdd8498d77e6c004d2be17d29e1224927fa0c0937fe4164bd546bf72c1a9
site/src/pages/AgentsPage/components/PRInsightsView.tsxhttps://github.com/coder/coder/pull/23992/files#diff-c546c62599c5ce15fe1834f3ebbf50bb5b2154bccf60099f5ac872d67cefb6bc
View file https://github.com/coder/coder/blob/37b0cbbcb778e178248b2117b76773744e5ca6c6/site/src/pages/AgentsPage/components/PRInsightsView.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/23992/{{ revealButtonHref }}
https://github.com/coder/coder/pull/23992/files#diff-c546c62599c5ce15fe1834f3ebbf50bb5b2154bccf60099f5ac872d67cefb6bc
https://github.com/coder/coder/pull/23992/files#diff-c546c62599c5ce15fe1834f3ebbf50bb5b2154bccf60099f5ac872d67cefb6bc
https://github.com/coder/coder/pull/23992/files#diff-c546c62599c5ce15fe1834f3ebbf50bb5b2154bccf60099f5ac872d67cefb6bc
https://github.com/coder/coder/pull/23992/files#diff-c546c62599c5ce15fe1834f3ebbf50bb5b2154bccf60099f5ac872d67cefb6bc
https://github.com/coder/coder/pull/23992/files#diff-c546c62599c5ce15fe1834f3ebbf50bb5b2154bccf60099f5ac872d67cefb6bc
https://github.com/coder/coder/pull/23992/files#diff-c546c62599c5ce15fe1834f3ebbf50bb5b2154bccf60099f5ac872d67cefb6bc
site/src/pages/AgentsPage/utils/dateRange.tshttps://github.com/coder/coder/pull/23992/files#diff-10c9974b7eca9b1544822f4f68ca0d74531bbfa797ad3be8f33ee239c3f9f31b
View file https://github.com/coder/coder/blob/37b0cbbcb778e178248b2117b76773744e5ca6c6/site/src/pages/AgentsPage/utils/dateRange.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/23992/{{ revealButtonHref }}
Please reload this pagehttps://github.com/coder/coder/pull/23992/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.