fix(ui): persist 7d/30d window toggle in URL on /status and /endpoints#4956
fix(ui): persist 7d/30d window toggle in URL on /status and /endpoints#4956joaovictor91123 wants to merge 1 commit into
Conversation
The RecentIncidents panel on /status and ProxyUsagePanel on /endpoints
each held their 7d/30d selection in local useState, resetting to 7d on
every reload and making the selected window invisible to back/forward
navigation or link-sharing. /explorer already does this correctly via
explorerSearchSchema.
- status.tsx: add `window` to statusSearchSchema; replace useState with
Route.useSearch() + useNavigate matching the explorer pattern
- endpoints.tsx: add `proxy_window` to endpointsSearchSchema
- rpc-proxy.tsx: replace useState with useSearch({ from: '/endpoints' })
+ useNavigate so ProxyUsagePanel reads and writes the URL param
Closes JSONbored#3976
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4956 +/- ##
=======================================
Coverage 97.94% 97.94%
=======================================
Files 163 163
Lines 19418 19418
Branches 7376 7376
=======================================
Hits 19018 19018
Misses 53 53
Partials 347 347 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-13 00:44:06 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 7 non-blocking
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
JSONbored
left a comment
There was a problem hiding this comment.
Screenshots are not correctly submitted/different sizes in before + after. Please fix + resubmit, using the AI skill found in the repo (contains all instructions your AI harness needs to correctly submit visual evidence in the exact sizes/formats required).

Summary
RecentIncidents(status.tsx) used plainuseState— the selected window reset on every reload, couldn't be shared or bookmarked.ProxyUsagePanel(rpc-proxy.tsx) on/endpoints./exploreralready uses (explorerSearchSchema→Route.useSearch()+navigate).Changes:
apps/ui/src/routes/status.tsx— addwindowtostatusSearchSchema;RecentIncidentsreadsRoute.useSearch().windowand writesnavigate({ search: (prev) => ({ ...prev, window: w }) })apps/ui/src/routes/endpoints.tsx— addproxy_windowtoendpointsSearchSchemaapps/ui/src/components/metagraphed/rpc-proxy.tsx— replaceuseStatewithuseSearch({ from: '/endpoints' })+useNavigate, matching the pattern already used instatus-diagnostics.tsxCloses #3976
Gates
Screenshots
The key behavioral difference is the URL: before, toggling to 30d left the URL unchanged (
/status); after, it updates to/status?window=30dso the window survives reload and sharing./status — RecentIncidents panel
?window=30d)/endpoints — ProxyUsagePanel
?proxy_window=30d)