-
[NA] [FE] feat: quick-filter on trace/span attributes from the inspect panel (#7185)
发布于
2026-06-29 10:49:30 +00:00 - [NA] [FE] feat: quick-filter on trace/span attributes from the inspect panel
Add a "+" affordance on each attribute line of the Metadata/Input/Output
code viewers (Details tab). Clicking it opens an approval modal (operator +
value, Apply/Cancel) that seeds the matching filter:- Metadata keys -> metadata dictionary filter (path as key)
- Input/Output keys -> custom filter (input./output.-prefixed key)
- A span's provider -> the dedicated, stored provider field (spans only);
a trace's computed "providers" aggregate is not offered (no stored column)
Attribute paths/values are resolved from the CodeMirror JSON/YAML syntax tree
so the raw code view is preserved. Adds a Provider chip to the Spans tab.- feat(filter-chips): refine quick-filter UX and track usage
- inherit the chip's defaultOperator when seeding (metadata/custom/provider
now default to "contains"), mirroring the chip popover - use the standard ListFilter icon instead of "+", faintly visible at rest
- order the filter icon before the fold control consistently (side: -1)
- emit opik_quick_filter_applied on apply with data_type (traces/spans) and
source (metadata/input/output) dimensions - harden tests: build fixtures from the real operator constants and assert
the BI event payload
- fix(filter-chips): apply UX feedback on quick-filter affordance
- icon + fold chevron recolored to muted-slate, primary-blue on hover
- tooltip "Filter by this attribute" styled like the app tooltip and
portaled to so CodeMirror overflow never clips it (flips
above/below to stay on-screen) - hovering the icon highlights the attribute value in primary-blue so the
user sees exactly what will be filtered - one-click apply with the "contains" operator; the confirmation modal
(QuickFilterDialog) is removed, the chip stays editable for refinement - guard the hover dispatch against a destroyed view and clear the tooltip
on widget/plugin teardown (review fixes)
The opik_quick_filter_applied BI event still fires on apply.
-
refactor(filter-chips): extract shared getRows helper
-
feat(filter-chips): confirm quick-filter with 'Filter applied' tooltip
-
fix(filter-chips): address review — per-editor tooltip, stable quick-filter api, parser hardening
- own the quick-filter tooltip per CodeMirror editor (no shared module singleton/leak); timer-driven 'Filter applied' confirmation
- stabilize the quick-filter api: read chip values via ref + memoize useFilterChipsAnalytics return so applyValue/pinChip (and the derived extension) stop rebuilding every render
- exclude YAML block scalars and empty values from filterable targets; document dotted/bracket-key path limitation
- declare @lezer/common; narrow onFilter to string; include table_id in QUICK_FILTER_APPLIED; drop redundant memo
- add tests: api referential stability, JSON/YAML offsets, flow-style YAML, nested arrays, block-scalar/empty/dotted-key cases
下载附件