Skip to content

Analytics filter refinements#21

Open
tomerqodo wants to merge 10 commits intocursor_combined_20260121_qodo_grep_cursor_copilot_1_base_analytics_filter_refinements_pr240from
cursor_combined_20260121_qodo_grep_cursor_copilot_1_head_analytics_filter_refinements_pr240
Open

Analytics filter refinements#21
tomerqodo wants to merge 10 commits intocursor_combined_20260121_qodo_grep_cursor_copilot_1_base_analytics_filter_refinements_pr240from
cursor_combined_20260121_qodo_grep_cursor_copilot_1_head_analytics_filter_refinements_pr240

Conversation

@tomerqodo
Copy link
Copy Markdown

@tomerqodo tomerqodo commented Jan 21, 2026

Benchmark PR from qodo-benchmark#240


Note

Enhances filters UX and updates analytics filter configs.

  • UI filters: add autoCloseOnSelect for multiselects; reset search on close; disable popover close animation; adjust small size padding; tweak operator label container borders
  • i18n: clear default addFilter/addFilterTitle strings to allow icon-only button
  • Select popovers: preserve selected options during async search; optional custom selected icons layout via selectedOptionsClassName; width/class handling improvements
  • Stats filters: switch count badges to monospace, muted text; hide selected icons on UTM/source fields; Audience multiselect uses is any of, hides operator, auto-closes on select; Post filter icon and width updated; set Filters size to sm; use FunnelPlus icon with empty text
  • Stats header: minor navbar padding adjustments for spacing

Written by Cursor Bugbot for commit dc86c90. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

onSelect={() => {
if (isMultiSelect) {
const newValues = [...effectiveValues, option.value] as T[];
var newValues = [...effectiveValues, option.value] as T[];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent use of var instead of const

Low Severity

The variable declaration at line 1125 uses var newValues while similar logic elsewhere in the same file (e.g., line 1266) uses const newValues. This inconsistency appears to be accidentally introduced since the diff shows this was changed from const to var. Using var is discouraged in modern JavaScript/TypeScript due to its function-scoped hoisting behavior, and the rest of the codebase consistently uses const/let.

Fix in Cursor Fix in Web

addButtonText={filters.length ? 'Add filter' : 'Filter'}
className='mb-6 mt-0.5 [&>button]:order-last'
addButtonIcon={<LucideIcon.FunnelPlus />}
addButtonText={filters.length ? '' : ''}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant ternary expression always returns empty string

Low Severity

The expression filters.length ? '' : '' is a redundant ternary that evaluates to an empty string in both branches. This appears to be leftover code from when different text was shown based on the filter count. The ternary serves no purpose and reduces readability.

Fix in Cursor Fix in Web

icon: <LucideIcon.Users />,
options: audienceOptions.map(({value, label, icon}) => ({value, label, icon}))
options: audienceOptions.map(({value, label, icon}) => ({value, label, icon})),
defaultOperator: 'is any of',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect operator value format uses label instead of value

Medium Severity

The defaultOperator for the audience field is set to 'is any of' (with spaces), but operator values use underscores like 'is_any_of'. The filters component defines multiselect operators with values like {value: 'is_any_of', label: 'is any of'}. Using the label format instead of the value format means the filter will be created with an invalid operator that doesn't match any defined operator value.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants