Add URL query-parameter filtering for dashboards - #49
Merged
TanayBensuYurtturk merged 6 commits intoJul 28, 2026
Conversation
Filters are read from and written back to the URL, so a filtered dashboard view is a shareable link. Select values from the URL are validated against the filter's options and ignored if not valid.
TanayBensuYurtturk
force-pushed
the
TanayBensuYurtturk/dashboard-url-filters
branch
from
July 27, 2026 14:15
a431701 to
8468fed
Compare
Reject non-finite numbers and impossible dates from the URL, and encode multi-select as repeated params so option values containing commas survive.
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
frontend/src/components/DashboardView.tsx:149
**Local state shadows URL changes**
When a viewer edits a filter and then navigates to the same dashboard with different query parameters, the non-null local `filters` state continues to override the recomputed `baseFilters`, causing the controls and widget queries to use values that disagree with the visible URL.
Reviews (1): Last reviewed commit: "Harden URL filter parsing and use repeat..." | Re-trigger Greptile |
Local filter overrides are dropped when the URL query string changes on its own (navigating to the same dashboard with different params), while a self-write guard preserves in-progress input during the user's own edits.
Prompt To Fix All With AI### Issue 1
frontend/src/components/DashboardView.tsx:266
**Concurrent URL writes drop filters**
When two filter controls invoke this handler before the first URL update causes a rerender, both calls clone the same render-time search parameters. The second write drops the first changed parameter while local state retains both filters, so copying or reloading the URL loses an active filter.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (2): Last reviewed commit: "Re-apply URL filters on external navigat..." | Re-trigger Greptile |
Filter edits accumulate in local state and a single effect mirrors the whole set to the URL, so concurrent changes never drop a param and external URL changes re-seed the filters while in-progress input is preserved.
Prompt To Fix All With AI### Issue 1
frontend/src/components/DashboardView.tsx:211
**Persistent marker ignores navigation**
When an external navigation returns to the same query string as the most recent local URL write while local filter state differs, this persistent marker classifies it as the original self-write and skips clearing `filters`, causing the controls and widget queries to remain out of sync with the navigated URL.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (3): Last reviewed commit: "Sync dashboard filters with the URL via ..." | Re-trigger Greptile |
|
Reviews (4): Last reviewed commit: "Keep the self-write marker in sync so na..." | Re-trigger Greptile |
The projection effect now records the current filter query string even when the URL is already up to date, so an external navigation back to an older string is no longer mistaken for our own write.
TanayBensuYurtturk
force-pushed
the
TanayBensuYurtturk/dashboard-url-filters
branch
from
July 28, 2026 06:16
14e051c to
aa03e1b
Compare
|
Reviews (5): Last reviewed commit: "Keep the self-write marker in sync so na..." | Re-trigger Greptile |
terzioglub
approved these changes
Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dashboards can now be filtered straight from the URL, so a filtered view is a shareable link (e.g.
?region=Europe&date_range=last_30_days). Filter values sync both ways with the URL, andselect/date/numbervalues from the URL are validated so anything invalid or injected is ignored and falls back to the default.