feat: filter/exclude/copy actions on attribute values#1850
feat: filter/exclude/copy actions on attribute values#1850alex-fedotyev wants to merge 6 commits intomainfrom
Conversation
Add click-to-action popover on PropertyComparisonChart bars with Filter, Exclude, and Copy buttons. Implement flattenedKeyToSqlExpression and flattenedKeyToFilterKey utilities to convert dot-notation property keys (from flattenData) into ClickHouse bracket notation for Map columns, enabling correct filter integration with the search sidebar. Wire onAddFilter through DBDeltaChart -> DBSearchHeatmapChart -> DBSearchPage, clearing heatmap selection after applying a filter. Closes #1829 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 5855a2a The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @alex-fedotyev's task in 1m 29s —— View job PR ReviewGood feature addition with solid test coverage. A few minor issues to address:
✅ Key conversion logic is correct and well-tested (SQL injection escaping, 0→1-based index conversion, |
E2E Test Results✅ All tests passed • 86 passed • 3 skipped • 905s
Tests ran across 4 shards in parallel. |
Store timeout ID in a ref and clear it on unmount to avoid setCopiedValue firing after component is unmounted. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @alex-fedotyev's task in 36s —— View job PR Review✅ The Two remaining minor items:
No critical bugs or security issues. The key conversion logic, SQL-injection escaping, and test coverage are solid. |
- Clamp popover left position to keep it within viewport edges - Flip popover below click point when near the top of the viewport - Add comment explaining why flattenedKeyToFilterKey is intentionally separate from flattenedKeyToSqlExpression (future divergence) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @alex-fedotyev's task in 23s —— View job PR Review✅ No critical issues found. The two previously flagged items are addressed:
Code is clean, tests are solid, no security issues or project pattern violations. |
|
Claude finished @alex-fedotyev's task in 22s —— View job PR Review✅ No critical issues found. All previously flagged items have been resolved:
Code is clean, tests are solid, no security issues or pattern violations. |
Set allowEscapeViewBox x to false so Recharts keeps the tooltip within the chart's horizontal bounds. Vertical escape remains enabled for tall tooltips. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @alex-fedotyev's task in 20s —— View job PR Review✅ No critical issues found. All previously flagged items have been resolved:
Code is clean, tests are solid, no security issues or pattern violations. |
|
This PR currently has a merge conflict. Please resolve this and then re-add the |
Resolve conflicts: keep both onAddFilter (filter-actions) and spanIdExpression (sampling, merged via #1849) props. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @alex-fedotyev's task in 50s —— View job PR Review✅ No critical issues found. All previously flagged items have been resolved:
One minor style nit: Everything else looks clean — filter key conversion, SQL injection escaping, test coverage, and portal-based popover dismissal are all solid. |
Summary
Closes #1829
Adds interactive filter/exclude/copy actions to the Event Deltas attribute comparison charts:
setFilterValue) to include or exclude an attribute value from results. After applying a filter, the heatmap selection is automatically cleared.flattenedKeyToSqlExpressionandflattenedKeyToFilterKeyfunctions convert dot-notation property keys (produced byflattenData()) into ClickHouse bracket notation for Map columns (e.g.,ResourceAttributes.service.name->ResourceAttributes['service.name']), enabling correct filter integration.Changes
deltaChartUtils.ts-- AddedescapeRegExp,flattenedKeyToSqlExpression,flattenedKeyToFilterKey, andAddFilterFntypePropertyComparisonChart.tsx-- Added click handler, popover with Filter/Exclude/Copy actions usingcreatePortalDBDeltaChart.tsx-- AddedonAddFilterprop,handleAddFiltercallback wrapping key conversion, re-exportedAddFilterFnDBSearchHeatmapChart.tsx-- AddedonAddFilterprop,handleAddFilterAndClearSelectioncallbackDBSearchPage.tsx-- PassedsearchFilters.setFilterValueasonAddFiltertoDBSearchHeatmapChartdeltaChartFilterKeys.test.tswith 16 tests for key conversion functionsTest plan
flattenedKeyToSqlExpressionandflattenedKeyToFilterKey(Map columns, Array(Map) columns, simple columns, LowCardinality wrappers, SQL injection escaping)🤖 Generated with Claude Code