Repository navigation
feat: Add button to remove stale dashboard URL filter params #3874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c3d9ca4
1db008a
fb5de32
d5dcd69
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@hyperdx/app': patch | ||
| --- | ||
|
|
||
| feat: add a "Remove ignored values from URL" button to the dashboard warning banner |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -286,7 +286,7 @@ | |
| // The document title comes from the saved dashboard, so it only changes | ||
| // once the rename has persisted. | ||
| const escaped = newName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); | ||
| await expect(this.page).toHaveTitle(new RegExp(`^${escaped} - `), { | ||
|
Check failure on line 289 in packages/app/tests/e2e/page-objects/DashboardPage.ts
|
||
| timeout: 10000, | ||
| }); | ||
| } | ||
|
|
@@ -2350,6 +2350,21 @@ | |
| .click(); | ||
| } | ||
|
|
||
| /** | ||
| * The ignored-URL-filters banner's "Remove ignored values from URL" button, which | ||
| * strips the stale `filters=` state and clears the banner in one click. | ||
| */ | ||
| get removeIgnoredUrlFiltersButton() { | ||
| return this.ignoredUrlFiltersBanner.getByTestId( | ||
| 'remove-ignored-url-filters-button', | ||
| ); | ||
| } | ||
|
|
||
| /** Click the banner's "Remove ignored values from URL" button. */ | ||
| async removeIgnoredUrlFilters() { | ||
| await this.removeIgnoredUrlFiltersButton.click(); | ||
| } | ||
|
|
||
| // ---- Chart annotation helpers ---- | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 P1 — Cleanup round-trip also silently drops
sqlURL entries thatparseQuerycan't parse, which the banner never listedparseDashboardFilterValues→serializeDashboardFilterValuesonly keepssqlentries thatparseQueryturns into IN/NOT IN/numeric BETWEEN (seepackages/common-utils/src/filters.ts:507anddashboardFilterValues.ts:93). An entry like{type:'sql', condition:"status = 'error'"}never shows up inignoredFilterExpressions, so the banner doesn't mention it, but clicking the button deletes it anyway. That breaks the doc comment's promise that only the listed values are removed. Fix: when nothing parseable changes, leave the rawsqlentries inprevas they are, or report entries that don't parse as ignored so the banner lists them too.Nothing blocks merge automatically, but a maintainer will expect this fixed if it is a real defect in code this PR changes. If it is about surrounding code, reply and say so instead of patching. Do not widen the PR. How to respond